From patchwork Sat Oct 22 07:27:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7699 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1109304wrr; Sat, 22 Oct 2022 01:48:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4F0ytaHzrEJg88oOKHPQfHLeqW8/kgZ9Y9TDsb8b6M2ngsEyzvb0F4uq1CRg2nllXU/ULY X-Received: by 2002:a17:907:1c96:b0:78d:fe6b:9891 with SMTP id nb22-20020a1709071c9600b0078dfe6b9891mr19075327ejc.746.1666428480220; Sat, 22 Oct 2022 01:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666428480; cv=none; d=google.com; s=arc-20160816; b=d8B/Ris+aC20YYAdwthRWYOwS0Na9VtbCfu6shVu3UWyD92SGRZlnRbD8tzRs+uy6E A46srVUnV1lPcR3+xkU9U7390GPIYHSsBDhPnfqmh9VI7OcYa4gOmUm4jKCUrzNIVR5n BaWf9mySH9hTHDTj4JWYCtK9bYjXcB5Epz37DI2PC9tS9FlHfjDMjih6NaHkv1Aoyga0 lw27BV4ihFuXeOqqRdZ2LgqY4KyZQ39VTxnOn6PusZZSxfNWjK9GtKzcOFRjroeZ+5o8 t5oKqhF/8iSBAx24t3HzyDtBGr0wE/5ctOXDWqcMNlMqtQTKkgfYQOniUT4UgDjvUx/p GFLg== 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=VnowpqzodCJVjRHd3VI+8q4j6jT9mcYiIOwg/lilhyw=; b=LPRv0itu+6XbAtLaIDce++RJw/uB0RwalgFdsf/vOsyUtsMlz4+bsSINtYHIw8fXSd VGt6fuXNrREURliL69I8SBu5w20a45pB99oFuGfjdQemBj24nWRwruAept79XxwtlcWh I0nzgMHkOyit6mOvrHcaK3Wk30hRFHxCSju5gatGCID4L5nO9+gcuC+9Agigkj5PGujA xCaEOepBTNAqvNdtIky5+6PPi3+2zflOhTKdb7kE7oD2H33lH/nqfZxd0PuGHigu/YyE ZtGlzBTYgshiK21iED00a+Wxq8ph0y4zsFhRoWpLyRiYvS6hHhzY5TthpGU+/txYLL8B kamQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0uTP5fK5; 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 l20-20020aa7cad4000000b0045bc92ef2c0si19254362edt.195.2022.10.22.01.47.36; Sat, 22 Oct 2022 01:48:00 -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=0uTP5fK5; 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 S234879AbiJVIrF (ORCPT + 99 others); Sat, 22 Oct 2022 04:47:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235128AbiJVIom (ORCPT ); Sat, 22 Oct 2022 04:44:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 323372EBBA6; Sat, 22 Oct 2022 01:08:18 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 41C4560BA3; Sat, 22 Oct 2022 08:00:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51ABEC433D6; Sat, 22 Oct 2022 08:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425653; bh=ihi/X+jRwStHBrEQc38wWsGR2lD4+0D/n45zAeO5vlU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0uTP5fK5PgMPf8G6iaQYDxqHFNNoqvW8UnVPEA/D7DFdm6BHdhHYazUahZ4vjprWS 6VH2I4v8Uzi6lQphGrfNnCHx73SBL/V/FnyKn8PmrIjbkeP0cnk+c2a3VoE9QNC7ox 637k2vCJVYE+qijGXyikBIwWUydG/tC1hnzllyUA= 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 5.19 572/717] rtw89: ser: leave lps with mutex Date: Sat, 22 Oct 2022 09:27:31 +0200 Message-Id: <20221022072523.707440640@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747376909849946821?= X-GMAIL-MSGID: =?utf-8?q?1747376909849946821?= 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 9e95ed972710..5d88200cbd3e 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); }