lkml.org 
[lkml]   [2004]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] [Request for inclusion] Filesystem in Userspace
From
Date
On Tue, 2004-11-16 at 10:08 +0100, Miklos Szeredi wrote:
> Linus,
>
> I did send a pointer to the cleaned up patch, maybe this wasn't
> explicit enough:
>
> http://fuse.sourceforge.net/kernel_patches/fuse-2.1-2.6.10-rc2.patch
+static void request_wait_answer(struct fuse_req *req)
+{
+ spin_unlock(&fuse_lock);
+ wait_event(req->waitq, req->finished);
+ spin_lock(&fuse_lock);
+}

+ spin_lock(&fuse_lock);
+ req->out.h.error = -ENOTCONN;
+ if (fc->file) {
+ req->in.h.unique = get_unique(fc);
+ list_add_tail(&req->list, &fc->pending);
+ wake_up(&fc->waitq);
+ request_wait_answer(req);
+ list_del(&req->list);
+ }
+ spin_unlock(&fuse_lock);

somehow I find dropping the lock and then doing a list_del() without any kind of verification very suspicious.
Either you need the lock or you don't. If you do, the code is wrong. If you don't... don't take the lock :)




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

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.125 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site