diff options
author | Ursula Braun <ubraun@linux.vnet.ibm.com> | 2016-09-15 14:39:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-16 04:29:13 -0400 |
commit | 016930b88a1d6eb6e6b3287d593e13ca06986acc (patch) | |
tree | a8c3d3d737727e8825e3e8aafe16b026cac3f5de | |
parent | e830baa9c3f0023769ba9aab19eb44c892769d87 (diff) | |
download | op-kernel-dev-016930b88a1d6eb6e6b3287d593e13ca06986acc.zip op-kernel-dev-016930b88a1d6eb6e6b3287d593e13ca06986acc.tar.gz |
s390/qeth: use ip_lock for hsuid configuration
qeth_l3_dev_hsuid_store() changes the ip hash table, which
requires the ip_lock.
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/s390/net/qeth_l3_sys.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index 65645b1..0e00a5c 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c @@ -297,7 +297,9 @@ static ssize_t qeth_l3_dev_hsuid_store(struct device *dev, addr->u.a6.pfxlen = 0; addr->type = QETH_IP_TYPE_NORMAL; + spin_lock_bh(&card->ip_lock); qeth_l3_delete_ip(card, addr); + spin_unlock_bh(&card->ip_lock); kfree(addr); } @@ -329,7 +331,10 @@ static ssize_t qeth_l3_dev_hsuid_store(struct device *dev, addr->type = QETH_IP_TYPE_NORMAL; } else return -ENOMEM; + + spin_lock_bh(&card->ip_lock); qeth_l3_add_ip(card, addr); + spin_unlock_bh(&card->ip_lock); kfree(addr); return count; |