]> nv-tegra.nvidia Code Review - linux-2.6.git/commit
[PATCH] s390: set online race in the lcs driver
authorFrank Pavlic <pavlic@de.ibm.com>
Thu, 12 May 2005 18:35:57 +0000 (20:35 +0200)
committerJeff Garzik <jgarzik@pobox.com>
Sun, 15 May 2005 22:06:16 +0000 (18:06 -0400)
commitb5f9d55b64a5c7193f8965c90ba62244ea3180b2
tree8a2cb8b36047af6d4a228a24aa1c045a6ed1545c
parent109a260b66bfbab7ba9f985495791af21f910218
[PATCH] s390: set online race in the lcs driver

[patch 3/10] s390: set online race in the lcs driver.

From: Michael Holzheu <holzheu@de.ibm.com>

There is a race between lcs_stopcard() and lcs_open_device() which
can lead to the error 'lcs: Error in starting channel, rc=-16'.
lcs_open_device() is invoked when 'ifconfig up' is called due to a
hotplug event, which is caused by register_netdev(). In parallel
lcs_stopcard() is executed. Both functions are sending lcs commands.
The second invocation fails with -EBUSY (-16) as return value.
Move invocation of register_netdev() after invocation of lcs_stopcard
to avoid the race.

Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
drivers/s390/net/lcs.c