netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bernard Pidoux <bernard.pidoux@upmc.fr>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, ralf@linux-mips.org, linux-hams@vger.kernel.org
Subject: Re: [PATCH]: Kill spurious sk->sk_socket NULL assignments in netrom.
Date: Tue, 17 Jun 2008 15:58:59 +0200	[thread overview]
Message-ID: <4857C323.5040402@upmc.fr> (raw)
In-Reply-To: <20080617.032409.216520881.davem@davemloft.net>

David,

All patches applied and running.
Thanks.

Bernard, f6bvp


David Miller wrote:
> 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@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
> @@ -536,11 +536,9 @@ 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;
>  	}
>  

      reply	other threads:[~2008-06-17 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 10:24 [PATCH]: Kill spurious sk->sk_socket NULL assignments in netrom David Miller
2008-06-17 13:58 ` Bernard Pidoux [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4857C323.5040402@upmc.fr \
    --to=bernard.pidoux@upmc.fr \
    --cc=davem@davemloft.net \
    --cc=linux-hams@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).