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

Re: [PATCH] Add support for usbfs zerocopy.

2015-12-25 Thread Steinar H. Gunderson
On Fri, Dec 25, 2015 at 09:50:50AM +0100, Oliver Neukum wrote: > > + ret = usbfs_increase_memory_usage(size + sizeof(struct usb_memory)); > > + if (ret) { > > + module_put(THIS_MODULE); > > + return ret; > > + } > > Could you do the error handling in

[PATCH 1/1] MAINTAINERS: change my email address

2015-12-25 Thread Peter Chen
Freescale has merged with NXP. Signed-off-by: Peter Chen --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9ea0955..12ff794 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2759,7 +2759,7 @@ S:

Re: [PATCH] Add support for usbfs zerocopy.

2015-12-25 Thread Oliver Neukum
On Thu, 2015-11-26 at 01:19 +0100, Steinar H. Gunderson wrote: Hi, just two small nits to pick: > +static int usbdev_mmap(struct file *file, struct vm_area_struct *vma) > +{ > + struct usb_memory *usbm = NULL; > + struct usb_dev_state *ps = file->private_data; > + size_t size

Re: [PATCH] Add support for usbfs zerocopy.

2015-12-25 Thread Alan Stern
On Fri, 25 Dec 2015, Steinar H. Gunderson wrote: > On Fri, Dec 25, 2015 at 09:50:50AM +0100, Oliver Neukum wrote: > > > + ret = usbfs_increase_memory_usage(size + sizeof(struct > > > usb_memory)); > > > + if (ret) { > > > + module_put(THIS_MODULE); > > > +

[PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()

2015-12-25 Thread Yoshihiro Shimoda
A udc driver should set the giveback status to -ESHUTDOWN in usb_ep_disable(). Otherwise, a gadget driver (e.g. g_serial) might request next data wrongly and it is possible to cause kernel panic. Signed-off-by: Yoshihiro Shimoda --- This patch is based on

Re: MX28 with hub cannot reset

2015-12-25 Thread Stefan Wahren
Hi, > Peter Chen hat am 25. Dezember 2015 um 07:22 > geschrieben: > > > On Thu, Dec 24, 2015 at 09:42:58AM +0100, Stefan Wahren wrote: > > Hi, > > > > > Peter Chen hat am 23. Dezember 2015 um 10:49 > > > geschrieben: > > > > > > > > > On Wed, Dec

[PATCH] usb: gadget: acm: set notify_req to NULL after freed to avoid double free

2015-12-25 Thread changbin . du
From: "Du, Changbin" If acm_bind fails before allocate notification and acm->notify_req is not set to NULL after freed last time, double free will happen. kernel BUG at mm/slub.c:3392! invalid opcode: [#1] PREEMPT SMP EIP is at kfree+0x172/0x180 Call Trace: