Bug caused by multicast
Thomas Graf
tgraf at suug.ch
Tue Apr 2 04:11:50 EDT 2013
On 04/01/13 at 07:09pm, Teto wrote:
> and caused by the following code. The family and ops are correctly
> registered, I've created the multicast group beforehand. It seems it does
> work when there is a client registered in this multicast group but if there
> isn't any client, it returns -3. The return code is fine with me but I
> don't understand why there is this stack trace though.
>
>
> /**
> send the request
> **/
> int send_request_for_eid(u32 eid)
> {
> //!
> struct sk_buff *skb;
> int rc = 0;
> void *msg_head;
>
> printk( "sending request for eid %u.%u.%u.%u.\n", NIPQUAD(eid) );
>
>
> /* send a message back*/
> /* allocate some memory, since the size is not yet known use
> NLMSG_GOODSIZE*/
> skb = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
Looks like you are calling this function in (sw) interrupt context.
If you do that you will have to pass GFP_ATOMIC into genlmsg_new()
just like you would have to with kmalloc()
Sames goes for genlmsg_multicast() below.
If somehow doable I would advice you to create a worker though
and send your messages from there.
More information about the libnl
mailing list