netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: David Miller <davem@davemloft.net>
Cc: paulmck@us.ibm.com, netdev@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH 1/5] sock_create bad error return
Date: Thu, 10 Aug 2006 10:06:08 -0700	[thread overview]
Message-ID: <20060810100608.2737bee5@localhost.localdomain> (raw)
In-Reply-To: <20060809.204745.102463311.davem@davemloft.net>

On Wed, 09 Aug 2006 20:47:45 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: Stephen Hemminger <shemminger@osdl.org>
> Date: Wed, 09 Aug 2006 11:31:39 -0700
> 
> > If socket create call races with module unload, it correctly
> > fails the socket call but doesn't return an error. This race
> > is theoritical because the sock->ops are always the same and
> > non-modular.
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
> 
> I think the intention of the code is to return
> -EAFNOSUPPORT which is set explicitly some lines
> above, and this makes sense because if we can't grab
> onto the module reference count it means the module
> is in the process of being unloaded.

It is the module reference count of the socket file ops, not the
protocol family reference count.  The protocol family code is
already handled a few lines above.

Since the socket code can't be built as a module, it is a dead end. I think
in-olden-times the idea was that networking could be built as a module
so that inode ops would have to be ref counted.


  reply	other threads:[~2006-08-10 17:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09 18:31 [PATCH 0/5] net socket family patches Stephen Hemminger
2006-08-09 18:31 ` [PATCH 1/5] sock_create bad error return Stephen Hemminger
2006-08-10  3:47   ` David Miller
2006-08-10 17:06     ` Stephen Hemminger [this message]
2006-08-09 18:31 ` [PATCH 2/5] socket: code style cleanup Stephen Hemminger
2006-08-10  3:49   ` David Miller
2006-08-10  8:19   ` Andrew Morton
2006-08-10  8:55     ` David Miller
2006-08-09 18:31 ` [PATCH 3/5] net: drop unused elements from net_proto_family Stephen Hemminger
2006-08-10  3:50   ` David Miller
2006-08-09 18:31 ` [PATCH 4/5] net: socket family using RCU Stephen Hemminger
2006-08-10  4:00   ` David Miller
2006-08-10 18:36   ` Paul E. McKenney
2006-08-10 20:28     ` Stephen Hemminger
2006-08-11  0:46       ` Paul E. McKenney
2006-08-09 18:31 ` [PATCH 5/5] sock_register interface changes Stephen Hemminger
2006-08-10  4:03   ` David Miller
2006-08-10  0:06 ` [PATCH 0/5] net socket family patches David Miller
2006-08-10  5:36   ` Alexey Toptygin
2006-08-10 18:55     ` Randy.Dunlap

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=20060810100608.2737bee5@localhost.localdomain \
    --to=shemminger@osdl.org \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@us.ibm.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).