aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/lcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/lcs.c')
-rw-r--r--drivers/s390/net/lcs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 0f19d540b655..c9f13b9ea339 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -1188,7 +1188,8 @@ lcs_remove_mc_addresses(struct lcs_card *card, struct in_device *in4_dev)
1188 spin_lock_irqsave(&card->ipm_lock, flags); 1188 spin_lock_irqsave(&card->ipm_lock, flags);
1189 list_for_each(l, &card->ipm_list) { 1189 list_for_each(l, &card->ipm_list) {
1190 ipm = list_entry(l, struct lcs_ipm_list, list); 1190 ipm = list_entry(l, struct lcs_ipm_list, list);
1191 for (im4 = in4_dev->mc_list; im4 != NULL; im4 = im4->next) { 1191 for (im4 = rcu_dereference(in4_dev->mc_list);
1192 im4 != NULL; im4 = rcu_dereference(im4->next_rcu)) {
1192 lcs_get_mac_for_ipm(im4->multiaddr, buf, card->dev); 1193 lcs_get_mac_for_ipm(im4->multiaddr, buf, card->dev);
1193 if ( (ipm->ipm.ip_addr == im4->multiaddr) && 1194 if ( (ipm->ipm.ip_addr == im4->multiaddr) &&
1194 (memcmp(buf, &ipm->ipm.mac_addr, 1195 (memcmp(buf, &ipm->ipm.mac_addr,
@@ -1233,7 +1234,8 @@ lcs_set_mc_addresses(struct lcs_card *card, struct in_device *in4_dev)
1233 unsigned long flags; 1234 unsigned long flags;
1234 1235
1235 LCS_DBF_TEXT(4, trace, "setmclst"); 1236 LCS_DBF_TEXT(4, trace, "setmclst");
1236 for (im4 = in4_dev->mc_list; im4; im4 = im4->next) { 1237 for (im4 = rcu_dereference(in4_dev->mc_list); im4 != NULL;
1238 im4 = rcu_dereference(im4->next_rcu)) {
1237 lcs_get_mac_for_ipm(im4->multiaddr, buf, card->dev); 1239 lcs_get_mac_for_ipm(im4->multiaddr, buf, card->dev);
1238 ipm = lcs_check_addr_entry(card, im4, buf); 1240 ipm = lcs_check_addr_entry(card, im4, buf);
1239 if (ipm != NULL) 1241 if (ipm != NULL)
@@ -1269,10 +1271,10 @@ lcs_register_mc_addresses(void *data)
1269 in4_dev = in_dev_get(card->dev); 1271 in4_dev = in_dev_get(card->dev);
1270 if (in4_dev == NULL) 1272 if (in4_dev == NULL)
1271 goto out; 1273 goto out;
1272 read_lock(&in4_dev->mc_list_lock); 1274 rcu_read_lock();
1273 lcs_remove_mc_addresses(card,in4_dev); 1275 lcs_remove_mc_addresses(card,in4_dev);
1274 lcs_set_mc_addresses(card, in4_dev); 1276 lcs_set_mc_addresses(card, in4_dev);
1275 read_unlock(&in4_dev->mc_list_lock); 1277 rcu_read_unlock();
1276 in_dev_put(in4_dev); 1278 in_dev_put(in4_dev);
1277 1279
1278 netif_carrier_off(card->dev); 1280 netif_carrier_off(card->dev);