On Tue, Apr 05, 2005 at 10:55:01PM -0700, Dmitry Yusupov wrote:
>
> main reason for this is to have clear way to notify netlink user that
> new socket created and bound.
Why do you want to exclude sockets that listen to multicast
messages? They can still do unicast transactions.
> one reason is for consistency with sock interface. sk_allocation is
> equal to GFP_KERNEL by default, so nothing changed. but. in some cases
> application might require non-blocking kmalloc behavior. one real life
> example is networking block device used for swap partition. this way any
> GFP_KERENL allocation on recovery path might lead to deadlock condition.
Setting of sk_allocation is controlled by the protocol itself. In this
case this is af_netlink.c. As you can see, we never set this to anything
other than GFP_KERNEL.
Using sk_allocation will only confuse those who are not familiar with
netlink into thinking that this can be atomic.
Cheers,
--
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
|