* [NETLINK] Check netlink_insert in kernel_create
@ 2004-10-28 3:07 Herbert Xu
2004-10-28 4:44 ` David S. Miller
2004-10-28 4:45 ` David S. Miller
0 siblings, 2 replies; 5+ messages in thread
From: Herbert Xu @ 2004-10-28 3:07 UTC (permalink / raw)
To: David S. Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
Hi:
This patch checks the return value of netlink_insert() in
netlink_kernel_create(). It could fail if someone loads
the same module twice for instance.
Signed-off-by: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[-- Attachment #2: p --]
[-- Type: text/plain, Size: 364 bytes --]
===== net/netlink/af_netlink.c 1.57 vs edited =====
--- 1.57/net/netlink/af_netlink.c 2004-10-20 15:10:40 +10:00
+++ edited/net/netlink/af_netlink.c 2004-10-28 13:00:33 +10:00
@@ -876,7 +876,10 @@
if (input)
nlk_sk(sk)->data_ready = input;
- netlink_insert(sk, 0);
+ if (netlink_insert(sk, 0)) {
+ sock_release(sock);
+ return NULL;
+ }
return sk;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [NETLINK] Check netlink_insert in kernel_create
2004-10-28 3:07 [NETLINK] Check netlink_insert in kernel_create Herbert Xu
@ 2004-10-28 4:44 ` David S. Miller
2004-10-28 5:08 ` Herbert Xu
2004-10-28 4:45 ` David S. Miller
1 sibling, 1 reply; 5+ messages in thread
From: David S. Miller @ 2004-10-28 4:44 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev
On Thu, 28 Oct 2004 13:07:00 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Signed-off-by: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
^^^^^^^^^^
Hehe, what's that? :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [NETLINK] Check netlink_insert in kernel_create
2004-10-28 3:07 [NETLINK] Check netlink_insert in kernel_create Herbert Xu
2004-10-28 4:44 ` David S. Miller
@ 2004-10-28 4:45 ` David S. Miller
1 sibling, 0 replies; 5+ messages in thread
From: David S. Miller @ 2004-10-28 4:45 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev
On Thu, 28 Oct 2004 13:07:00 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> This patch checks the return value of netlink_insert() in
> netlink_kernel_create(). It could fail if someone loads
> the same module twice for instance.
>
> Signed-off-by: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [NETLINK] Check netlink_insert in kernel_create
2004-10-28 5:08 ` Herbert Xu
@ 2004-10-28 5:02 ` David S. Miller
0 siblings, 0 replies; 5+ messages in thread
From: David S. Miller @ 2004-10-28 5:02 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev
On Thu, 28 Oct 2004 15:08:37 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Wed, Oct 27, 2004 at 09:44:38PM -0700, David S. Miller wrote:
> > On Thu, 28 Oct 2004 13:07:00 +1000
> > Herbert Xu <herbert@gondor.apana.org.au> wrote:
> >
> > > Signed-off-by: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
> > ^^^^^^^^^^
> > Hehe, what's that? :-)
>
> That's my name in Chinese. Forgot to clip it out when I did the
> cut-n-paste from the signature :)
Oh, ok, xiexie :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [NETLINK] Check netlink_insert in kernel_create
2004-10-28 4:44 ` David S. Miller
@ 2004-10-28 5:08 ` Herbert Xu
2004-10-28 5:02 ` David S. Miller
0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2004-10-28 5:08 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
On Wed, Oct 27, 2004 at 09:44:38PM -0700, David S. Miller wrote:
> On Thu, 28 Oct 2004 13:07:00 +1000
> Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> > Signed-off-by: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
> ^^^^^^^^^^
> Hehe, what's that? :-)
That's my name in Chinese. Forgot to clip it out when I did the
cut-n-paste from the signature :)
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-28 5:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28 3:07 [NETLINK] Check netlink_insert in kernel_create Herbert Xu
2004-10-28 4:44 ` David S. Miller
2004-10-28 5:08 ` Herbert Xu
2004-10-28 5:02 ` David S. Miller
2004-10-28 4:45 ` David S. Miller
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).