diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-01 09:43:06 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-01 09:43:06 -0800 |
commit | 6a24e72d23a6a223687274a6cf61a01940a7d7c9 (patch) | |
tree | c31c0f7d70e7e4c38e44f79e6082e99755119dee /drivers | |
parent | 2255702db4014d1c69d6037ed7bdad2d2e271985 (diff) | |
parent | f42f79af16ce2e8fff49ea9ba4949d3abdd6f26f (diff) |
Merge tag 'remoteproc-4.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc
Pull remoteproc fixes from Ohad Ben-Cohen:
"Two one-liners coming from Suman and Arnd"
* tag 'remoteproc-4.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
remoteproc: fix memory leak of remoteproc ida cache layers
remoteproc: avoid stack overflow in debugfs file
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 2 | ||||
-rw-r--r-- | drivers/remoteproc/remoteproc_debugfs.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 8b3130f22b42..9e03d158f411 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1478,6 +1478,8 @@ module_init(remoteproc_init); static void __exit remoteproc_exit(void) { + ida_destroy(&rproc_dev_index); + rproc_exit_debugfs(); } module_exit(remoteproc_exit); diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 9d30809bb407..916af5096f57 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -156,7 +156,7 @@ rproc_recovery_write(struct file *filp, const char __user *user_buf, char buf[10]; int ret; - if (count > sizeof(buf)) + if (count < 1 || count > sizeof(buf)) return count; ret = copy_from_user(buf, user_buf, count); |