summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-05-19 09:41:35 +0000
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-05-19 09:41:35 +0000
commit2cbb55e591febb414b623269d61d4444113c285f (patch)
treec18865a0ddcee5fefce57d3b43b18b61074d8f32 /samples
parentef2339380856bee33c1ae25535ff0d72c92d02ad (diff)
parente05d387ba736bcabe414b0aa05831d151ac40385 (diff)
Merge tag 'v5.4.120' into 5.4-2.3.x-imx
This is the 5.4.120 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/tracex1_kern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/bpf/tracex1_kern.c b/samples/bpf/tracex1_kern.c
index 107da148820f..9c74b45c5720 100644
--- a/samples/bpf/tracex1_kern.c
+++ b/samples/bpf/tracex1_kern.c
@@ -20,7 +20,7 @@
SEC("kprobe/__netif_receive_skb_core")
int bpf_prog1(struct pt_regs *ctx)
{
- /* attaches to kprobe netif_receive_skb,
+ /* attaches to kprobe __netif_receive_skb_core,
* looks for packets on loobpack device and prints them
*/
char devname[IFNAMSIZ];
@@ -29,7 +29,7 @@ int bpf_prog1(struct pt_regs *ctx)
int len;
/* non-portable! works for the given kernel only */
- skb = (struct sk_buff *) PT_REGS_PARM1(ctx);
+ bpf_probe_read_kernel(&skb, sizeof(skb), (void *)PT_REGS_PARM1(ctx));
dev = _(skb->dev);
len = _(skb->len);