mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
3e338d3c95
syzbot report [1] describes a deadlock when write operation against an ashmem fd executed at the time when ashmem is shrinking its cache results in the following lock sequence: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&sb->s_type->i_mutex_key#13); lock(fs_reclaim); lock(&sb->s_type->i_mutex_key#13); kswapd takes fs_reclaim and then inode_lock while generic_perform_write takes inode_lock and then fs_reclaim. However ashmem does not support writing into backing shmem with a write syscall. The only way to change its content is to mmap it and operate on mapped memory. Therefore the race that lockdep is warning about is not valid. Resolve this by introducing a separate lockdep class for the backing shmem inodes. [1]: https://lkml.kernel.org/lkml/0000000000000b5f9d059aa2037f@google.com/ Reported-by: syzbot+7a0d9d0b26efefe61780@syzkaller.appspotmail.com Signed-off-by: Suren Baghdasaryan <surenb@google.com> Cc: stable <stable@vger.kernel.org> Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org> Link: https://lore.kernel.org/r/20200730192632.3088194-1-surenb@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
android | ||
axis-fifo | ||
board | ||
clocking-wizard | ||
comedi | ||
emxx_udc | ||
fbtft | ||
fieldbus | ||
fsl-dpaa2 | ||
fwserial | ||
gasket | ||
gdm724x | ||
goldfish | ||
greybus | ||
gs_fpgaboot | ||
iio | ||
kpc2000 | ||
ks7010 | ||
media | ||
most | ||
mt7621-dma | ||
mt7621-dts | ||
mt7621-pci | ||
mt7621-pci-phy | ||
mt7621-pinctrl | ||
netlogic | ||
nvec | ||
octeon | ||
octeon-usb | ||
olpc_dcon | ||
pi433 | ||
qlge | ||
ralink-gdma | ||
rtl8188eu | ||
rtl8192e | ||
rtl8192u | ||
rtl8712 | ||
rtl8723bs | ||
rts5208 | ||
sm750fb | ||
unisys | ||
vc04_services | ||
vme | ||
vt6655 | ||
vt6656 | ||
wfx | ||
wlan-ng | ||
Kconfig | ||
Makefile |