jamal wrote:
> On Mon, 2006-06-03 at 14:20 +0100, Patrick McHardy wrote:
> 
> 
>>[XFRM]: Fix aevent related crash
>>
>>When xfrm_user isn't loaded xfrm_nl is NULL, which makes IPsec crash because
>>xfrm_aevent_is_on passes the NULL pointer to netlink_has_listeners as socket.
> 
> 
> For the above wouldnt it be better to just have an
> ifdef XFRM_USER then you call the current code
> and in the case when it is not compiled to always return 0?
> I guess the question is how much overhead does the rcu code add (since
> this is done per packet)

xfrm_user can be a module, so an ifdef won't help. The rcu_dereference
doesn't cost anything except on alpha. We could reduce the overhead a
bit more by avoiding the rcu_read_lock/rcu_read_unlock, the code is
AFAICT only called from the xfrm output functions, which already have
preemption disabled in xfrm[46]_output. But I'm always a bit reluctant
to do things like that, it makes it harder to understand and is sure to
be forgotten when the surrounding code changes.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to