Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5762065imd; Wed, 31 Oct 2018 01:23:12 -0700 (PDT) X-Google-Smtp-Source: AJdET5dML0F8cBgDo087Hyx8RAdxFSZ9seP3M8S3/81tmwm92SwQ/JPwDcJySCdl1iEJ8nabb5oT X-Received: by 2002:a62:7982:: with SMTP id u124-v6mr2282126pfc.95.1540974192415; Wed, 31 Oct 2018 01:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540974192; cv=none; d=google.com; s=arc-20160816; b=E6EzGN9vJVcyWk82iLzjAl67T5adrdHh1Z6YvD33e7bIpRWLHHH+8dX3LJU+BLbsbZ jW+sHIpsg31t4e18QxbW0TDTVactXBvnVXQrqT7bmHTqKhDbHCglADMd9RpdFTbrTKuD QSGTuvBLK2cC4QYDXH04S4mkcZW9KSxBaKhPXkXdBw3h2pJBdzHVQiQEJTDi0DjvBmn9 nEdVpD0ay9sIKcUyqFWr7cXyhntDe8anTPQwCvkH2S8kavhKldrUQSzhO2skR7b2+TSc fwaBouEVDx4KYfpsixWZKW5A5d/9Z9Vg+Hj2Uf7SY0KEe1LtAVmX4FxixKCJx8ZE1JlE xQeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=9OLiazRqmZTfwVkw0dZ1krN0ul6VlWPTVVcYfuj/DPo=; b=XiZ3H9FVtnxxPbqN0jMK2lUEHPQZUXG75xc/kO/vwa9FKW5nuG+KyWjQGZHxki20Yn t/2XW3W6eVzpPrG8o26NMUJ6PAX2NXA0sr4P1Pibpr5SH4PO3350+Ngsg8O7ZhjGTTZJ VX7iflLLwIBDJiWwvT/nIi/3i0Kb/qQn4uw8arszPShodsBP7V6EcTGh+RqmV++5U5/0 LPlU0YBO1GnzFmb5aKyxUXgwWnczfLsTAUlrCbdlKWcXdo5NYNETsS6NIxzzqDgeRmbO +UDQVNEj4xJQq0YPEqcT9SB0DJX9+wkCeBf25We+nkJf0FytJgKVGGuj08tnZXl7Up1Q QViA== 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 n12-v6si14832306pgb.68.2018.10.31.01.22.57; Wed, 31 Oct 2018 01:23:12 -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 S1727346AbeJaRTl (ORCPT + 99 others); Wed, 31 Oct 2018 13:19:41 -0400 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:47189 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbeJaRTl (ORCPT ); Wed, 31 Oct 2018 13:19:41 -0400 X-IronPort-AV: E=Sophos;i="5.54,447,1534809600"; d="scan'208";a="81195081" Date: Wed, 31 Oct 2018 09:22:25 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Manjunath Patil CC: , , , , , , , Subject: Re: [PATCH v2] xen-blkfront: fix kernel panic with negotiate_mq error path Message-ID: <20181031082225.zp2cnrfuinpbilv5@mac.citrite.net> References: <1540918161-31283-1-git-send-email-manjunath.b.patil@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1540918161-31283-1-git-send-email-manjunath.b.patil@oracle.com> User-Agent: NeoMutt/20180716 X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 30, 2018 at 09:49:21AM -0700, Manjunath Patil wrote: > info->nr_rings isn't adjusted in case of ENOMEM error from > negotiate_mq(). This leads to kernel panic in error path. > > Typical call stack involving panic - > #8 page_fault at ffffffff8175936f > [exception RIP: blkif_free_ring+33] > RIP: ffffffffa0149491 RSP: ffff8804f7673c08 RFLAGS: 00010292 > ... > #9 blkif_free at ffffffffa0149aaa [xen_blkfront] > #10 talk_to_blkback at ffffffffa014c8cd [xen_blkfront] > #11 blkback_changed at ffffffffa014ea8b [xen_blkfront] > #12 xenbus_otherend_changed at ffffffff81424670 > #13 backend_changed at ffffffff81426dc3 > #14 xenwatch_thread at ffffffff81422f29 > #15 kthread at ffffffff810abe6a > #16 ret_from_fork at ffffffff81754078 > > Cc: stable@vger.kernel.org > Fixes: 7ed8ce1c5fc7 ("xen-blkfront: move negotiate_mq to cover all cases of new VBDs") > Signed-off-by: Manjunath Patil Acked-by: Roger Pau Monn? Thanks, Roger.