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] [day] [month] [year] [list]
Date:   Tue, 8 May 2018 16:39:50 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     Oliver Neukum <oneukum@...e.com>, stern@...land.harvard.edu,
        gregkh@...uxfoundation.org
Cc:     linux-usb@...r.kernel.org, linux-scsi@...r.kernel.org,
        usb-storage@...ts.one-eyed-alien.net, linux-kernel@...r.kernel.org
Subject: Re: [usb-storage] [PATCH] usb: storage: Fix a possible data race in
 uas_queuecommand_lck



On 2018/5/8 16:27, Oliver Neukum wrote:
> Am Dienstag, den 08.05.2018, 15:47 +0800 schrieb Jia-Ju Bai:
>> The write operations to "cmnd->result" and "cmnd->scsi_done"
>> are protected by the lock on line 642-643, but the write operations
>> to these data on line 634-635 are not protected by the lock.
>> Thus, there may exist a data race for "cmnd->result"
>> and "cmnd->scsi_done".
> No,
>
> the write operations need no lock. The low level driver at this point
> owns the command. We cannot race with abort() for a command within
> queuecommand(). We take the lock where we take it to protect
> dev->resetting.
>
> I don't see why the scope of the lock would need to be enlarged.

Okay, thanks for your reply and explanation.


Best wishes,
Jia-Ju Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ