Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2942945iog; Mon, 20 Jun 2022 07:59:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tcCWgN96w91T5cFGsKYXjUKD5drnT3r44Du6sOHMFoLBWCvA46r4qjOV9mzC24YEvVcyW3 X-Received: by 2002:a17:90a:4216:b0:1ec:a909:2b16 with SMTP id o22-20020a17090a421600b001eca9092b16mr5972139pjg.86.1655737196747; Mon, 20 Jun 2022 07:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655737196; cv=none; d=google.com; s=arc-20160816; b=Pa7c6/yh8vzILVPu+mWlr5XEfCNqm9i7vO52c89ZzURrgoyM0FFSy17SWIQ/GIPH3v psp3wW+ge5rh58/Yv58yV7v+CsdCBd19TrSiXApkVvOAc8Hk543Yu5IIbgMcFQfYrUUX X34753Lhx9SwDHFqvp4WbpHYX2DtdKC0r7XGUrDho15E9OqGN1Q4xLjQJAMxzlC6Zzdm xY67OttoGZqdIFrccjsfgZu7PgeYyFroJ5o1cDA1No+7SenAUlspFL+Zcn0YHCGmHR3e iA+yPbi0ANaB6N94gMg1hJZFmW5ZRs7w4QZDiXrxgRjtEsF9UQyTLgEKbHXezBJHyY1E vprQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cWwzGtcE4yiuzH11jVrd3hsXhDNzj+sWJv4JAzpCoGE=; b=sdXXzqrxb0Amucjc6bZSegmqg/2sb9HNgwgKOC7pJy1U9EAxJwDSfSdeZExa3sulFM b/7tutoKJWNnbKv6HmlOcX26xnS/4mM+SM52ExFM4jYivIRMt7t1D8AwutptmyfeegcI I5C6YIrFAy3Xdslw37TrqCKSuSwHTyzL18g1DuRQMMVpdt+dN56m2op4QROrOu2TlbWY YA9tr4OJYffn7Q/mMkVy6bBLImvSESxBYCVtbejcjRFAuJ5A6xFmxe01G+82MYZkTDPK rKkNI0X+6bhhKQyVyyX+d/mkVLntapQvNIMymPAKbQWM8JF+5fC0G3SfluroMZ50l79K Tbrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mclWt2A5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a17090b070100b001e3495408d6si17706124pjz.123.2022.06.20.07.59.44; Mon, 20 Jun 2022 07:59:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mclWt2A5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243391AbiFTNB1 (ORCPT + 99 others); Mon, 20 Jun 2022 09:01:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243966AbiFTM7J (ORCPT ); Mon, 20 Jun 2022 08:59:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44AE11C10B; Mon, 20 Jun 2022 05:56:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 379A0B811A3; Mon, 20 Jun 2022 12:55:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75A11C3411B; Mon, 20 Jun 2022 12:55:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655729751; bh=BxlpKTalVEkBk0tBaPAm8eqtVfisQ6VMPRChsYYOfaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mclWt2A5SsWdPkKTMW1iBu5n49IfqAixFqVZe/9baUXnoJZEZd9yOSX0fEFMQmanN X3dQoyCLXmVVEhB9PQAnu/CSWiM9YvgDtWMZxZovd7KYG1Of6djzL0Xs1OEumqTm67 2pf3zAinnEpzkvlRMi5t+RfoYBdPvCsfNal/Nxlo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Saurabh Sengar , Michael Kelley , Wei Liu , Sasha Levin Subject: [PATCH 5.18 062/141] Drivers: hv: vmbus: Release cpu lock in error case Date: Mon, 20 Jun 2022 14:50:00 +0200 Message-Id: <20220620124731.373333892@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124729.509745706@linuxfoundation.org> References: <20220620124729.509745706@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Saurabh Sengar [ Upstream commit 656c5ba50b7172a0ea25dc1b37606bd51d01fe8d ] In case of invalid sub channel, release cpu lock before returning. Fixes: a949e86c0d780 ("Drivers: hv: vmbus: Resolve race between init_vp_index() and CPU hotplug") Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1654794996-13244-1-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu Signed-off-by: Sasha Levin --- drivers/hv/channel_mgmt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 85a2142c9384..073ff9b6f535 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -637,6 +637,7 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel) */ if (newchannel->offermsg.offer.sub_channel_index == 0) { mutex_unlock(&vmbus_connection.channel_mutex); + cpus_read_unlock(); /* * Don't call free_channel(), because newchannel->kobj * is not initialized yet. -- 2.35.1