From c0d1379a19c3dde3c32be50164997d246241c1e4 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sat, 13 Sep 2014 00:06:30 -0400 Subject: [PATCH] net: bpf: correctly handle errors in sk_attach_filter() Commit "net: bpf: make eBPF interpreter images read-only" has changed bpf_prog to be vmalloc()ed but never handled some of the errors paths of the old code. On error within sk_attach_filter (which userspace can easily trigger), we'd kfree() the vmalloc()ed memory, and leak the internal bpf_work_struct. Signed-off-by: Sasha Levin Acked-by: Daniel Borkmann Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller --- Reading git-format-patch failed