From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Dike Subject: Re: [PATCH] Add O_NONBLOCK support to FUSE Date: Thu, 2 Mar 2006 13:04:52 -0500 Message-ID: <20060302180452.GA9188@ccure.user-mode-linux.org> References: <20060301022944.GB9624@ccure.user-mode-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: fuse-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: To: Miklos Szeredi Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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 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;