]> git.baikalelectronics.ru Git - kernel.git/commit
debugfs: Return error during {full/open}_proxy_open() on rmmod
authorSven Eckelmann <sven@narfation.org>
Mon, 2 Aug 2021 16:24:44 +0000 (18:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Aug 2021 12:42:40 +0000 (14:42 +0200)
commit9e9ee255888710b1ae7489a3fae13e994c3e336f
treebc04589a1fc33416a3d8ecab7e5925b26e764be0
parent45114dab7e1c86c82ca0733ab14d02725269a41e
debugfs: Return error during {full/open}_proxy_open() on rmmod

If a kernel module gets unloaded then it printed report about a leak before
commit 2236bc36b931 ("debugfs: Check module state before warning in
{full/open}_proxy_open()"). An additional check was added in this commit to
avoid this printing. But it was forgotten that the function must return an
error in this case because it was not actually opened.

As result, the systems started to crash or to hang when a module was
unloaded while something was trying to open a file.

Fixes: 2236bc36b931 ("debugfs: Check module state before warning in {full/open}_proxy_open()")
Cc: Taehee Yoo <ap420073@gmail.com>
Reported-by: Mário Lopes <ml@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://lore.kernel.org/r/20210802162444.7848-1-sven@narfation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c