diff options
author | Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> | 2017-01-13 09:46:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-16 13:31:53 -0500 |
commit | 57d5f64d83ab5b5a5118b1597386dd76eaf4340d (patch) | |
tree | d0dbe9d1335b2835b42d78ebe2525a9b3f97c768 /net/tipc/link.c | |
parent | 34c55cf2fc75f8bf6ba87df321038c064cf2d426 (diff) |
tipc: allocate user memory with GFP_KERNEL flag
Until now, we allocate memory always with GFP_ATOMIC flag.
When the system is under memory pressure and a user tries to send,
the send fails due to low memory. However, the user application
can wait for free memory if we allocate it using GFP_KERNEL flag.
In this commit, we use allocate memory with GFP_KERNEL for all user
allocation.
Reported-by: Rune Torgersen <runet@innovsys.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index bda89bf9f4ff..4e8647aef01c 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -1395,7 +1395,7 @@ tnl: | |||
1395 | msg_set_seqno(hdr, seqno++); | 1395 | msg_set_seqno(hdr, seqno++); |
1396 | pktlen = msg_size(hdr); | 1396 | pktlen = msg_size(hdr); |
1397 | msg_set_size(&tnlhdr, pktlen + INT_H_SIZE); | 1397 | msg_set_size(&tnlhdr, pktlen + INT_H_SIZE); |
1398 | tnlskb = tipc_buf_acquire(pktlen + INT_H_SIZE); | 1398 | tnlskb = tipc_buf_acquire(pktlen + INT_H_SIZE, GFP_ATOMIC); |
1399 | if (!tnlskb) { | 1399 | if (!tnlskb) { |
1400 | pr_warn("%sunable to send packet\n", link_co_err); | 1400 | pr_warn("%sunable to send packet\n", link_co_err); |
1401 | return; | 1401 | return; |