|
@@ -1832,7 +1832,7 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
|
|
/* Record the max length of recvmsg() calls for future allocations */
|
|
/* Record the max length of recvmsg() calls for future allocations */
|
|
nlk->max_recvmsg_len = max(nlk->max_recvmsg_len, len);
|
|
nlk->max_recvmsg_len = max(nlk->max_recvmsg_len, len);
|
|
nlk->max_recvmsg_len = min_t(size_t, nlk->max_recvmsg_len,
|
|
nlk->max_recvmsg_len = min_t(size_t, nlk->max_recvmsg_len,
|
|
- 16384);
|
|
|
|
|
|
+ SKB_WITH_OVERHEAD(32768));
|
|
|
|
|
|
copied = data_skb->len;
|
|
copied = data_skb->len;
|
|
if (len < copied) {
|
|
if (len < copied) {
|
|
@@ -2083,8 +2083,9 @@ static int netlink_dump(struct sock *sk)
|
|
|
|
|
|
if (alloc_min_size < nlk->max_recvmsg_len) {
|
|
if (alloc_min_size < nlk->max_recvmsg_len) {
|
|
alloc_size = nlk->max_recvmsg_len;
|
|
alloc_size = nlk->max_recvmsg_len;
|
|
- skb = alloc_skb(alloc_size, GFP_KERNEL |
|
|
|
|
- __GFP_NOWARN | __GFP_NORETRY);
|
|
|
|
|
|
+ skb = alloc_skb(alloc_size,
|
|
|
|
+ (GFP_KERNEL & ~__GFP_DIRECT_RECLAIM) |
|
|
|
|
+ __GFP_NOWARN | __GFP_NORETRY);
|
|
}
|
|
}
|
|
if (!skb) {
|
|
if (!skb) {
|
|
alloc_size = alloc_min_size;
|
|
alloc_size = alloc_min_size;
|