From: Max Krasnyansky <maxk@qualcomm.com>
To: "David S. Miller" <davem@redhat.com>
Cc: acme@conectiva.com.br, netdev@oss.sgi.com
Subject: Re: [PATCH] af_pppox: create module infrastructure for protocol modules
Date: 30 Apr 2003 11:11:37 -0700 [thread overview]
Message-ID: <1051726260.13512.59.camel@localhost.localdomain> (raw)
In-Reply-To: <20030429.192931.104061911.davem@redhat.com>
On Tue, 2003-04-29 at 19:29, David S. Miller wrote:
> From: Max Krasnyansky <maxk@qualcomm.com>
> Date: Tue, 29 Apr 2003 13:05:08 -0700
>
> - Why do we have to bump module refcount for 'struct sock' with
> _default_ callbacks ?
>
> Nothing says that just because a sock uses default callbacks, it can't
> be referenced in other ways by the implementation module, for example
> it can sit in the protocol hash tables and that by itself requires
> a module reference.
That's a good point. However this is protocol's local business.
Netcore does not use those hashes directly. Netcore only uses things
like sk->state, sk->lock, etc and callbacks. So the callback is the only
reference, from netcore's point of view, into the protocol module.
Most protocols that I've looked at unlink sk from its hashes in
proto_sock_release(struct socket *sock) so it's enough to make sure that
struct socket is accounted for.
And like I said before if protocol wants for some reason to be around
until sk is destroyed it will simply do sk_set_owner() right after
alloc_sk().
Max
next prev parent reply other threads:[~2003-04-30 18:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-29 6:12 [PATCH] af_pppox: create module infrastructure for protocol modules Arnaldo Carvalho de Melo
2003-04-29 5:27 ` David S. Miller
2003-04-29 6:46 ` YOSHIFUJI Hideaki / 吉藤英明
2003-04-29 6:00 ` David S. Miller
2003-04-29 7:12 ` Arnaldo Carvalho de Melo
2003-04-29 6:54 ` Arnaldo Carvalho de Melo
2003-04-29 6:00 ` David S. Miller
2003-04-29 20:05 ` Max Krasnyansky
2003-04-29 22:07 ` Arnaldo Carvalho de Melo
2003-04-30 0:43 ` Max Krasnyansky
2003-04-30 2:29 ` David S. Miller
2003-04-30 18:11 ` Max Krasnyansky [this message]
2003-05-01 9:20 ` David S. Miller
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=1051726260.13512.59.camel@localhost.localdomain \
--to=maxk@qualcomm.com \
--cc=acme@conectiva.com.br \
--cc=davem@redhat.com \
--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).