Skip to content

Commit e1db8c2

Browse files
michichanguy11
authored andcommitted
ice: lag: in RCU, use atomic allocation
Sleeping is not allowed in RCU read-side critical sections. Use atomic allocations under rcu_read_lock. Fixes: 1e0f988 ("ice: Flesh out implementation of support for SRIOV on bonded interface") Fixes: 41ccedf ("ice: implement lag netdev event handler") Fixes: 3579aa8 ("ice: update reset path for SRIOV LAG support") Signed-off-by: Michal Schmidt <[email protected]> Reviewed-by: Wojciech Drewek <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 3e39da4 commit e1db8c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/intel/ice/ice_lag.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ void ice_lag_move_new_vf_nodes(struct ice_vf *vf)
628628
INIT_LIST_HEAD(&ndlist.node);
629629
rcu_read_lock();
630630
for_each_netdev_in_bond_rcu(lag->upper_netdev, tmp_nd) {
631-
nl = kzalloc(sizeof(*nl), GFP_KERNEL);
631+
nl = kzalloc(sizeof(*nl), GFP_ATOMIC);
632632
if (!nl)
633633
break;
634634

@@ -1692,7 +1692,7 @@ ice_lag_event_handler(struct notifier_block *notif_blk, unsigned long event,
16921692

16931693
rcu_read_lock();
16941694
for_each_netdev_in_bond_rcu(upper_netdev, tmp_nd) {
1695-
nd_list = kzalloc(sizeof(*nd_list), GFP_KERNEL);
1695+
nd_list = kzalloc(sizeof(*nd_list), GFP_ATOMIC);
16961696
if (!nd_list)
16971697
break;
16981698

@@ -2069,7 +2069,7 @@ void ice_lag_rebuild(struct ice_pf *pf)
20692069
INIT_LIST_HEAD(&ndlist.node);
20702070
rcu_read_lock();
20712071
for_each_netdev_in_bond_rcu(lag->upper_netdev, tmp_nd) {
2072-
nl = kzalloc(sizeof(*nl), GFP_KERNEL);
2072+
nl = kzalloc(sizeof(*nl), GFP_ATOMIC);
20732073
if (!nl)
20742074
break;
20752075

0 commit comments

Comments
 (0)