diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-16 23:26:05 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-16 23:26:05 +0200 |
commit | f8fc341ba4db45987e06a937348d67e392de0127 (patch) | |
tree | 0bd6197b34edbe2d30930f9fb1374653bd0fc679 /drivers | |
parent | Merge git://git.samba.org/sfrench/cifs-2.6 (diff) | |
parent | remoteproc: fix off-by-one bug in __rproc_free_vrings (diff) | |
download | linux-f8fc341ba4db45987e06a937348d67e392de0127.tar.xz linux-f8fc341ba4db45987e06a937348d67e392de0127.zip |
Merge tag 'rproc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc
Pull remoteproc fix from Ohad Ben-Cohen:
"Fix a nasty off-by-one remoteproc bug which leaks memory when a remote
processor is shut down and, on certain circumstances, can indirectly
prevent it from being reloaded."
* tag 'rproc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
remoteproc: fix off-by-one bug in __rproc_free_vrings
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index ee15c68fb519..e756a0df3664 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -354,7 +354,7 @@ static void __rproc_free_vrings(struct rproc_vdev *rvdev, int i) { struct rproc *rproc = rvdev->rproc; - for (i--; i > 0; i--) { + for (i--; i >= 0; i--) { struct rproc_vring *rvring = &rvdev->vring[i]; int size = PAGE_ALIGN(vring_size(rvring->len, rvring->align)); |