Skip to content

Commit 6a24e72

Browse files
committed
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
2 parents 2255702 + f42f79a commit 6a24e72

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/remoteproc/remoteproc_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,8 @@ module_init(remoteproc_init);
14781478

14791479
static void __exit remoteproc_exit(void)
14801480
{
1481+
ida_destroy(&rproc_dev_index);
1482+
14811483
rproc_exit_debugfs();
14821484
}
14831485
module_exit(remoteproc_exit);

drivers/remoteproc/remoteproc_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ rproc_recovery_write(struct file *filp, const char __user *user_buf,
156156
char buf[10];
157157
int ret;
158158

159-
if (count > sizeof(buf))
159+
if (count < 1 || count > sizeof(buf))
160160
return count;
161161

162162
ret = copy_from_user(buf, user_buf, count);

0 commit comments

Comments
 (0)