Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp879890rwi; Wed, 19 Oct 2022 04:14:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xYOrRhDXNDudTlwU6euEk+5HQ7i+mOxpSd1KS5yk6JB1DJu58By0RUt1KLVSWRZ3DBbc2 X-Received: by 2002:a17:907:6eab:b0:78d:4c16:a687 with SMTP id sh43-20020a1709076eab00b0078d4c16a687mr6226744ejc.392.1666178071491; Wed, 19 Oct 2022 04:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178071; cv=none; d=google.com; s=arc-20160816; b=ssQ1hZiDE4MTVZZ4tEpADtWyvkkZEBkEDfuodZjxjvFw5OownpaO6kciy9OozCD7KU dRg+08xFgGpXBIZTA3SMwJrlZ+We+vHE74vZUkixqcCOYlq+eCU2PWm2bf+RYaAazYb4 FBJnBj4mR5d3OXDl4DJs0rLvgcYQ4xSCrezSoFf/sSOcu4BTb/8SE8GiV/2rm9bg6biY zllWolB3z1kupjXT9PuqvttDAAD8nYWkUc+GjfRAG6N59R8aiWGKBRi2hL7K2gK/fCNz 2XX6E7um3YBCOYuJwK3rjN6MAi97UmEihhcGFPMbC2c0JjM0EjVehgMdDLu1cWQz7ou0 +XdQ== 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=Fet8feqtE+ttmxPjGOKOnMdhMPUaOEnZi4Do4BdkLVE=; b=T63Sj9C+fY2NERiowa3t4Ww1HFBLXLGrMpaJV6jj4JOchExWsdcsi+8YaGueGGhwJV sxfwmJ4Vk4VJNc+waYKrXKdnMCKbmgPtdZb3nIg6LJhO/QdGbOBU1QZoM55QMmhKIihz xzUAIh0XDD0fatSGgXmjywBLEi8p3qKt74PhMSwbjZynPvEjrVk4DM7kHsbMYEMsZmY1 9cGk1qxYVUbsnrW2D19FDQt83Owx46Fzvggm03by8zjdQ+SU/YHQGlygDFZO/xyHeC6R ZuHebYLfZZ77CrwzqysmX29KtrmvH+R8GqMkziMgLmjklPELVzfwpURsTdep1/0cb3E8 O05g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yBy0Aa6m; 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 h4-20020a170906854400b0077b287e3adesi11348564ejy.190.2022.10.19.04.14.00; Wed, 19 Oct 2022 04:14:31 -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=yBy0Aa6m; 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 S234276AbiJSK4a (ORCPT + 99 others); Wed, 19 Oct 2022 06:56:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233665AbiJSKzj (ORCPT ); Wed, 19 Oct 2022 06:55:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BB96165520; Wed, 19 Oct 2022 03:27:25 -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 5C541B824AE; Wed, 19 Oct 2022 09:09:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA1B3C433D7; Wed, 19 Oct 2022 09:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170553; bh=Rsz9rKTGJKYtTSkNCLrjg0+4EQ57GBD6604qCTdupwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yBy0Aa6m3OI+slWiVJKq01i7kNtnqE/Bx2HnPC9648vZ4rVrs+u/IeHEzanUcpNhr TtOqT6fiy6af3vnHhxD/20NTl7r0YgIToff4ciern2HtRamiOUMo+pE87QJ/s92sTB OFbNc8ZpMx+wZkcm9+cGU5bp3yt+ggCVR9Kpn1gc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zong-Zhe Yang , Ping-Ke Shih , Kalle Valo , Sasha Levin Subject: [PATCH 6.0 698/862] rtw89: ser: leave lps with mutex Date: Wed, 19 Oct 2022 10:33:05 +0200 Message-Id: <20221019083320.822897769@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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 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: Zong-Zhe Yang [ Upstream commit 8676031bae1c91037d06341214f4150b33707c68 ] Calling rtw89_leave_lps() should hold rtwdev::mutex. So, fix it. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220704023453.19935-5-pkshih@realtek.com Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw89/ser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/ser.c b/drivers/net/wireless/realtek/rtw89/ser.c index 726223f25dc6..7240364e8f7d 100644 --- a/drivers/net/wireless/realtek/rtw89/ser.c +++ b/drivers/net/wireless/realtek/rtw89/ser.c @@ -152,7 +152,10 @@ static void ser_state_run(struct rtw89_ser *ser, u8 evt) rtw89_debug(rtwdev, RTW89_DBG_SER, "ser: %s receive %s\n", ser_st_name(ser), ser_ev_name(ser, evt)); + mutex_lock(&rtwdev->mutex); rtw89_leave_lps(rtwdev); + mutex_unlock(&rtwdev->mutex); + ser->st_tbl[ser->state].st_func(ser, evt); } -- 2.35.1