summaryrefslogtreecommitdiffstats
path: root/net/core/filter.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-02-04 20:56:14 -0800
committerDavid S. Miller <davem@davemloft.net>2022-02-05 15:34:47 +0000
commit5a8fb33e530512ee67a11b30f3451a4f030f4b01 (patch)
tree5cfef7703978a16f1d0720a3fd47f883f90569ae /net/core/filter.c
parentd2692eee05b8502dbe4c480405feec79f4efbb55 (diff)
downloadlinux-5a8fb33e530512ee67a11b30f3451a4f030f4b01.tar.gz
linux-5a8fb33e530512ee67a11b30f3451a4f030f4b01.tar.bz2
linux-5a8fb33e530512ee67a11b30f3451a4f030f4b01.zip
skmsg: convert struct sk_msg_sg::copy to a bitmap
We have plans for increasing MAX_SKB_FRAGS, but sk_msg_sg::copy is currently an unsigned long, limiting MAX_SKB_FRAGS to 30 on 32bit arches. Convert it to a bitmap, as Jakub suggested. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r--net/core/filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 9615ae1ab530..f497ca7a16d2 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2603,7 +2603,7 @@ BPF_CALL_4(bpf_msg_pull_data, struct sk_msg *, msg, u32, start,
* account for the headroom.
*/
bytes_sg_total = start - offset + bytes;
- if (!test_bit(i, &msg->sg.copy) && bytes_sg_total <= len)
+ if (!test_bit(i, msg->sg.copy) && bytes_sg_total <= len)
goto out;
/* At this point we need to linearize multiple scatterlist
@@ -2809,7 +2809,7 @@ BPF_CALL_4(bpf_msg_push_data, struct sk_msg *, msg, u32, start,
/* Place newly allocated data buffer */
sk_mem_charge(msg->sk, len);
msg->sg.size += len;
- __clear_bit(new, &msg->sg.copy);
+ __clear_bit(new, msg->sg.copy);
sg_set_page(&msg->sg.data[new], page, len + copy, 0);
if (rsge.length) {
get_page(sg_page(&rsge));