[Openswan dev]
Ankit Desai
ankit at elitecore.com
Thu Feb 16 11:29:17 CET 2006
> Oh, so the *purpose* of _grab() and _ungrab() is to take and release the
> lock.
>
> If you remove that, then there is no point.
yes as i said i just tried to remove the recursion in code. Other than that
as i understand the two functions ensures that the task is performed
uninterruptible.
> In my copy of the code, I do not agree that pfkey_remove_socket() is
> called with a lock.
pfkey_release takes lock "write_lock_bh(&pfkey_sock_lock)" and then calls
"pfkey_destroy_socket(sk)"
which in turn calls " pfkey_remove_socket(sk)", that is what i meant by
pfkey_remove_socket is called after taking lock.
so the best i could think was to implement the lock before
pfkey_insert_socket and remove the locking unlocking from of_grab() and
_ungrab().
Best would be to remove locking before remove_socket is called but i am very
much a newbie to understand the complexity and implications of that.
-- Ankit Desai
More information about the Dev
mailing list