lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20180328024422.GA1352@jagdpanzerIV>
Date:   Wed, 28 Mar 2018 11:44:22 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     wen.yang99@....com.cn
Cc:     Bart.VanAssche@....com, sergey.senozhatsky.work@...il.com,
        pmladek@...e.com, jejb@...ux.vnet.ibm.com,
        martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, jiang.biao2@....com.cn,
        zhong.weidong@....com.cn, tan.hu@....com.cn
Subject: Re: 答复: Re: [PATCH] scsi:
 Replace sdev_printk with printk_deferred to avoid

On (03/28/18 10:29), wen.yang99@....com.cn wrote:
>    Hello Bart,
>
>    We have a detailed discussion of the problem.
>    Sergey Senozhatsky, Petr and many people have made a lot of efforts about
>    it.
>    Please see this link:
>    https://bugzilla.kernel.org/show_bug.cgi?id=199003
>
>    1, Petr suggests that it should be modified in this way:
>    IMHO, printing the same message so many times is useless. Therefore
>    some throttling would make sense. If we want to keep sdev_printk(),

The thing with retelimiting is that - yes, we do less printks but we still
do them under queue spin_lock.

So I was thinking about something like below [a quick-n-dirty workaround]

---

 drivers/scsi/scsi_lib.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 0dfec0dedd5e..6c930fbdd24c 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1825,9 +1825,13 @@ static void scsi_request_fn(struct request_queue *q)
 			break;
 
 		if (unlikely(!scsi_device_online(sdev))) {
+			scsi_kill_request(req, q);
+			spin_unlock_irq(q->queue_lock);
+
 			sdev_printk(KERN_ERR, sdev,
 				    "rejecting I/O to offline device\n");
-			scsi_kill_request(req, q);
+
+			spin_lock_irq(q->queue_lock);
 			continue;
 		}
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ