[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080408.030841.66945263.davem@davemloft.net>
Date: Tue, 08 Apr 2008 03:08:41 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: yoshfuji@...ux-ipv6.org
Cc: netdev@...r.kernel.org, fred.l.templin@...ing.com
Subject: Re: [RFC net-2.6.26] [IPV6] SIT: ISATAP Updates.
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@...ux-ipv6.org>
Date: Thu, 03 Apr 2008 11:38:11 +0900 (JST)
> This updates ISATAP implementation in Linux kernel
> based on the update from Templin, Fred L <fred.l.templin@...ing.com>.
>
> One big question is the "dump" support (4th commit).
> Since we cannot use copy_to_user family inside the lock,
> nasty kcalloc() is used inside the lock so far...
>
> Patches are also available at
> git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-dev.git net-2.6.26-isatap-20080403
I think this is fine and I've pulled it into net-2.6.26
About the kcalloc() code, what you could do is add a mutex
that is held across these changes. Use it to augment the
rwlock, not to replace it.
So you're grab it around calls to ipip6_tunnel_{link,unlink}(),
ipip6_tunnel_{add,del}_prl(), and the piece of code in
ipip6_tunnel_uninit() that sets tunnels_wc[0] to NULL.
Then you also take this mutex around the dump code, so
you don't need to do the kcalloc() stuff.
You might be tempted to hold the mutex across all of
ipip6_tunnel_uninit(), but it may not be safe to hold
it across the dev_put(). Although I cannot prove it,
it might be possible for that to end up calling back
into some of these paths. Better safe than sorry.
:-)
--
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