summaryrefslogtreecommitdiffstats
path: root/kernel/capability.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-06-17 11:20:54 +0200
committerDavid S. Miller <davem@davemloft.net>2008-06-17 11:20:54 +0200
commit9375cb8a1232d2a15fe34bec4d3474872e02faec (patch)
tree167c2e82c29b84b3179f1713bd1e78bdc5f3009c /kernel/capability.c
parentllc: Use sock_graft() instead of by-hand version. (diff)
downloadlinux-9375cb8a1232d2a15fe34bec4d3474872e02faec.tar.xz
linux-9375cb8a1232d2a15fe34bec4d3474872e02faec.zip
ax25: Use sock_graft() and remove bogus sk_socket and sk_sleep init.
The way that listening sockets work in ax25 is that the packet input code path creates new socks via ax25_make_new() and attaches them to the incoming SKB. This SKB gets queued up into the listening socket's receive queue. When accept()'d the sock gets hooked up to the real parent socket. Alternatively, if the listening socket is closed and released, any unborn socks stuff up in the receive queue get released. So during this time period these sockets are unreachable in any other way, so no wakeup events nor references to their ->sk_socket and ->sk_sleep members can occur. And even if they do, all such paths have to make NULL checks. So do not deceptively initialize them in ax25_make_new() to the values in the listening socket. Leave them at NULL. Finally, use sock_graft() in ax25_accept(). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/capability.c')
0 files changed, 0 insertions, 0 deletions