[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130410224342.287479200@linuxfoundation.org>
Date: Wed, 10 Apr 2013 15:46:36 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Sjur Brændeland <sjur.brandeland@...ricsson.com>,
Ido Yariv <ido@...ery.com>, Ohad Ben-Cohen <ohad@...ery.com>
Subject: [ 39/64] remoteproc: fix error path of handle_vdev
3.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sjur Brændeland <sjur.brandeland@...ricsson.com>
commit cde42e076c1cdd69a1f955d66ff6596bad3d2105 upstream.
Remove the vdev entry from the list before freeing it,
otherwise rproc->vdevs will explode.
Signed-off-by: Sjur Brændeland <sjur.brandeland@...ricsson.com>
Acked-by: Ido Yariv <ido@...ery.com>
[edit subject, minor commit log edit, cc stable]
Signed-off-by: Ohad Ben-Cohen <ohad@...ery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/remoteproc/remoteproc_core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -370,10 +370,12 @@ static int rproc_handle_vdev(struct rpro
/* it is now safe to add the virtio device */
ret = rproc_add_virtio_dev(rvdev, rsc->id);
if (ret)
- goto free_rvdev;
+ goto remove_rvdev;
return 0;
+remove_rvdev:
+ list_del(&rvdev->node);
free_rvdev:
kfree(rvdev);
return ret;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists