kernel-ark/fs/fuse
Miklos Szeredi 095da6cbb6 [PATCH] fuse: fix bitfield race
Fix race in setting bitfields of fuse_conn.  Spotted by Andrew Morton.

The two fields ->connected and ->mounted were always changed with the
fuse_lock held.  But other bitfields in the same structure were changed
without the lock.  In theory this could lead to losing the assignment of
even the ones under lock.  The chosen solution is to change these two
fields to be a full unsigned type.  The other bitfields aren't "important"
enough to warrant the extra complexity of full locking or changing them to
bitops.

For all bitfields document why they are safe wrt. concurrent
assignments.

Also make the initialization of the 'num_waiting' atomic counter explicit.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:31 -08:00
..
dev.c [PATCH] fuse: move INIT handling to inode.c 2006-01-16 23:15:31 -08:00
dir.c [PATCH] fuse: READ request initialization 2006-01-16 23:15:31 -08:00
file.c [PATCH] fuse: use asynchronous READ requests for readpages 2006-01-16 23:15:31 -08:00
fuse_i.h [PATCH] fuse: fix bitfield race 2006-01-16 23:15:31 -08:00
inode.c [PATCH] fuse: fix bitfield race 2006-01-16 23:15:31 -08:00
Makefile [PATCH] FUSE - file operations 2005-09-09 14:03:45 -07:00