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]

 



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.

Ben.

-- 
Ben Hutchings
The two most common things in the universe are hydrogen and stupidity.

Attachment: signature.asc
Description: This is a digitally signed message part


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

  Powered by Linux