Re: [PATCH] tty: don't leak cdev in tty_cdev_add()

2015-09-08 Thread Richard Watts
On 07/09/15 14:08, Leon Yu wrote: Commit a3a10ce3429e ("Avoid usb reset crashes by making tty_io cdevs truly dynamic") which mixes using cdev_alloc() and cdev_init() is problematic. Subsequent call to cdev_init() after cdev_alloc() sets kobj release method from cdev_dynamic_release() to cdev_de

[PATCH] tty: don't leak cdev in tty_cdev_add()

2015-09-07 Thread Leon Yu
Commit a3a10ce3429e ("Avoid usb reset crashes by making tty_io cdevs truly dynamic") which mixes using cdev_alloc() and cdev_init() is problematic. Subsequent call to cdev_init() after cdev_alloc() sets kobj release method from cdev_dynamic_release() to cdev_default_release() and thus makes it impo