Unverified Commit 6e2a5b5e authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!8497 Bluetooth: l2cap: fix null-ptr-deref in l2cap_chan_timeout

parents 623051c7 96024257
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -435,6 +435,9 @@ static void l2cap_chan_timeout(struct work_struct *work)

	BT_DBG("chan %p state %s", chan, state_to_string(chan->state));

	if (!conn)
		return;

	mutex_lock(&conn->chan_lock);
	/* __set_chan_timer() calls l2cap_chan_hold(chan) while scheduling
	 * this work. No need to call l2cap_chan_hold(chan) here again.