Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1565612rwr; Wed, 26 Apr 2023 17:48:23 -0700 (PDT) X-Google-Smtp-Source: AKy350YZZL9nvLcxTM2ak73/w/yXKYJe8bb1HeaiEVbYiNuKS5RpRBGD4nst4F9Hw8yGNTOfETOK X-Received: by 2002:a05:6a20:a09f:b0:e7:56ad:5a40 with SMTP id r31-20020a056a20a09f00b000e756ad5a40mr21026423pzj.36.1682556503380; Wed, 26 Apr 2023 17:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682556503; cv=none; d=google.com; s=arc-20160816; b=Mw2haMdtoY9NdjD5RE4DagcvUPOn5N9SmCUx8AzVn2Vz+cHDNk0FFqzLoGoWufEouP ii/EIhQrLx1LwfYqp9IPL5Xf+9yTxbZ3YN8LOjqnCqnFeB4Kvx+4teaTQEQQmk3bN/23 +ZnZX8NZVa4ybPztkymMpq/eWD5jAipE8dBxLQlok+6kL2bMqzr8zh30RunZ/R61Tt3r H8h54u+MG3lNNopZ6VJiAXAjIYlP4fycttm0aqtJBl8ymu5VPrdW4uqRIzisEM6B5pD4 ISouZbUo4pF7+pYuDDDFv4qhg/uHos6JSD7gytKoH1qlLWI0e6oiBlsiZ6jKVEOLzkb/ 0fvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=VjQqZhD/rCQtqKZPfVQSbgEQkmRjHstKaiMn4cp7C1Y=; b=BTta2rfNOpIhswjfa9pt5wWi2XNwUsGQ42Rn6DVRuXqrAMIDJvnT9OK3KA9Vn6YSU5 4pkqSGc1vwawSq6iJLXxNUHWBbH2kVW5dW0d/cAndxUyrsW3bJ19vW7TIG2RMXKjUFjJ hgqlmWq+W/HJYSYvx3x2KXZhFBg63g+jP7uAumBuwFt0qdv+iVvbQcIFv7dZUh7UI1MB nNEkbF5HYqn5KX15g8i7ziPTfxTG4JMXxOQ5TfVL7Mgu9aSO+/xrzIKmxJqDcJZ80raI 9P/4D2P0/eS35M4hq3F9gu5dWPyD+N/MUcYQv90X+ojiu7egS7vTKCTGLzdUsjBpjp35 m0Ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a631553000000b0051367d9cf70si16966180pgv.93.2023.04.26.17.48.15; Wed, 26 Apr 2023 17:48:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242825AbjD0Arb convert rfc822-to-8bit (ORCPT + 63 others); Wed, 26 Apr 2023 20:47:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241692AbjD0Ara (ORCPT ); Wed, 26 Apr 2023 20:47:30 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C7C4359E; Wed, 26 Apr 2023 17:47:29 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33R0l5h05000574, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 33R0l5h05000574 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Thu, 27 Apr 2023 08:47:06 +0800 Received: from RTEXMBS06.realtek.com.tw (172.21.6.99) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Thu, 27 Apr 2023 08:47:08 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 27 Apr 2023 08:47:07 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Thu, 27 Apr 2023 08:47:07 +0800 From: Ping-Ke Shih To: Zhang Shurong CC: "tony0620emma@gmail.com" , "kvalo@kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3 0/2] wifi: rtw88: error codes fix patches Thread-Topic: [PATCH v3 0/2] wifi: rtw88: error codes fix patches Thread-Index: AQHZeGJ27jYL+1Dzf0WhQst+fewc+a8+UeVA Date: Thu, 27 Apr 2023 00:47:07 +0000 Message-ID: <5629deb196114fefb12f5f2273b4786d@realtek.com> References: In-Reply-To: Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXMBS06.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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-wireless@vger.kernel.org > -----Original Message----- > From: Zhang Shurong > Sent: Thursday, April 27, 2023 1:02 AM > To: Ping-Ke Shih > Cc: tony0620emma@gmail.com; kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; > pabeni@redhat.com; linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; > Zhang Shurong > Subject: [PATCH v3 0/2] wifi: rtw88: error codes fix patches > > rtw88 does not handle the failure during copy_from_user or invalid > user-provided data. We fix such problems by first modifying the return > value of customized function rtw_debugfs_copy_from_user. Then for all > the callers rtw_debugfs_set_*, we receive the returned error code. > Moreover, negative code is returned if the user-provided data is invalid > instead of a positive value count. > > The changes in this version: > - check by if (ret) instead of check by if (ret < 0) It would be better if you preserve the change of v2 as changelog. v3 is okay to me, so don't need v4 if no other reviewer has comment for this patchset. > > Zhang Shurong (2): > wifi: rtw88: fix incorrect error codes in rtw_debugfs_copy_from_user > wifi: rtw88: fix incorrect error codes in rtw_debugfs_set_* > > drivers/net/wireless/realtek/rtw88/debug.c | 59 ++++++++++++++++------ > 1 file changed, 43 insertions(+), 16 deletions(-) > > -- > 2.40.0 >