Re: [PATCH] USB: console: fix potential use after free

2015-02-15 Thread Ben Hutchings
On Wed, 2015-02-11 at 14:55 +0800, Johan Hovold wrote: On Tue, Feb 10, 2015 at 08:39:26PM +, Ben Hutchings wrote: On Mon, 2015-01-05 at 16:04 +0100, Johan Hovold wrote: Use tty kref to release the fake tty in usb_console_setup to avoid use after free if the underlying serial driver

Re: [PATCH] USB: console: fix potential use after free

2015-02-15 Thread Johan Hovold
On Mon, Feb 16, 2015 at 03:49:17AM +, Ben Hutchings wrote: On Wed, 2015-02-11 at 14:55 +0800, Johan Hovold wrote: On Tue, Feb 10, 2015 at 08:39:26PM +, Ben Hutchings wrote: On Mon, 2015-01-05 at 16:04 +0100, Johan Hovold wrote: Use tty kref to release the fake tty in

Re: [PATCH] USB: console: fix potential use after free

2015-02-10 Thread Ben Hutchings
On Mon, 2015-01-05 at 16:04 +0100, Johan Hovold wrote: Use tty kref to release the fake tty in usb_console_setup to avoid use after free if the underlying serial driver has acquired a reference. Note that using the tty destructor release_one_tty requires some more state to be initialised.

Re: [PATCH] USB: console: fix potential use after free

2015-02-10 Thread Johan Hovold
On Tue, Feb 10, 2015 at 08:39:26PM +, Ben Hutchings wrote: On Mon, 2015-01-05 at 16:04 +0100, Johan Hovold wrote: Use tty kref to release the fake tty in usb_console_setup to avoid use after free if the underlying serial driver has acquired a reference. Note that using the tty