Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1423270
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH resend] libata:fix kernel panic when hotplug |
| Date | 2016-06-15 20:00 +0200 |
| Message-ID | <rKngC-5DP-9@gated-at.bofh.it> (permalink) |
| References | <rKeZI-BL-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello,
On Wed, Jun 15, 2016 at 05:15:32PM +0800, DingXiang wrote:
> From: Miao Xie <miaoxie@huawei.com>
>
> In normal condition,if we use sas protocol and hotplug a sata disk on a port,
> the sas driver will send event "PORTE_BYTES_DMAED" and call function "sas_porte_bytes_dmaed".
> But if a sata disk is run io and unplug it,then plug a new sata disk,this operation may cause
> a kernel panic like this:
Can you please flow the text so that it fits inside 80 column?
...
> Signed-off-by:Dingxiang <dingxiang@huawei.com>
> Signed-off-by:Chenqilin <chenqilin2@huawei.com>
Can you please put a space between the first and last names?
Please also cc linux-scsi and people who are more familiar with SAS.
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 61dc7a9..ac5ec4d 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -816,8 +816,12 @@ void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap)
>
> if (ap->pflags & ATA_PFLAG_LOADING)
> ap->pflags &= ~ATA_PFLAG_LOADING;
> - else if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG)
> - schedule_delayed_work(&ap->hotplug_task, 0);
> + else if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG){
> + if(ap->flags & ATA_FLAG_SAS_HOST)
> + ap->pflags &= ~ATA_PFLAG_SCSI_HOTPLUG;
> + else
> + schedule_delayed_work(&ap->hotplug_task, 0);
> + }
ATA_PFLAG_SCSI_HOTPLUG is cleared below anyway, so the above can be
else if ((ap->pflags & ATA_PFLAG_SCSI_HOTPLUG) &&
!(ap->pflags & ATA_PFLAG_SAS_HOST))
Thanks.
--
tejun
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH resend] libata:fix kernel panic when hotplug DingXiang <dingxiang@huawei.com> - 2016-06-15 11:10 +0200 Re: [PATCH resend] libata:fix kernel panic when hotplug Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-06-15 13:20 +0200 Re: [PATCH resend] libata:fix kernel panic when hotplug Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-06-15 13:20 +0200 Re: [PATCH resend] libata:fix kernel panic when hotplug Tejun Heo <tj@kernel.org> - 2016-06-15 20:00 +0200
csiph-web