bluetooth/rfcomm: fix ODEBUG bug in rfcomm_dev_ioctl
Subsystems (4)
PATCH v2 1/1 bluetooth/rfcomm: fix ODEBUG bug in rfcomm_dev_ioctl
Needn't call 'rfcomm_dlc_put' here, because 'rfcomm_dlc_exists' didn't increase dlc->refcnt.
Reported-by [email protected]
Signed-off-by Qiujun Huang <[email protected]>
Suggested-by Hillf Danton <[email protected]>
--- net/bluetooth/rfcomm/tty.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/bluetooth/rfcomm/tty.c +1 -3
@@ -413,10 +413,8 @@ static int __rfcomm_create_dev(struct sock *sk, void __user *arg) dlc =rfcomm_dlc_exists (&req.src, &req.dst, req.channel);if (IS_ERR (dlc))return PTR_ERR (dlc); -else if (dlc) { -rfcomm_dlc_put (dlc); +if (dlc)return -EBUSY ; - } dlc =rfcomm_dlc_alloc (GFP_KERNEL );if (!dlc)return -ENOMEM ;
Signature · 1 line
1.8.3.1
Marcel Holtmann
maintainerHi Qiujun,
Quoted 9 lines
Needn't call '
rfcomm_dlc_put' here, because 'rfcomm_dlc_exists' didn't increasedlc->refcnt.Reported-by [email protected]Signed-off-by Qiujun Huang <[email protected]>Suggested-by Hillf Danton <[email protected]>---
net/bluetooth/rfcomm/tty.c| 4 +---1 file changed, 1 insertion(+), 3 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel