Re: [PATCH] bluetooth:Fix locking issues in the function l2cap_connect_cfm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nicholas,

On Mon, Aug 24, 2015, Nicholas Krause wrote:
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -7285,6 +7285,7 @@ static void l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
>  		struct l2cap_chan *chan, *next;
>  
>  		/* Client fixed channels should override server ones */
> +		mutex_lock(&conn->chan_lock);
>  		if (__l2cap_get_chan_by_dcid(conn, pchan->scid))
>  			goto next;
>  
> @@ -7301,6 +7302,7 @@ static void l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
>  
>  		l2cap_chan_unlock(pchan);
>  next:
> +		mutex_lock(&conn->chan_lock);

Shouldn't this be unlock? Btw, It'd be easier to trac the revisions of
your patches if you versioned them properly, e.g. in this case with
"[PATCH v2} Bluetooth: ...".

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux