]> git.itanic.dy.fi Git - linux-stable/commitdiff
loop: Use pr_warn_once() for loop_control_remove() warning
authorTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Mon, 29 Nov 2021 10:00:43 +0000 (19:00 +0900)
committerJens Axboe <axboe@kernel.dk>
Mon, 29 Nov 2021 13:44:45 +0000 (06:44 -0700)
kernel test robot reported that RCU stall via printk() flooding is
possible [1] when stress testing.

Link: https://lkml.kernel.org/r/20211129073709.GA18483@xsang-OptiPlex-9020
Reported-by: kernel test robot <oliver.sang@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c

index a154cab6cd989808b5cae51fd3d12506a6d52f9c..c3a36cfaa855a679f8f7d215852c8981aea3e2f7 100644 (file)
@@ -2103,7 +2103,7 @@ static int loop_control_remove(int idx)
        int ret;
 
        if (idx < 0) {
-               pr_warn("deleting an unspecified loop device is not supported.\n");
+               pr_warn_once("deleting an unspecified loop device is not supported.\n");
                return -EINVAL;
        }