Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1563252rwr; Wed, 26 Apr 2023 17:45:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7On6uZABGw/YGcD4FAQZ9Wjt/RCMfY8aZU5lsopjuyavDlpRpnijprhlDUBic8/DqXYQZ6 X-Received: by 2002:a17:902:f682:b0:1a9:9929:face with SMTP id l2-20020a170902f68200b001a99929facemr6207917plg.34.1682556334063; Wed, 26 Apr 2023 17:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682556334; cv=none; d=google.com; s=arc-20160816; b=0eLxfXBEmk0W7nDFRgvIamwtLXfs/hCiMitbA8v3hvGi2jNOgB2p1NNdnWc64W4OKj +R6Br9v7N1kB6yGk+dp16m41U94WRo+INTF6E/XjDtZh8yjljcAizXge0p0NPCB+F2+I x5G/SG/6nqgGZPPGjxVDUtFHE0fn6KEOYDags4ccsnLG5KPagTh/uZnEbwQ18n+i1EUr pF3lUYNgcHEw71krxsMDzMLBmQ3xRs/lxESzoyG3TJ/Rfgf2gICdItRP0V0FnOMBgePo vrC7/TyBEJ2MwbLMlkuWkExIXZ0c9TLnqkPG06g2Ts3KInafc8dPefS7mhh16IIpPSl1 ClzA== 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=xuCs+pxjodLAykuJ45oL5H7gIwbBaZ4GtL+S34zs2Gw=; b=m/YmD5WJznghe0+0z+pKqr7R6Lhyzv1Ua7DLhgrujk1Po6btWUuZNXvzPkeAhiQpR+ g3MJffLOUsauNmUQaybOsYHHil+WsYSwrP7BTCRBGRGGWvlU3GpREbzXh3v3cdZCnitK 26XDHUPk4u4Xhl88+0sxSv8+HsLvMsYe7Y7m2LzfWTUNXwWPjJHQ8hCPMTIbxQEOMAB+ S9ZPZk7OrHdz7coXnRR1j5ByqfiAeGrEx6peAnz0jxTSNLlztUr+V4wzrGETHbpvv6rm 5T4FDHz/o6Bi5myDVg1VzjZIHBpaxfX5lpUoefVIFW7jVqnFJZMTOe2T2LEet8yIoBwf SneA== 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 cq6-20020a17090af98600b0024987972c87si17216813pjb.98.2023.04.26.17.45.19; Wed, 26 Apr 2023 17:45:34 -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 S242743AbjD0Anx convert rfc822-to-8bit (ORCPT + 63 others); Wed, 26 Apr 2023 20:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239903AbjD0Anw (ORCPT ); Wed, 26 Apr 2023 20:43:52 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0EE93AB3; Wed, 26 Apr 2023 17:43:51 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33R0hIY01023488, 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 33R0hIY01023488 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Thu, 27 Apr 2023 08:43:18 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) 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:43:20 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Thu, 27 Apr 2023 08:43:20 +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:43:20 +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 2/2] wifi: rtw88: fix incorrect error codes in rtw_debugfs_set_* Thread-Topic: [PATCH v3 2/2] wifi: rtw88: fix incorrect error codes in rtw_debugfs_set_* Thread-Index: AQHZeGDstDkyg3+QP0qft6HC8zIpZa8+UavA Date: Thu, 27 Apr 2023 00:43:20 +0000 Message-ID: <61160eece9d545b5bfd2569437482fb5@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: RTEXDAG02.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 2/2] wifi: rtw88: fix incorrect error codes in rtw_debugfs_set_* > > If there is a failure during copy_from_user or user-provided data > buffer is invalid, rtw_debugfs_set_* should return negative > error code instead of a positive value count. > > Fix this bug by returning correct error code. > > Signed-off-by: Zhang Shurong Reviewed-by: Ping-Ke Shih [...]