Re: sleeping function called from invalid context in slab.c and sock.c (long,code,stacktrace)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

>> We are sending ICMP echo requests inside an iptables module.
>> The 'match' function of the module invokes the 'send_probe' method,
>> which sends the ICMP echo request over a socket, that we
>> keep reusing for that purpose.
>> Developing in User Mode Linux we get the following
>> "sleeping function called from invalid context" warning
>> everytime the ICMP paket is send, still the module works and
>> continues to do so.
>
> Looking from stack trace, I have a pretty good guess that it is 
> sock_create_kern() that cause the trouble.
> 
> The solution is, if you really need to create a socket, somehow creates 
> the socket outside the iptables matching/filtering context.
We moved the creation of the socket outside of the match() function
into the init() area of the module. And the warning for that vanished as
was to be expected.
Thanks for the help there.

But the warning that appears everytime kernel_sendmsg() is invoked
still remains.

Therefore we tried to move the transmission of the ICMP echo requests
into an iptables target module, hoping that this will change context of
the call, but it did not.

Unfortunately, this is the only solution to sending ICMP echo requests
from inside the kernel that we came up with. We still can't manage to
alter an existing UDP sk_buff for use in
icmp_send(skbuff, ICMP_ECHO, 0, 0), it always segfaults.


What problems are to be expected if we deploy with the existing sleep
bug (the module seems to keep running fine)?

Is this only important for SMP and multicore systems (which the
system we deploy on might not necessarily be)?

Thanks for any help,

Helmut


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux