Re: [PATCH RFC v2 2/2] USB: ldusb: fix ring-buffer locking

2019-10-21 Thread Johan Hovold
On Mon, Oct 21, 2019 at 11:17:11AM -0400, Alan Stern wrote: > On Fri, 18 Oct 2019, Johan Hovold wrote: > > > The custom ring-buffer implementation was merged without any locking > > whatsoever, but a spinlock was later added by commit 9d33efd9a791 > > ("USB: ldusb bugfix"). > > > > The lock did n

Re: [PATCH RFC v2 2/2] USB: ldusb: fix ring-buffer locking

2019-10-21 Thread Alan Stern
On Fri, 18 Oct 2019, Johan Hovold wrote: > The custom ring-buffer implementation was merged without any locking > whatsoever, but a spinlock was later added by commit 9d33efd9a791 > ("USB: ldusb bugfix"). > > The lock did not cover the loads from the ring-buffer entry after > determining the buff

Re: [PATCH RFC v2 2/2] USB: ldusb: fix ring-buffer locking

2019-10-21 Thread Greg Kroah-Hartman
On Mon, Oct 21, 2019 at 10:56:27AM +0200, Johan Hovold wrote: > On Fri, Oct 18, 2019 at 11:54:58AM -0700, Greg Kroah-Hartman wrote: > > On Fri, Oct 18, 2019 at 05:19:55PM +0200, Johan Hovold wrote: > > > The custom ring-buffer implementation was merged without any locking > > > whatsoever, but a sp

Re: [PATCH RFC v2 2/2] USB: ldusb: fix ring-buffer locking

2019-10-21 Thread Johan Hovold
On Fri, Oct 18, 2019 at 11:54:58AM -0700, Greg Kroah-Hartman wrote: > On Fri, Oct 18, 2019 at 05:19:55PM +0200, Johan Hovold wrote: > > The custom ring-buffer implementation was merged without any locking > > whatsoever, but a spinlock was later added by commit 9d33efd9a791 > > ("USB: ldusb bugfix"

Re: [PATCH RFC v2 2/2] USB: ldusb: fix ring-buffer locking

2019-10-18 Thread Greg Kroah-Hartman
On Fri, Oct 18, 2019 at 05:19:55PM +0200, Johan Hovold wrote: > The custom ring-buffer implementation was merged without any locking > whatsoever, but a spinlock was later added by commit 9d33efd9a791 > ("USB: ldusb bugfix"). > > The lock did not cover the loads from the ring-buffer entry after >

[PATCH RFC v2 2/2] USB: ldusb: fix ring-buffer locking

2019-10-18 Thread Johan Hovold
The custom ring-buffer implementation was merged without any locking whatsoever, but a spinlock was later added by commit 9d33efd9a791 ("USB: ldusb bugfix"). The lock did not cover the loads from the ring-buffer entry after determining the buffer was non-empty, nor the update of the tail index onc