netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: acme@conectiva.com.br
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] new module infrastructure for net_proto_family
Date: Sat, 19 Apr 2003 15:17:06 -0700 (PDT)	[thread overview]
Message-ID: <20030419.151706.86912986.davem@redhat.com> (raw)
In-Reply-To: <20030419161457.GA6164@conectiva.com.br>

   From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
   Date: Sat, 19 Apr 2003 13:14:57 -0300

Have a look at this:

   diff -Nru a/net/socket.c b/net/socket.c
   --- a/net/socket.c	Sat Apr 19 13:10:22 2003
   +++ b/net/socket.c	Sat Apr 19 13:10:22 2003
   @@ -506,8 +506,10 @@
     
    void sock_release(struct socket *sock)
    {
   -	if (sock->ops) 
   +	if (sock->ops) {
    		sock->ops->release(sock);
   +		module_put(net_families[sock->ops->family]->owner);
   +	}
    

Maybe you want to cache sock->ops->family before calling
sock->ops->release, maybe nobody does it but it could be
legal to NULL sock->ops during sock->ops->release()

If anything this code should NULL'ify it because any reference to
sock->ops after the release and module_put() is a BUG() that should be
trapped.

  reply	other threads:[~2003-04-19 22:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-19 16:14 [PATCH] new module infrastructure for net_proto_family Arnaldo Carvalho de Melo
2003-04-19 22:17 ` David S. Miller [this message]
2003-04-19 22:57   ` Arnaldo Carvalho de Melo

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=20030419.151706.86912986.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=acme@conectiva.com.br \
    --cc=netdev@oss.sgi.com \
    /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).