]> git.baikalelectronics.ru Git - kernel.git/commit
af_iucv: Fix race when queuing incoming iucv messages
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Tue, 21 Apr 2009 06:04:24 +0000 (06:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2009 06:43:15 +0000 (23:43 -0700)
commit9dd588f2c363c7acb44b3ba570fbda627b60c2be
tree4c526871b0195570f9844e6e586611c1fa4731e8
parent94391287b9a9412fc7464966644e7c00836422b6
af_iucv: Fix race when queuing incoming iucv messages

AF_IUCV runs into a race when queuing incoming iucv messages
and receiving the resulting backlog.

If the Linux system is under pressure (high load or steal time),
the message queue grows up, but messages are not received and queued
onto the backlog queue. In that case, applications do not
receive any data with recvmsg() even if AF_IUCV puts incoming
messages onto the message queue.

The race can be avoided if the message queue spinlock in the
message_pending callback is spreaded across the entire callback
function.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/iucv/af_iucv.c