On Fri, 7 Jan 2011, Greg KH wrote: > On Fri, Jan 07, 2011 at 10:39:21AM +0100, Miklos Szeredi wrote: > > On Thu, 6 Jan 2011, Andrew Morton wrote: > > > mysterious. > > > > commit 7909b1c6 (fuse: don't use atomic kmap) should fix this. > > > > CC-d [email protected]. Greg, could you please add this commit to the > > stable tree? > > Which stable tree? .36, .37, older?
Sorry, forgot to check. .34 and .35 It applies cleanly to .35 but needs backporting for .34. See below. Thanks, Miklos From: Miklos Szeredi <[email protected]> Subject: fuse: don't use atomic kmap Don't use atomic kmap for mapping userspace buffers in device read/write. This is necessary to prevent sleeping kzalloc in atomic context in fuse_notify_inval_entry(). Backported from commit 7909b1c6 to 2.6.34 stable tree. Signed-off-by: Miklos Szeredi <[email protected]> --- fs/fuse/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: linux-2.6/fs/fuse/dev.c =================================================================== --- linux-2.6.orig/fs/fuse/dev.c 2011-01-07 21:31:07.000000000 +0100 +++ linux-2.6/fs/fuse/dev.c 2011-01-07 21:36:38.000000000 +0100 @@ -523,7 +523,7 @@ static void fuse_copy_init(struct fuse_c static void fuse_copy_finish(struct fuse_copy_state *cs) { if (cs->mapaddr) { - kunmap_atomic(cs->mapaddr, KM_USER0); + kunmap(cs->pg); if (cs->write) { flush_dcache_page(cs->pg); set_page_dirty_lock(cs->pg); @@ -559,7 +559,7 @@ static int fuse_copy_fill(struct fuse_co return err; BUG_ON(err != 1); offset = cs->addr % PAGE_SIZE; - cs->mapaddr = kmap_atomic(cs->pg, KM_USER0); + cs->mapaddr = kmap(cs->pg); cs->buf = cs->mapaddr + offset; cs->len = min(PAGE_SIZE - offset, cs->seglen); cs->seglen -= cs->len; _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
