diff options
author | Amerigo Wang <amwang@redhat.com> | 2012-08-09 21:24:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-14 17:33:30 -0400 |
commit | 47be03a28cc6c80e3aa2b3e8ed6d960ff0c5c0af (patch) | |
tree | ba11046ff60d948cd4db06652e2483537387b3ca /include/linux/netpoll.h | |
parent | ddf343f635fe4440cad528e12f96f28bd50aa099 (diff) |
netpoll: use GFP_ATOMIC in slave_enable_netpoll() and __netpoll_setup()
slave_enable_netpoll() and __netpoll_setup() may be called
with read_lock() held, so should use GFP_ATOMIC to allocate
memory. Eric suggested to pass gfp flags to __netpoll_setup().
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r-- | include/linux/netpoll.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 28f5389c924b..bf2d51eec0f3 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -43,7 +43,7 @@ struct netpoll_info { | |||
43 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); | 43 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); |
44 | void netpoll_print_options(struct netpoll *np); | 44 | void netpoll_print_options(struct netpoll *np); |
45 | int netpoll_parse_options(struct netpoll *np, char *opt); | 45 | int netpoll_parse_options(struct netpoll *np, char *opt); |
46 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev); | 46 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev, gfp_t gfp); |
47 | int netpoll_setup(struct netpoll *np); | 47 | int netpoll_setup(struct netpoll *np); |
48 | int netpoll_trap(void); | 48 | int netpoll_trap(void); |
49 | void netpoll_set_trap(int trap); | 49 | void netpoll_set_trap(int trap); |