]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fuse: avoid scheduling while atomic
authorMiklos Szeredi <mszeredi@suse.cz>
Mon, 7 Jul 2014 13:28:51 +0000 (15:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jul 2014 15:08:20 +0000 (08:08 -0700)
commit32e1a5c05d53a0725102af0b7721911bac429f59
treee58ca4e2d3988e39886c6ca3e7cb483b58bdbaac
parentdceb427299f3c737002d857af934cbe7e4b1be19
fuse: avoid scheduling while atomic

commit c55a01d360afafcd52bc405c044a6ebf5de436d5 upstream.

As reported by Richard Sharpe, an attempt to use fuse_notify_inval_entry()
triggers complains about scheduling while atomic:

  BUG: scheduling while atomic: fuse.hf/13976/0x10000001

This happens because fuse_notify_inval_entry() attempts to allocate memory
with GFP_KERNEL, holding "struct fuse_copy_state" mapped by kmap_atomic().

Introduced by commit 58bda1da4b3c "fuse/dev: use atomic maps"

Fix by moving the map/unmap to just cover the actual memcpy operation.

Original patch from Maxim Patlasov <mpatlasov@parallels.com>

Reported-by: Richard Sharpe <realrichardsharpe@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dev.c