From patchwork Wed Oct 19 08:33:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5151 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp253471wrs; Wed, 19 Oct 2022 03:57:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM42XNh4GLu0H4o27NhPp9K1XkrX5xXa/XlDxuNI6RigBz5SzY4/4UtxaU0doPjnAAkzF799 X-Received: by 2002:aa7:da03:0:b0:458:e117:28d8 with SMTP id r3-20020aa7da03000000b00458e11728d8mr6805695eds.387.1666177037854; Wed, 19 Oct 2022 03:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666177037; cv=none; d=google.com; s=arc-20160816; b=IISe0TQqpoPmle0Berkli7aJUTh9eM22ZYfXsyqOzrjam/pQNWDwqkrhJLj48cQPOj Y4GphgjrEaFBIJF6YC7MeUst1SOZC7zrNf0E2jVoOHdfy+Et1QeyvEMzPZaXkml/GYDa YFEbrMW6Tw6yQzfjIX/TUbWOzNkk557gJuTefoslXdBiEIPLRIWELz0hqMGterPbeOLo i4fqA3b8lLPxFJA9EgRwgArqD3DLYd3/+ZsuP53AW/ORodwPCtS0L3WoAN1Goo78ka8D 6Rtuk5dorKEl/SQ19xqQr3crlqK3/ehe1qpXYECa3ad9vVBQlD3bRW2TvEfhREbP4GLL Fnew== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020a1709065d0f00b007306ac0faa0si15018077ejt.615.2022.10.19.03.56.53; Wed, 19 Oct 2022 03:57:17 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747113253959004048?= X-GMAIL-MSGID: =?utf-8?q?1747113253959004048?= 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); }