aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/net/lcs.c10
-rw-r--r--drivers/s390/net/qeth_l3_main.c11
2 files changed, 12 insertions, 9 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);
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 74d1401a5d5e..65291db324f5 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1796,7 +1796,8 @@ static void qeth_l3_add_mc(struct qeth_card *card, struct in_device *in4_dev)
1796 char buf[MAX_ADDR_LEN]; 1796 char buf[MAX_ADDR_LEN];
1797 1797
1798 QETH_CARD_TEXT(card, 4, "addmc"); 1798 QETH_CARD_TEXT(card, 4, "addmc");
1799 for (im4 = in4_dev->mc_list; im4; im4 = im4->next) { 1799 for (im4 = rcu_dereference(in4_dev->mc_list); im4 != NULL;
1800 im4 = rcu_dereference(im4->next_rcu)) {
1800 qeth_l3_get_mac_for_ipm(im4->multiaddr, buf, in4_dev->dev); 1801 qeth_l3_get_mac_for_ipm(im4->multiaddr, buf, in4_dev->dev);
1801 ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV4); 1802 ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV4);
1802 if (!ipm) 1803 if (!ipm)
@@ -1828,9 +1829,9 @@ static void qeth_l3_add_vlan_mc(struct qeth_card *card)
1828 in_dev = in_dev_get(netdev); 1829 in_dev = in_dev_get(netdev);
1829 if (!in_dev) 1830 if (!in_dev)
1830 continue; 1831 continue;
1831 read_lock(&in_dev->mc_list_lock); 1832 rcu_read_lock();
1832 qeth_l3_add_mc(card, in_dev); 1833 qeth_l3_add_mc(card, in_dev);
1833 read_unlock(&in_dev->mc_list_lock); 1834 rcu_read_unlock();
1834 in_dev_put(in_dev); 1835 in_dev_put(in_dev);
1835 } 1836 }
1836} 1837}
@@ -1843,10 +1844,10 @@ static void qeth_l3_add_multicast_ipv4(struct qeth_card *card)
1843 in4_dev = in_dev_get(card->dev); 1844 in4_dev = in_dev_get(card->dev);
1844 if (in4_dev == NULL) 1845 if (in4_dev == NULL)
1845 return; 1846 return;
1846 read_lock(&in4_dev->mc_list_lock); 1847 rcu_read_lock();
1847 qeth_l3_add_mc(card, in4_dev); 1848 qeth_l3_add_mc(card, in4_dev);
1848 qeth_l3_add_vlan_mc(card); 1849 qeth_l3_add_vlan_mc(card);
1849 read_unlock(&in4_dev->mc_list_lock); 1850 rcu_read_unlock();
1850 in_dev_put(in4_dev); 1851 in_dev_put(in4_dev);
1851} 1852}
1852 1853