summaryrefslogtreecommitdiffstats
path: root/REPORTING-BUGS
diff options
context:
space:
mode:
authorLeon Yu2015-09-07 15:08:37 +0200
committerGreg Kroah-Hartman2015-10-04 19:51:42 +0200
commitc1a752ba2d6b8a52879c7ab637cff38359ea9827 (patch)
tree97a4090ddc27d70b3ca2c4b50941748395621a0e /REPORTING-BUGS
parentRevert "serial: imx: remove unbalanced clk_prepare" (diff)
downloadkernel-qcow2-linux-c1a752ba2d6b8a52879c7ab637cff38359ea9827.tar.gz
kernel-qcow2-linux-c1a752ba2d6b8a52879c7ab637cff38359ea9827.tar.xz
kernel-qcow2-linux-c1a752ba2d6b8a52879c7ab637cff38359ea9827.zip
tty: don't leak cdev in tty_cdev_add()
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 impossible to free allocated cdev. This patch also consolidates error path of cdev_add() as cdev can also leak here if things went wrong. Signed-off-by: Leon Yu <chianglungyu@gmail.com> Fixes: a3a10ce3429e ("Avoid usb reset crashes by making tty_io cdevs truly dynamic") Acked-by: Richard Watts <rrw@kynesim.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'REPORTING-BUGS')
0 files changed, 0 insertions, 0 deletions