<div dir="ltr"><div>Thanks a lot you were right. The worse is I had setup a timer to test that function but this is the timer which creates a sotfirq and thus the stack trace. I've removed it and it works ok.<br><br></div>
Thank you.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 2, 2013 at 10:11 AM, Thomas Graf <span dir="ltr"><<a href="mailto:tgraf@suug.ch" target="_blank">tgraf@suug.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 04/01/13 at 07:09pm, Teto wrote:<br>
> and caused by the following code. The family and ops are correctly<br>
> registered, I've created the multicast group beforehand. It seems it does<br>
> work when there is a client registered in this multicast group but if there<br>
> isn't any client, it returns -3. The return code is fine with me but I<br>
> don't understand why there is this stack trace though.<br>
><br>
><br>
> /**<br>
> send the request<br>
> **/<br>
> int send_request_for_eid(u32 eid)<br>
> {<br>
> //!<br>
> struct sk_buff *skb;<br>
> int rc = 0;<br>
> void *msg_head;<br>
><br>
> printk( "sending request for eid %u.%u.%u.%u.\n", NIPQUAD(eid) );<br>
><br>
><br>
> /* send a message back*/<br>
> /* allocate some memory, since the size is not yet known use<br>
> NLMSG_GOODSIZE*/<br>
> skb = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);<br>
<br>
</div>Looks like you are calling this function in (sw) interrupt context.<br>
If you do that you will have to pass GFP_ATOMIC into genlmsg_new()<br>
just like you would have to with kmalloc()<br>
<br>
Sames goes for genlmsg_multicast() below.<br>
<br>
If somehow doable I would advice you to create a worker though<br>
and send your messages from there.<br>
</blockquote></div><br></div>