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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 13 Dec 2016 08:33:19 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Dashi DS1 Cao <caods1@...ovo.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-scsi <linux-scsi@...r.kernel.org>,
        stable <stable@...r.kernel.org>,
        Sasha Levin <alexander.levin@...izon.com>
Subject: Re: version 3.18.44 to 3.18.45 introduced a bug in
 "drivers/scsi/megaraid/megaraid_sas_base.c"

On 12/13/16 08:30, Greg Kroah-Hartman wrote:
> On Tue, Dec 13, 2016 at 08:08:27AM -0800, Randy Dunlap wrote:
>> [adding other lists + gregkh]
>>
>>
>> On 12/13/16 02:56, Dashi DS1 Cao wrote:
>>> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
>>> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
>>> @@ -1614,16 +1614,13 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
>>>                 goto out_done;
>>>         }
>>>
>>> -       switch (scmd->cmnd[0]) {
>>> -       case SYNCHRONIZE_CACHE:
>>> -               /*
>>> -                * FW takes care of flush cache on its own
>>> -                * No need to send it down
>>> -                */
>>> +       /*
>>> +        * FW takes care of flush cache on its own for Virtual Disk.
>>> +        * No need to send it down for VD. For JBOD send SYNCHRONIZE_CACHE to FW.
>>> +        */
>>> +       if ((scmd->cmnd[0] == SYNCHRONIZE_CACHE) && MEGASAS_IS_LOGICAL(scmd)) {
>>>                 scmd->result = DID_OK << 16;
>>>                 goto out_done;
>>> -       default:
>>> -               break;
>>>         }
>>>
>>>         if (instance->instancet->build_and_issue_cmd(instance, scmd)) {
>>>
>>> MEGASAS_IS_LOGICAL is defined to be a macro with '?' operator, which has a lower precedence than '&&'.
>>> The macro should have been defined as:
>>> --- a/drivers/scsi/megaraid/megaraid_sas.h
>>> +++ b/drivers/scsi/megaraid/megaraid_sas.h
>>> @@ -1823,7 +1823,7 @@ struct megasas_instance_template {
>>>  };
>>>
>>>  #define MEGASAS_IS_LOGICAL(scp)                                                \
>>> -       (scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1
>>> +       ((scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1)
>>>
>>>  #define MEGASAS_DEV_INDEX(inst, scp)                                   \
>>>         ((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) +    \
>>>
>>> Dashi Cao
>>>
> 
> I don't maintain 3.18-stable :)
> 
> thanks,
> 
> greg k-h
> 

Thanks. My bad.

adding Sasha.


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ