Then I tried:
...
spin_lock(&tx_d->lock);
sock_sendmsg(...);
spin_unlock(&tx_d->lock);
...
and I get no error messages anymore but now a nice person asked me if that's safe and I think it isn't because interrupts are on in work handlers or not?
It probably works as long as there is no code which locks this spinlock with interrupts disabled. But I recommend using a mutex instead, as it can sleeps. The spinlock does busy waiting... -Michi
Many Thanks and best regards, Lukas
-- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ