Re: [PATCH] Add O_NONBLOCK support to FUSE

From: Jeff Dike
Date: Thu Mar 02 2006 - 13:01:48 EST


Found the BUG, patch below. Feel free to merge it with the async
patch even though it is signed off on its own.

Jeff

I didn't realize that kobject_put(&fc->kobj) freed fc.

Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>

Index: host-2.6.15-fuse/fs/fuse/dev.c
===================================================================
--- host-2.6.15-fuse.orig/fs/fuse/dev.c 2006-03-01 14:08:40.000000000 -0500
+++ host-2.6.15-fuse/fs/fuse/dev.c 2006-03-01 14:09:04.000000000 -0500
@@ -919,9 +919,9 @@ static int fuse_dev_release(struct inode
}
spin_unlock(&fuse_lock);
if (fc) {
- kobject_put(&fc->kobj);
fasync_helper(-1, file, 0, &fc->fasync);
fc->fasync = NULL;
+ kobject_put(&fc->kobj);
}

return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/