Re: [PATCH] bpf: alloc_record_per_cpu Add null check after malloc

2020-06-09 Thread Jesper Dangaard Brouer
On Tue, 9 Jun 2020 08:08:03 -0400 Gaurav Singh wrote: > The memset call is made right after malloc call. To fix this, add the null > check right after malloc and then do memset. > Did you read the section about how long lines should be in desc? > Signed-off-by: Gaurav Singh > --- > sample

[PATCH] bpf: alloc_record_per_cpu Add null check after malloc

2020-06-09 Thread Gaurav Singh
The memset call is made right after malloc call. To fix this, add the null check right after malloc and then do memset. Signed-off-by: Gaurav Singh --- samples/bpf/xdp_rxq_info_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/xdp_rxq_info_user.c b/samples/b

Re: [PATCH] bpf: alloc_record_per_cpu Add null check after malloc

2020-06-09 Thread Greg KH
On Tue, Jun 09, 2020 at 07:38:39AM -0400, Gaurav Singh wrote: > Signed-off-by: Gaurav Singh > --- > samples/bpf/xdp_rxq_info_user.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I know I don't take patches without any changelog text, maybe other maintainers are more lax...

[PATCH] bpf: alloc_record_per_cpu Add null check after malloc

2020-06-09 Thread Gaurav Singh
Signed-off-by: Gaurav Singh --- samples/bpf/xdp_rxq_info_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/xdp_rxq_info_user.c b/samples/bpf/xdp_rxq_info_user.c index 4fe47502ebed..490b07b7df78 100644 --- a/samples/bpf/xdp_rxq_info_user.c +++ b/samples/bpf/xdp

Re: [PATCH] bpf: alloc_record_per_cpu Add null check after malloc

2020-06-08 Thread Jesper Dangaard Brouer
gt; Gaurav. > > > From 552b7df0e12572737929c60478b5dca2a40f4ad9 Mon Sep 17 00:00:00 2001 > From: Gaurav Singh > Date: Sat, 6 Jun 2020 19:57:48 -0400 > Subject: [PATCH] bpf: alloc_record_per_cpu Add null check after malloc > > Signed-off-by: Gaurav Singh > --- > sa