Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-10 Thread Peter Hurley
On 10/10/2014 12:05 AM, Andre Wolokita wrote: > > > On 10/10/14 00:47, Peter Hurley wrote: >> Hi Andre, >> >> On 10/08/2014 11:54 PM, Andre Wolokita wrote: >>> On 09/10/14 14:38, Greg KH wrote: On Thu, Oct 09, 2014 at 02:08:04PM +1100, Andre Wolokita wrote: > On 09/10/14 13:56, Greg KH w

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-09 Thread Andre Wolokita
On 10/10/14 00:47, Peter Hurley wrote: > Hi Andre, > > On 10/08/2014 11:54 PM, Andre Wolokita wrote: >> On 09/10/14 14:38, Greg KH wrote: >>> On Thu, Oct 09, 2014 at 02:08:04PM +1100, Andre Wolokita wrote: On 09/10/14 13:56, Greg KH wrote: > On Thu, Oct 09, 2014 at 11:23:59AM +1100, And

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-09 Thread Peter Hurley
On 10/09/2014 10:26 AM, Alan Stern wrote: > On Thu, 9 Oct 2014, Andre Wolokita wrote: > > Isn't this now a "use-after-free" issue? > Are you referring to the subsequent call to wait event() on gs_closed()? >>> >>> Yes. >>> Testing the use-case with this patch applied seemed

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-09 Thread Peter Hurley
Hi Andre, On 10/08/2014 11:54 PM, Andre Wolokita wrote: > On 09/10/14 14:38, Greg KH wrote: >> On Thu, Oct 09, 2014 at 02:08:04PM +1100, Andre Wolokita wrote: >>> On 09/10/14 13:56, Greg KH wrote: On Thu, Oct 09, 2014 at 11:23:59AM +1100, Andre Wolokita wrote: > Issuing a modprobe -r g_se

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-09 Thread Alan Stern
On Thu, 9 Oct 2014, Andre Wolokita wrote: > >>> Isn't this now a "use-after-free" issue? > >>> > >> > >> Are you referring to the subsequent call to wait event() on gs_closed()? > > > > Yes. > > > >> Testing the use-case with this patch applied seemed to work without any > >> issues. The ttyGS0

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-09 Thread Alan Stern
On Thu, 9 Oct 2014, Andre Wolokita wrote: > Issuing a modprobe -r g_serial command to the target > over the gadget serial communications line causes > modprobe to enter uninterruptable sleep, leaving the > system in an unstable state. > > The associated tty_port.count won't drop to 0 because > th

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-08 Thread Andre Wolokita
On 09/10/14 14:38, Greg KH wrote: > On Thu, Oct 09, 2014 at 02:08:04PM +1100, Andre Wolokita wrote: >> On 09/10/14 13:56, Greg KH wrote: >>> On Thu, Oct 09, 2014 at 11:23:59AM +1100, Andre Wolokita wrote: Issuing a modprobe -r g_serial command to the target over the gadget serial commun

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-08 Thread Greg KH
On Thu, Oct 09, 2014 at 02:08:04PM +1100, Andre Wolokita wrote: > On 09/10/14 13:56, Greg KH wrote: > > On Thu, Oct 09, 2014 at 11:23:59AM +1100, Andre Wolokita wrote: > >> Issuing a modprobe -r g_serial command to the target > >> over the gadget serial communications line causes > >> modprobe to e

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-08 Thread Andre Wolokita
On 09/10/14 13:56, Greg KH wrote: > On Thu, Oct 09, 2014 at 11:23:59AM +1100, Andre Wolokita wrote: >> Issuing a modprobe -r g_serial command to the target >> over the gadget serial communications line causes >> modprobe to enter uninterruptable sleep, leaving the >> system in an unstable state. >>

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-08 Thread Greg KH
On Thu, Oct 09, 2014 at 11:23:59AM +1100, Andre Wolokita wrote: > Issuing a modprobe -r g_serial command to the target > over the gadget serial communications line causes > modprobe to enter uninterruptable sleep, leaving the > system in an unstable state. > > The associated tty_port.count won't d

Re: [PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-08 Thread Felipe Balbi
Hi, On Thu, Oct 09, 2014 at 11:23:59AM +1100, Andre Wolokita wrote: > Issuing a modprobe -r g_serial command to the target > over the gadget serial communications line causes > modprobe to enter uninterruptable sleep, leaving the > system in an unstable state. does anybody know if this is a valid

[PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-08 Thread Andre Wolokita
Issuing a modprobe -r g_serial command to the target over the gadget serial communications line causes modprobe to enter uninterruptable sleep, leaving the system in an unstable state. The associated tty_port.count won't drop to 0 because the command is issued over the very line being removed. De

[PATCH] u_serial.c - Force destroy tty_port in gserial_free_port

2014-10-05 Thread Andre Wolokita
Issuing a modprobe -r g_serial command to the target over the gadget serial communications line causes modprobe to enter uninterruptable sleep, leaving the system in an unstable state. The associated tty_port.count won't drop to 0 because the command is issued over the very line being removed. De