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
| ||
|
Date: Thu, 31 Jan 2019 09:13:42 +0800 From: Jason Yan <yanaijie@...wei.com> To: John Garry <john.garry@...wei.com>, <martin.petersen@...cle.com>, <jejb@...ux.vnet.ibm.com> CC: <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <zhaohongjiang@...wei.com>, <hare@...e.com>, <dan.j.williams@...el.com>, <jthumshirn@...e.de>, <hch@....de>, <huangdaode@...ilicon.com>, <chenxiang66@...ilicon.com>, <xiexiuqi@...wei.com>, <tj@...nel.org>, <miaoxie@...wei.com>, Ewan Milne <emilne@...hat.com>, Tomas Henzl <thenzl@...hat.com> Subject: Re: [PATCH v2 2/7] scsi: libsas: only clear phy->in_shutdown after shutdown event done On 2019/1/31 0:26, John Garry wrote: > On 30/01/2019 08:24, Jason Yan wrote: >> When the event queue is full of phy up and down events and reached the >> threshold, we will queue a shutdown-event, and set phy->in_shutdown so >> that we will not queue a shutdown-event again. But before the >> shutdown-event can be executed, every phy-down event will clear >> phy->in_shutdown and a new shutdown-event will be queued. The queue will >> be full of these shutdown-events. >> >> Fix this by only clear phy->in_shutdown in sas_phye_shutdown(), that is >> after the first shutdown-event has been executed. >> > > Seems ok as a fix: > Reviewed-by: John Garry <john.garry@...wei.com> > > After this fix, could we change to use a static per-PHY shutdown event > so that we cannot re-queue it? I know that this is going against idea of > dynamic events, but it's easier than messing with flags like this. > Thanks, I will consider this. >> Fixes: f12486e06ae8 ("scsi: libsas: shut down the PHY if events >> reached the threshold") >> Signed-off-by: Jason Yan <yanaijie@...wei.com> >> CC: John Garry <john.garry@...wei.com> >> CC: Johannes Thumshirn <jthumshirn@...e.de> >> CC: Ewan Milne <emilne@...hat.com> >> CC: Christoph Hellwig <hch@....de> >> CC: Tomas Henzl <thenzl@...hat.com> >> CC: Dan Williams <dan.j.williams@...el.com> >> CC: Hannes Reinecke <hare@...e.com> >> --- >> drivers/scsi/libsas/sas_phy.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/drivers/scsi/libsas/sas_phy.c >> b/drivers/scsi/libsas/sas_phy.c >> index 0374243c85d0..762bb13cca74 100644 >> --- a/drivers/scsi/libsas/sas_phy.c >> +++ b/drivers/scsi/libsas/sas_phy.c >> @@ -35,7 +35,6 @@ static void sas_phye_loss_of_signal(struct >> work_struct *work) >> struct asd_sas_event *ev = to_asd_sas_event(work); >> struct asd_sas_phy *phy = ev->phy; >> >> - phy->in_shutdown = 0; >> phy->error = 0; >> sas_deform_port(phy, 1); >> } >> @@ -45,7 +44,6 @@ static void sas_phye_oob_done(struct work_struct *work) >> struct asd_sas_event *ev = to_asd_sas_event(work); >> struct asd_sas_phy *phy = ev->phy; >> >> - phy->in_shutdown = 0; >> phy->error = 0; >> } >> >> @@ -127,6 +125,7 @@ static void sas_phye_shutdown(struct work_struct >> *work) >> } else >> pr_notice("phy%02d is not enabled, cannot shutdown\n", >> phy->id); >> + phy->in_shutdown = 0; >> } >> >> /* ---------- Phy class registration ---------- */ >> > > > > . >
Powered by blists - more mailing lists