Re: [PATCH v3] USB: prevent overlapping access by usb-storage and usbfs

2013-01-18 Thread Sergei Shtylyov
Hello. On 01/18/2013 11:17 PM, Pete Zaitcev wrote: >>>Don't forget that the same code is working in 2.4 for several years. >> In mainline? Or some random vendor-specific kernel branch where we have >> no visiblity into? :) > Yes, it's in mainline since 2006. However, I am in full agreemen

Re: [PATCH v3] USB: prevent overlapping access by usb-storage and usbfs

2013-01-18 Thread Pete Zaitcev
On Fri, 18 Jan 2013 11:59:45 -0800 Greg KH wrote: > >Don't forget that the same code is working in 2.4 for several years. > > In mainline? Or some random vendor-specific kernel branch where we have > no visiblity into? :) Yes, it's in mainline since 2006. However, I am in full agreement w

Re: [PATCH v3] USB: prevent overlapping access by usb-storage and usbfs

2013-01-18 Thread Sergei Shtylyov
Hello. On 01/18/2013 10:59 PM, Greg KH wrote: Serialize usb-storage operations with usbfs and 'cat /proc/bus/usb/devices', so that they cannot disturb storage by seemingly harmless control reads. This patch was adapted from 2.4 patches by Pete Zaitcev. The initial pat

Re: [PATCH v3] USB: prevent overlapping access by usb-storage and usbfs

2013-01-18 Thread Sergei Shtylyov
Hello. On 01/18/2013 10:51 PM, Greg KH wrote: >> +/* >> + * This is our custom open-coded lock, similar to r/w locks in concept. >> + * It prevents usb-storage, usbfs, and /proc from simultaneous access. >> + */ >> +wait_queue_head_t excl_wait; >> +spinlock_t excl_lock; >>

Re: [PATCH v3] USB: prevent overlapping access by usb-storage and usbfs

2013-01-18 Thread Greg KH
On Fri, Jan 18, 2013 at 11:52:53PM +0300, Sergei Shtylyov wrote: > Hello. > > On 01/18/2013 10:48 PM, Greg KH wrote: > > >> Serialize usb-storage operations with usbfs and 'cat > >> /proc/bus/usb/devices', > >> so that they cannot disturb storage by seemingly harmless control reads. > > >> This

Re: [PATCH v3] USB: prevent overlapping access by usb-storage and usbfs

2013-01-18 Thread Sergei Shtylyov
Hello. On 01/18/2013 10:48 PM, Greg KH wrote: >> Serialize usb-storage operations with usbfs and 'cat /proc/bus/usb/devices', >> so that they cannot disturb storage by seemingly harmless control reads. >> This patch was adapted from 2.4 patches by Pete Zaitcev. The initial patch >> of >> the s

Re: [PATCH v3] USB: prevent overlapping access by usb-storage and usbfs

2013-01-18 Thread Greg KH
On Fri, Jan 18, 2013 at 11:35:49PM +0300, Sergei Shtylyov wrote: > + /* > + * This is our custom open-coded lock, similar to r/w locks in concept. > + * It prevents usb-storage, usbfs, and /proc from simultaneous access. > + */ > + wait_queue_head_t excl_wait; > + spinloc

Re: [PATCH v3] USB: prevent overlapping access by usb-storage and usbfs

2013-01-18 Thread Greg KH
On Fri, Jan 18, 2013 at 11:35:49PM +0300, Sergei Shtylyov wrote: > Serialize usb-storage operations with usbfs and 'cat /proc/bus/usb/devices', > so that they cannot disturb storage by seemingly harmless control reads. > > This patch was adapted from 2.4 patches by Pete Zaitcev. The initial patch