summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorQingfang Deng <qingfang.deng@linux.dev>2026-09-21 09:49:20 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-09-25 15:41:51 +0200
commitd498b2ddda99eed28cde177b1620dbcea246a1c4 (patch)
treefa49e62fa8f6b2549df6a4713e0166108ba17647 /scripts/Makefile.thinlto
parent30c70e01f79f04b802821d6de24a6480538e3909 (diff)
downloadlinux-d498b2ddda99eed28cde177b1620dbcea246a1c4.tar.gz
linux-d498b2ddda99eed28cde177b1620dbcea246a1c4.zip
mtd: block: prevent reclaim I/O during request processing
The blktrans request callbacks run under dev->lock and may allocate memory with GFP_KERNEL. For example, mtdblock_writesect() uses vmalloc() to allocate its eraseblock cache. Direct reclaim can then recurse into block I/O and deadlock on resources held by the request being processed. syzbot reports a circular locking dependency involving the device mutex and fs_reclaim. Commit d5ba1c8ffd0b ("mtd: don't use PF_MEMALLOC") removed PF_MEMALLOC from the MTD request thread. That flag had prevented direct reclaim, so its removal made allocations during request processing eligible for reclaim without excluding I/O. Wrap request processing in mtd_queue_rq() in a NOIO scope. This covers both the request and background callbacks, including allocations made by lower MTD drivers, and prevents reclaim from initiating filesystem or block I/O. Fixes: d5ba1c8ffd0b ("mtd: don't use PF_MEMALLOC") Assisted-by: Codex:gpt-6-astra Reported-by: syzbot+e08e0a15269eefa87790@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e08e0a15269eefa87790 Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions