Re: [PATCH 2/2] usb: gadget: f_midi: added spinlock on transmit function

2015-12-25 Thread Peter Chen
On Tue, Dec 22, 2015 at 04:08:06PM +, Felipe F. Tonello wrote: > Since f_midi_transmit is called by both ALSA and USB frameworks, it can > potentially cause a race condition between both calls. This is bad because the > way f_midi_transmit is implemented can't handle concurrent calls. This is d

[PATCH 2/2] usb: gadget: f_midi: added spinlock on transmit function

2015-12-22 Thread Felipe F. Tonello
Since f_midi_transmit is called by both ALSA and USB frameworks, it can potentially cause a race condition between both calls. This is bad because the way f_midi_transmit is implemented can't handle concurrent calls. This is due to the fact that the usb request fifo looks for the next element and o