Re: [PATCH v2 net] nfc: close a race condition in llcp_sock_getname()

2016-02-24 Thread Samuel Ortiz
Hi Cong, On Fri, Jan 29, 2016 at 11:37:40AM -0800, Cong Wang wrote: > llcp_sock_getname() checks llcp_sock->dev to make sure > llcp_sock is already connected or bound, however, we could > be in the middle of llcp_sock_bind() where llcp_sock->dev > is bound and llcp_sock->service_name_len is set,

Re: [PATCH v2 net] nfc: close a race condition in llcp_sock_getname()

2016-02-24 Thread Cong Wang
On Fri, Jan 29, 2016 at 11:37 AM, Cong Wang wrote: > llcp_sock_getname() checks llcp_sock->dev to make sure > llcp_sock is already connected or bound, however, we could > be in the middle of llcp_sock_bind() where llcp_sock->dev > is bound and llcp_sock->service_name_len

[PATCH v2 net] nfc: close a race condition in llcp_sock_getname()

2016-01-29 Thread Cong Wang
llcp_sock_getname() checks llcp_sock->dev to make sure llcp_sock is already connected or bound, however, we could be in the middle of llcp_sock_bind() where llcp_sock->dev is bound and llcp_sock->service_name_len is set, but llcp_sock->service_name is not, in this case we would lead to copy some