X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Frmap.h;h=69407f85e10b32daa4bd8ac82f88d43e36b82f78;hb=f6ac436dcc4c34709bcde355f3f2254ac0a183d4;hp=1383692ac5bd8c8dc5c06498a38795a256f56c93;hpb=ab1ecbabb1c7b1599b1eb70c291407c557ea4ef3;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 */ };