netdev
[Top] [All Lists]

Re: assertion (!atomic_read(&sk->sk_rmem_alloc)) failed at net/netlink/a

To: Tommy Christensen <tommy.christensen@xxxxxxxxx>
Subject: Re: assertion (!atomic_read(&sk->sk_rmem_alloc)) failed at net/netlink/af_netlink.c (122)
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 May 2005 20:42:29 +1000
Cc: Ken-ichirou MATSUZAWA <chamas@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>
In-reply-to: <1115891887.30106.89.camel@xxxxxxxxxxxxxxxxxxx>
References: <20050510.214332.-1300551106.chamas@xxxxxxxxxxxxx> <20050510220751.GA459@xxxxxxxxxxxxxxxxxxx> <20050511005836.GA1674@xxxxxxxxxxxxxxxxxxx> <4282846F.6070403@xxxxxxxxx> <20050511231751.GA21781@xxxxxxxxxxxxxxxxxxx> <1115891887.30106.89.camel@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
On Thu, May 12, 2005 at 11:58:07AM +0200, Tommy Christensen wrote:
> 
> Yes, I like this better.  Good idea.

I see that you've given up on the minimalism :)

> Signed-off-by: Tommy S. Christensen <tommy.christensen@xxxxxxxxx>

It looks good to me too except for that comment of yours :)

> diff -ru linux-2.6.12-rc4/net/netlink/af_netlink.c 
> linux-2.6.12-work/net/netlink/af_netlink.c
> --- linux-2.6.12-rc4/net/netlink/af_netlink.c 2005-05-11 11:10:20.000000000 
> +0200
> +++ linux-2.6.12-work/net/netlink/af_netlink.c        2005-05-12 
> 11:51:57.427312857 +0200
> @@ -735,11 +735,13 @@
>  
>       sock_hold(sk);
>       if (p->skb2 == NULL) {
> -             if (atomic_read(&p->skb->users) != 1) {
> +             if (skb_shared(p->skb)) {
>                       p->skb2 = skb_clone(p->skb, p->allocation);
>               } else {
> -                     p->skb2 = p->skb;
> -                     atomic_inc(&p->skb->users);
> +                     p->skb2 = skb_get(p->skb);
> +                     /* skb ownership may have been set when
> +                        delivered to a previous socket. */

For new comments please use the following style which is more standard
in the kernel these days:

/*
 * blah blah blah ....
 * for comments that don't fit on a single line.
 */

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>