aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/multipath_wrandom.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/multipath_wrandom.c')
-rw-r--r--net/ipv4/multipath_wrandom.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c
index 10b23e1bece6..bd7d75b6abe0 100644
--- a/net/ipv4/multipath_wrandom.c
+++ b/net/ipv4/multipath_wrandom.c
@@ -31,6 +31,7 @@
31#include <linux/igmp.h> 31#include <linux/igmp.h>
32#include <linux/proc_fs.h> 32#include <linux/proc_fs.h>
33#include <linux/seq_file.h> 33#include <linux/seq_file.h>
34#include <linux/module.h>
34#include <linux/mroute.h> 35#include <linux/mroute.h>
35#include <linux/init.h> 36#include <linux/init.h>
36#include <net/ip.h> 37#include <net/ip.h>
@@ -172,7 +173,7 @@ static void wrandom_select_route(const struct flowi *flp,
172 multipath_comparekeys(&rt->fl, flp)) { 173 multipath_comparekeys(&rt->fl, flp)) {
173 struct multipath_candidate* mpc = 174 struct multipath_candidate* mpc =
174 (struct multipath_candidate*) 175 (struct multipath_candidate*)
175 kmalloc(size_mpc, GFP_KERNEL); 176 kmalloc(size_mpc, GFP_ATOMIC);
176 177
177 if (!mpc) 178 if (!mpc)
178 return; 179 return;
@@ -244,7 +245,7 @@ static void wrandom_set_nhinfo(__u32 network,
244 if (!target_route) { 245 if (!target_route) {
245 const size_t size_rt = sizeof(struct multipath_route); 246 const size_t size_rt = sizeof(struct multipath_route);
246 target_route = (struct multipath_route *) 247 target_route = (struct multipath_route *)
247 kmalloc(size_rt, GFP_KERNEL); 248 kmalloc(size_rt, GFP_ATOMIC);
248 249
249 target_route->gw = nh->nh_gw; 250 target_route->gw = nh->nh_gw;
250 target_route->oif = nh->nh_oif; 251 target_route->oif = nh->nh_oif;
@@ -265,7 +266,7 @@ static void wrandom_set_nhinfo(__u32 network,
265 if (!target_dest) { 266 if (!target_dest) {
266 const size_t size_dst = sizeof(struct multipath_dest); 267 const size_t size_dst = sizeof(struct multipath_dest);
267 target_dest = (struct multipath_dest*) 268 target_dest = (struct multipath_dest*)
268 kmalloc(size_dst, GFP_KERNEL); 269 kmalloc(size_dst, GFP_ATOMIC);
269 270
270 target_dest->nh_info = nh; 271 target_dest->nh_info = nh;
271 target_dest->network = network; 272 target_dest->network = network;
@@ -342,3 +343,4 @@ static void __exit wrandom_exit(void)
342 343
343module_init(wrandom_init); 344module_init(wrandom_init);
344module_exit(wrandom_exit); 345module_exit(wrandom_exit);
346MODULE_LICENSE("GPL");