Hi,

I'm trying to send UDP packets from the kernel using sock_sendmsg(),
but it is possible for this to eventually call schedule(). The part of
the kernel I am working in expects to be executed atomically, so
calling sock_sendmsg() usually generates the error: "BUG: scheduling
while atomic". Is there any way to call sock_sendmsg() such that it
executes atomically (i.e., doesn't relinquish the CPU to the
scheduler)? It is not necessary to wait until the transmission is
complete, and setting the flag MSG_DONTWAIT does not solve this issue.
I tried looking for where the network stack returns -EIOCBQUEUED and
got as far as udp_sendmsg(), but it then becomes difficult to follow
the execution path (there's four goto labels in this function). Any
help would be appreciated.

Thanks,
Michael Griepentrog

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to