Skip to content

Commit f8fc341

Browse files
committed
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
2 parents dfae359 + 6fd98c1 commit f8fc341

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/remoteproc/remoteproc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static void __rproc_free_vrings(struct rproc_vdev *rvdev, int i)
354354
{
355355
struct rproc *rproc = rvdev->rproc;
356356

357-
for (i--; i > 0; i--) {
357+
for (i--; i >= 0; i--) {
358358
struct rproc_vring *rvring = &rvdev->vring[i];
359359
int size = PAGE_ALIGN(vring_size(rvring->len, rvring->align));
360360

0 commit comments

Comments
 (0)