linux/drivers/staging
Minchan Kim 7e5a5104c6 zram: Fix deadlock bug in partial read/write
Now zram allocates new page with GFP_KERNEL in zram I/O path
if IO is partial. Unfortunately, It may cause deadlock with
reclaim path like below.

write_page from fs
fs_lock
allocation(GFP_KERNEL)
reclaim
pageout
				write_page from fs
				fs_lock <-- deadlock

This patch fixes it by using GFP_NOIO.  In read path, we
reorganize code flow so that kmap_atomic is called after the
GFP_NOIO allocation.

Cc: stable@vger.kernel.org
Acked-by: Jerome Marchand <jmarchand@redhat.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
[ penberg@kernel.org: don't use GFP_ATOMIC ]
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-03 17:52:49 -08:00
..
android staging: alarm-dev: Implement compat_ioctl support 2013-01-18 12:37:11 -08:00
asus_oled
bcm Staging: bcm: copying more data than intended 2013-01-17 13:52:37 -08:00
ccg TTY/Serial merge for 3.8-rc1 2012-12-11 14:08:47 -08:00
ced1401 staging: ced1401: fix GFP_KERNEL in spinlock context 2013-01-11 16:44:10 -08:00
comedi pci_ids.h: add common pci vendor ids from comedi subsystem 2013-02-03 17:49:16 -08:00
cptm1217
crystalhd staging: crystalhd: remove use of __devexit 2012-11-21 15:05:12 -08:00
csr staging/csr: Use kmemdup rather than duplicating its implementation 2013-01-29 23:22:16 -05:00
cxt1e1 staging: cxt1e1: buffer overflow in do_del_chan() 2013-01-25 11:21:26 -08:00
dgrp staging: dgrp: check for a valid proc dir entry pointer 2013-01-22 08:58:44 -08:00
echo staging: echo.c: fix memory leakage 2013-01-07 14:03:32 -08:00
et131x staging: et131x: Fix all sparse warnings 2013-01-22 09:15:18 -08:00
frontier
ft1000 Staging: ft1000-usb: Fix call to obsolete function 2013-01-07 12:33:45 -08:00
fwserial staging/fwserial: Fix compiler warning 2013-01-31 10:30:34 +01:00
gdm72xx Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-12 12:22:13 -08:00
goldfish goldfish: NAND flash driver 2013-01-24 13:53:23 -08:00
iio iio:light:tsl2563 move out of staging 2013-01-27 17:37:24 +00:00
imx-drm staging: ipu-di: Change DI address info to dev_dbg 2013-01-17 13:52:37 -08:00
keucr staging: keucr: Fix parens/braces 2013-01-07 12:59:25 -08:00
line6 staging: line6: clean up line6_variax_process_message() 2013-01-20 15:57:47 -08:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-12-13 19:22:22 -08:00
net
nvec staging: nvec: cleanup the string mess 2013-01-29 23:25:10 -05:00
octeon
olpc_dcon
omap-thermal staging: omap-thermal/omap-bandgap.c: adjust duplicate test 2013-01-21 14:00:10 -08:00
omapdrm staging/omapdrm: Use kmemdup rather than duplicating its implementation 2013-01-29 23:22:16 -05:00
ozwpan staging:ozwpan: Fix following warning. 2013-01-29 23:25:10 -05:00
panel staging: panel: pass correct lengths to keypad_send_key() 2012-11-29 18:16:15 -08:00
phison
quickstart
rtl8187se Merge branch 'staging-linus' into staging-next 2013-01-07 15:17:52 -08:00
rtl8192e staging: rtl8192e: Fix failure to check pci_map_single() 2013-01-07 12:57:27 -08:00
rtl8192u staging: rtl8192u: fixed coding style issues in r8192U_core.c 2013-01-11 16:37:11 -08:00
rtl8712 rtl8712: remove unused definitions from ethernet.h 2013-01-11 16:39:12 -08:00
rts5139
sb105x Merge 3.8-rc5 into staging-next 2013-01-25 21:25:02 -08:00
sbe-2t3e3
sep staging: sep: remove assignment to i and j in sep_crypto_setup 2013-01-22 08:58:44 -08:00
serqt_usb2
silicom
slicoss staging: slicoss: Fix space-related checkpatch.pl warnings 2013-01-17 13:53:06 -08:00
sm7xxfb
speakup Staging: speakup: kobjects.c: checkpatch.pl fixes 2013-01-17 13:31:07 -08:00
ste_rmi4 staging: ste_rmi4: remove use of __devexit 2012-11-21 15:05:12 -08:00
tidspbridge staging: tidspbridge/pmgr: another using strlcpy instead of strncpy 2013-01-21 14:00:10 -08:00
usbip staging: usbip: replace the interrupt safe spinlocks with common ones. 2013-01-22 09:00:10 -08:00
vme Merge branch 'staging-linus' into staging-next 2013-01-07 15:17:52 -08:00
vt6655 staging: vt6655: no braces needed for single statement if , for blocks 2013-01-17 13:17:03 -08:00
vt6656 staging: vt6656: fix C99 // comments in main_usb.c 2013-02-03 17:32:26 -08:00
winbond staging: Add angle bracket before and after the URL 2013-01-07 14:56:04 -08:00
wlags49_h2 staging: wlags49_h2: remove unneeded memset() in wireless_get_bssid() 2013-01-07 11:08:12 -08:00
wlags49_h25
wlan-ng Staging: wlan-ng: Fix tab coding style issue in hfa384x.h 2013-02-03 17:42:07 -08:00
xgifb staging/xgifb: remove unused variables 2013-02-03 19:26:14 -06:00
zcache Staging: zcache: remove unnecessary braces in zcache-main.c 2013-01-29 23:22:16 -05:00
zram zram: Fix deadlock bug in partial read/write 2013-02-03 17:52:49 -08:00
zsmalloc staging: zsmalloc: remove unused pool name 2013-01-30 18:22:41 +01:00
Kconfig goldfish: audio support 2013-01-24 13:51:38 -08:00
Makefile goldfish: audio support 2013-01-24 13:51:38 -08:00
staging.c