X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Frmap.h;h=69407f85e10b32daa4bd8ac82f88d43e36b82f78;hb=63870295de9adb365cd121dab94379b8cfdf986a;hp=1383692ac5bd8c8dc5c06498a38795a256f56c93;hpb=5b39dba5029108800b94a5f4f96e3a05417103ac;p=linux-2.6 diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 1383692ac5..69407f85e1 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -26,6 +26,14 @@ */ struct anon_vma { spinlock_t lock; /* Serialize access to vma list */ + /* + * NOTE: the LSB of the head.next is set by + * mm_take_all_locks() _after_ taking the above lock. So the + * head must only be read/written after taking the above lock + * to be sure to see a valid next pointer. The LSB bit itself + * is serialized by a system wide lock only visible to + * mm_take_all_locks() (mm_all_locks_mutex). + */ struct list_head head; /* List of private "related" vmas */ };