summaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup-rwstat.c
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2020-09-23 10:36:56 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-23 12:07:54 -0700
commitf3380b1edc1dd06d874227570a5fe0fbf50eb607 (patch)
tree8df096b76fe9a3caa4e2f196619deac3fcc815bc /block/blk-cgroup-rwstat.c
parentab29c480b19465a5174ea8eddfa1bd42becf72c9 (diff)
downloadlinux-f3380b1edc1dd06d874227570a5fe0fbf50eb607.tar.gz
linux-f3380b1edc1dd06d874227570a5fe0fbf50eb607.tar.bz2
linux-f3380b1edc1dd06d874227570a5fe0fbf50eb607.zip
s390/qeth: tighten ucast IP locking
The programming of ucast IPs via qeth_l3_modify_ip() is driven independently from any of our typical locking mechanisms (eg. detaching the netdevice, or holding the conf_mutex). So when we inspect the card state to check whether the required cmd IO should be deferred, there is no protection against concurrent state changes. But by slightly re-ordering the teardown sequence, we can rely on the ip_lock to sufficiently serialize things: 1. when running concurrently to qeth_l3_set_online(), any instance of qeth_l3_modify_ip() that aquires the ip_lock _after_ qeth_l3_recover_ip() will observe the state as CARD_STATE_SOFTSETUP and not defer the IO. 2. when running concurrently to qeth_l3_set_offline(), any instance of qeth_l3_modify_ip() that aquires the ip_lock _after_ qeth_l3_clear_ip_htable() will observe the state as CARD_STATE_DOWN and defer the IO. These guarantees in mind, we can now drop the conf_mutex from the qeth_l3_modify_rxip_vipa() wrapper. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'block/blk-cgroup-rwstat.c')
0 files changed, 0 insertions, 0 deletions