[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100526.005634.48509140.davem@davemloft.net>
Date: Wed, 26 May 2010 00:56:34 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: anton@...ba.org
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org
Subject: Re: Warning in net/ipv4/af_inet.c:154
From: Anton Blanchard <anton@...ba.org>
Date: Wed, 26 May 2010 13:19:43 +1000
> I notice we update sk_forward_alloc in sk_mem_charge and sk_mem_uncharge.
> Since it isn't an atomic variable I went looking for a lock somewhere in
> the call chain (first thought was the socket lock). I couldn't find
> anything, but I could easily be missing something.
We take the lock properly for all of the skb_queue_rcv_skb() cases
but this rule isn't followed properly for skb_queue_err_skb().
Eric, look at even things like skb_tstamp_tx(). Nothing locks the
socket in those cases, yet we dip down into sock_queue_err_skb() and
thus invoke skb_set_owner_r which goes into sk_mem_charge() and does
the non-atomic update on ->sk_forward_alloc.
I am sure there are other cases with this problem involving
sock_queue_err_skb()... ip_icmp_error() (via __udp4_lib_err()),
ipv6_icmp_error(), etc.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists