|
VK7AX > LINHAM 18.06.08 00:26l 56 Lines 1650 Bytes #999 (0) @ WW
BID : VK7AX-1806LQ
Read: GUEST
Subj: [PATCH]: Kill spurious sk->sk_socket NULL assignments in net
Path: IZ3LSV<I0TVL<DK0WUE<ON0BEL<VK7AX
Sent: 080617/2327Z @:VK7AX.#ULV.TAS.AUS.OC #:47479 [Ulverstone] FBB7.00g $:VK7A
From: VK7AX@VK7AX.#ULV.TAS.AUS.OC
To : LINHAM@WW
From: David Miller <davem(AT)davemloft.net>
Date: Tue, 17 Jun 2008 03:24:09 -0700 (PDT)
To: netdev(AT)vger.kernel.org
CC: ralf(AT)linux-mips.org, linux-hams(AT)vger.kernel.org
Both of these assignments are spurious, so we can delete them.
Applied and pushed out to net-next-2.6
netrom: Kill spurious NULL'ing of sk->sk_socket.
In nr_release(), one code path calls sock_orphan() which
will NULL out sk->sk_socket already.
In the other case, handling states other than NR_STATE_{0,1,2,3},
seems to not be possible other than due to bugs. Even for an
uninitialized nr->state value, that would be zero or NR_STATE_0.
It might be wise to stick a WARN_ON() here.
Signed-off-by: David S. Miller <davem(AT)davemloft.net>
---
net/netrom/af_netrom.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 5877962..74884f4 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
(AT)(AT) -536,11 +536,9 (AT)(AT) static int nr_release(struct socket *sock)
sk->sk_state_change(sk);
sock_orphan(sk);
sock_set_flag(sk, SOCK_DESTROY);
- sk->sk_socket = NULL;
break;
default:
- sk->sk_socket = NULL;
break;
}
-- 1.5.5.1.308.g1fbb5 --
*******************************************************************
ABOVE IS A CROSS POST TO THE PACKET RADIO NETWORK IN AN EFFORT TO
PROMOTE FURTHER INTEREST IN HAM SOFTWARE USING LINUX OPERATING
SYSTEMS AND PACKET RADIO
Courtesy Tony VK7AX VK7AX(AT)VK7AX.#ULV.TAS.AUS.OC
*******************************************************************
Read previous mail | Read next mail
| |