On Wed, May 11, 2005 at 08:07:51AM +1000, herbert wrote:
> On Tue, May 10, 2005 at 12:43:32PM +0000, Ken-ichirou MATSUZAWA wrote:
> >
> > Everytime on shutting down, the subject message is logged.
> > It seems that the reason is do_one_broadcast may preempt
> > netlink_recvmsg. Added patch to 2.6.12-rc4 seems resolving this
> > problem.
>
> Thanks for the patch. To help me understand the problem better,
> could you please tell me:
I think I understand your patch now. What's happening is that
1) The skb is sent to socket 1.
2) Someone does a recvmsg on socket 1 and drops the ref on the skb.
Note that the rmalloc is not returned at this point since the
skb is still referenced.
3) The same skb is now sent to socket 2.
I agree with your solution except that we should still do the skb_get
if we can. Here is my version where we only do the skb_get at the
start.
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Please let me know whether this works for you or not.
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
p
Description: Text document
|