Re: [PATCH 1/2] cdc-wdm: Fix more races on the read path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Hutchings <ben@xxxxxxxxxxxxxxx> writes:
> On Sun, 2012-02-12 at 06:00 +0000, Ben Hutchings wrote:
>> We must not allow the input buffer length to change while we're
>> shuffling the buffer contents.  We also mustn't clear the WDM_READ
>> flag after more data might have arrived.  Therefore move both of these
>> into the spinlocked region at the bottom of wdm_read().
>> 
>> When reading desc->length without holding the iuspin lock, use
>> ACCESS_ONCE() to ensure the compiler doesn't re-read it with
>> inconsistent results.
> [...]
>
> I think these should go to stable if they actually work.

I tested them on these devices and cannot see any immediate regressions:

Bus 002 Device 006: ID 0bdb:1900 Ericsson Business Mobile Networks BV F3507g Mobile Broadband Module
Bus 002 Device 004: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard


Feel free to add a

Tested-by: Bjørn Mork <bjorn@xxxxxxx>

if you want to.


Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux