projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c1b9a5
)
media: bpf: ensure bpf program is freed on detach
author
Sean Young
<sean@mess.org>
Wed, 4 Jul 2018 14:57:58 +0000
(10:57 -0400)
committer
Mauro Carvalho Chehab
<mchehab+samsung@kernel.org>
Fri, 13 Jul 2018 15:07:29 +0000
(11:07 -0400)
Currently we are leaking bpf programs when they are detached from the
lirc device; the refcount never reaches zero.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/rc/bpf-lirc.c
patch
|
blob
|
history
diff --git
a/drivers/media/rc/bpf-lirc.c
b/drivers/media/rc/bpf-lirc.c
index 40826bba06b6d52c06bef7eb64bea6a719496dd0..55400317ec539b3388337b1c49e63f0930b916dd 100644
(file)
--- a/
drivers/media/rc/bpf-lirc.c
+++ b/
drivers/media/rc/bpf-lirc.c
@@
-174,6
+174,7
@@
static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog)
rcu_assign_pointer(raw->progs, new_array);
bpf_prog_array_free(old_array);
+ bpf_prog_put(prog);
unlock:
mutex_unlock(&ir_raw_handler_lock);
return ret;