> o.k., thus I need to implement an own function. Would it make sense
> to implement it inside the network core such that other protocols
> that want to migrate to lock_sock() locking can re-use it?
Well, you are the first who needs it. 8)
Probably. Actually, it is not very clear. Stateful protocols
(f.e. TCP) have their own wakeup predicates.
In fact, sock_alloc_send_skb() is typical example of wrong function:
it tries to satisfy everyone (f.e. fallback allocation is used only
by af_unix streams).