Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967353Ab3DRJec (ORCPT ); Thu, 18 Apr 2013 05:34:32 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40066 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756469Ab3DRJRf (ORCPT ); Thu, 18 Apr 2013 05:17:35 -0400 From: Luis Henriques To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: =?UTF-8?q?Sjur=20Br=C3=A6ndeland?= , Ohad Ben-Cohen , Luis Henriques Subject: [PATCH 17/72] remoteproc: fix error path of handle_vdev Date: Thu, 18 Apr 2013 10:16:02 +0100 Message-Id: <1366276617-3553-18-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1366276617-3553-1-git-send-email-luis.henriques@canonical.com> References: <1366276617-3553-1-git-send-email-luis.henriques@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Extended-Stable: 3.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1543 Lines: 47 3.5.7.11 -stable review patch. If anyone has any objections, please let me know. ------------------ From: =?UTF-8?q?Sjur=20Br=C3=A6ndeland?= commit cde42e076c1cdd69a1f955d66ff6596bad3d2105 upstream. Remove the vdev entry from the list before freeing it, otherwise rproc->vdevs will explode. Signed-off-by: Sjur Brændeland Acked-by: Ido Yariv [edit subject, minor commit log edit, cc stable] Signed-off-by: Ohad Ben-Cohen [ luis: adjust context ] Signed-off-by: Luis Henriques --- drivers/remoteproc/remoteproc_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 99b6ee7..82702aa 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -440,10 +440,12 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc, /* it is now safe to add the virtio device */ ret = rproc_add_virtio_dev(rvdev, rsc->id); if (ret) - goto free_vrings; + goto remove_rvdev; return 0; +remove_rvdev: + list_del(&rvdev->node); free_vrings: __rproc_free_vrings(rvdev, i); kfree(rvdev); -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/