Hi! On 13:09 Mon 23 Aug , Michael Griepentrog wrote: > 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)? The usual way to do this is via workqueues: You can schedule a work atomically and the function will called with interrupts enabled later. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ