Re: [RESEND PATCH] Bluetooth: Only mark socket zapped after unlocking

2020-09-13 Thread Marcel Holtmann
Hi Abhishek, > Since l2cap_sock_teardown_cb doesn't acquire the channel lock before > setting the socket as zapped, it could potentially race with > l2cap_sock_release which frees the socket. Thus, wait until the cleanup > is complete before marking the socket as zapped. > > This race was

[RESEND PATCH] Bluetooth: Only mark socket zapped after unlocking

2020-09-11 Thread Abhishek Pandit-Subedi
Since l2cap_sock_teardown_cb doesn't acquire the channel lock before setting the socket as zapped, it could potentially race with l2cap_sock_release which frees the socket. Thus, wait until the cleanup is complete before marking the socket as zapped. This race was reproduced on a JBL GO speaker

[PATCH] Bluetooth: Only mark socket zapped after unlocking

2020-08-15 Thread Abhishek Pandit-Subedi
Since l2cap_sock_teardown_cb doesn't acquire the channel lock before setting the socket as zapped, it could potentially race with l2cap_sock_release which frees the socket. Thus, wait until the cleanup is complete before marking the socket as zapped. This race was reproduced on a JBL GO speaker