On Wed, Apr 21, 2021 at 02:59:01PM +0200, Greg Kroah-Hartman wrote:[...]
kernel/bpf/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 75244ecb2389..da29211ea5d8 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
struct bpf_prog *fp;
u32 pages;
+ BUG_ON(fp_old == NULL);
+
size = round_up(size, PAGE_SIZE);
pages = size / PAGE_SIZE;
if (pages <= fp_old->pages)
The original commit here is correct, I'll drop this revert.
thanks,
greg k-h