Re: Suspected sock_sendmsg() with MSG_DONTWAIT can block bug.

From: Andi Kleen
Date: Tue Feb 24 2009 - 10:56:24 EST


Parav Pandit <paravpandit@xxxxxxxxx> writes:

> Short quick question:
> ---------------------
> If sock_sendmsg() is calls with MSG_DONTWAIT, it should send the packet without blocking the context or fail the call with error value.

It is allowed to fail with errors.

> Which means sock_sendmsg() with MSG_DONTWAIT can be called from soft-irq/ interrupt ctx.
> Is that correct?

No. It can still block for memory for example. Also there's no irq locking
in place Irq context is not allowed. MSG_DONTWAIT just means don't block
on buffer space or connection finish.

-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/