Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 016930b8 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller
Browse files

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: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e830baa9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;