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>
This commit is contained in:
parent
e830baa9c3
commit
016930b88a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue