Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] bluetooth/rfcomm: fix ODEBUG bug in rfcomm_dev_ioctl
@ 2020-03-07 13:58 Qiujun Huang
  2020-03-07 14:04 ` 黄秋钧
  2020-03-08  8:18 ` Marcel Holtmann
  0 siblings, 2 replies; 4+ messages in thread
From: Qiujun Huang @ 2020-03-07 13:58 UTC (permalink / raw)
  To: marcel
  Cc: johan.hedberg, davem, kuba, linux-bluetooth, netdev, linux-kernel,
	Qiujun Huang

Needn't call 'rfcomm_dlc_put' here, because 'rfcomm_dlc_exists' didn't
increase dlc->refcnt.

Reported-by: syzbot+4496e82090657320efc6@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
---
 net/bluetooth/rfcomm/tty.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 0c7d31c..ea2a1df0 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -414,7 +414,6 @@ static int __rfcomm_create_dev(struct sock *sk, void __user *arg)
 		if (IS_ERR(dlc))
 			return PTR_ERR(dlc);
 		else if (dlc) {
-			rfcomm_dlc_put(dlc);
 			return -EBUSY;
 		}
 		dlc = rfcomm_dlc_alloc(GFP_KERNEL);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-08  8:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-07 13:58 [PATCH] bluetooth/rfcomm: fix ODEBUG bug in rfcomm_dev_ioctl Qiujun Huang
2020-03-07 14:04 ` 黄秋钧
2020-03-08  8:18 ` Marcel Holtmann
2020-03-08  8:27   ` Qiujun Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox