Skip to content

Commit

Permalink
[IPV4]: multipath_wrandom.c GPF fixes
Browse files Browse the repository at this point in the history
multipath_wrandom needs to use GFP_ATOMIC.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed May 5, 2005
1 parent 3ef4e9a commit 60d5306
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/ipv4/multipath_wrandom.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static void wrandom_select_route(const struct flowi *flp,
multipath_comparekeys(&rt->fl, flp)) {
struct multipath_candidate* mpc =
(struct multipath_candidate*)
kmalloc(size_mpc, GFP_KERNEL);
kmalloc(size_mpc, GFP_ATOMIC);

if (!mpc)
return;
Expand Down Expand Up @@ -244,7 +244,7 @@ static void wrandom_set_nhinfo(__u32 network,
if (!target_route) {
const size_t size_rt = sizeof(struct multipath_route);
target_route = (struct multipath_route *)
kmalloc(size_rt, GFP_KERNEL);
kmalloc(size_rt, GFP_ATOMIC);

target_route->gw = nh->nh_gw;
target_route->oif = nh->nh_oif;
Expand All @@ -265,7 +265,7 @@ static void wrandom_set_nhinfo(__u32 network,
if (!target_dest) {
const size_t size_dst = sizeof(struct multipath_dest);
target_dest = (struct multipath_dest*)
kmalloc(size_dst, GFP_KERNEL);
kmalloc(size_dst, GFP_ATOMIC);

target_dest->nh_info = nh;
target_dest->network = network;
Expand Down

0 comments on commit 60d5306

Please sign in to comment.