Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp729875imm; Thu, 13 Sep 2018 06:57:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ/SG03QzZg+Ygnk+BhG/qOi/3ioRTBOU8C+IdIU2BUNIWD1wvFcwiLMhODxZgSiWdLBVrQ X-Received: by 2002:a62:e813:: with SMTP id c19-v6mr7704968pfi.124.1536847045953; Thu, 13 Sep 2018 06:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847045; cv=none; d=google.com; s=arc-20160816; b=C7zUo2FYoS+DmTV+3I8tD642uUhluxgnK6XT5wDnvUGOylEisIlBP1rkuApWVTb6Lk bvc/4U6Mle0l+Bas5Nhm9mfmq9LnZhHoebaLgCO8LaZ3d7ygnGZ9Tc2IOjEgCyCVpaL6 0dM9wzoPYufT+Qh5OYnvwcqcIN4IhHpPhPK7sOMylAJRpqwkjHgfN2YNP4futbeqJYNI Wr7N/05W4y80nt7ZcGmVsNipjS2NW8RLMRYGjxypIqz7j1Y4Aaq7oV4B+gLrN7HRUe/j iFV4R53bLdlZ2Jbz5a+T9JxLwCnTKVvrrTDMN9jcF3EE5xYjUcW98PcUwwbKttRXrDse ao0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=AfsT1gUxDyl+WxtQiHAFY+/Ft0FGjikNv187yC+R8v8=; b=sy3X3/Ln5j/R+jz12rh4XJi9twNpNNA4sCscbzq9YJeFxg/jvoeASyHrblUuuYlBZ5 kgqGcxFVLAhutdIltDLwhdYEMUUcF24sdF/el83a40monZePYAlevRI5WQomSCv+Qw20 zUM04kyy7BCWtJYmkLvvb6EVdjvKqbJb3oiU+8C1tn/sRRdJA6BVDU7PMmpdu9TIPaG0 CwHCPmLZyewvaGoLl+SPzGzdj9/FF+IbEb7VWBKy8NLbASc7bt0VyoHsDWZhrbhdM2bI BWGNh2Ot/jygHWHIV9lj6u14l8Y2KOrZA1IWximlFGB3jPowACnVriVKxhG4NElQ6mXs f4iQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19-v6si4337984pgi.388.2018.09.13.06.57.11; Thu, 13 Sep 2018 06:57:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731433AbeIMTGm (ORCPT + 99 others); Thu, 13 Sep 2018 15:06:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34264 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730847AbeIMTGl (ORCPT ); Thu, 13 Sep 2018 15:06:41 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4C25BD10; Thu, 13 Sep 2018 13:57:04 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jean-Philippe Brucker , Greg Kurz , Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , Andrew Morton , Dominique Martinet , Sasha Levin Subject: [PATCH 4.18 094/197] net/9p: fix error path of p9_virtio_probe Date: Thu, 13 Sep 2018 15:30:43 +0200 Message-Id: <20180913131845.296545381@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jean-Philippe Brucker [ Upstream commit 92aef4675d5b1b55404e1532379e343bed0e5cf2 ] Currently when virtio_find_single_vq fails, we go through del_vqs which throws a warning (Trying to free already-free IRQ). Skip del_vqs if vq allocation failed. Link: http://lkml.kernel.org/r/20180524101021.49880-1-jean-philippe.brucker@arm.com Signed-off-by: Jean-Philippe Brucker Reviewed-by: Greg Kurz Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Signed-off-by: Andrew Morton Signed-off-by: Dominique Martinet Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/9p/trans_virtio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -571,7 +571,7 @@ static int p9_virtio_probe(struct virtio chan->vq = virtio_find_single_vq(vdev, req_done, "requests"); if (IS_ERR(chan->vq)) { err = PTR_ERR(chan->vq); - goto out_free_vq; + goto out_free_chan; } chan->vq->vdev->priv = chan; spin_lock_init(&chan->lock); @@ -624,6 +624,7 @@ out_free_tag: kfree(tag); out_free_vq: vdev->config->del_vqs(vdev); +out_free_chan: kfree(chan); fail: return err;