[PATCH] dnotify race fix
A bunch of places dereferences ->d_parent->d_inode with no protection whatsoever (e.g. on return from read()). It's an SMP race on all boxen and pretty wide UP race if we have dnotify set on parent (race between read() and rename() and similar beasts). Patch below is the first one in a series of ->d_parent-related fixes. It adds a helper (dnotify_parent(dentry, event)) and converts places that did inode_dir_notify(dentry->d_parent->d_inode,...) to it. Please, apply. Notice that problem exists in 2.4 and unlike 2.5 there we can't switch to saner API (basically, reporting file events on file, not on a parent directory). Some of the further fixes depend on Pat's and Greg's (driverfs and usbdevfs resp.) patches, so getting them merged would make life easier. And yes, some of further chunks (e.g. smbfs ->revalidate() and friends) will also have to go into 2.4 - they are independent from any threading projects ;-/
Showing
Please register or sign in to comment