Message ID | 20230112115850.9208-1-n.zhandarovich@fintech.ru |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3847711wrt; Thu, 12 Jan 2023 04:16:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXukUd4v2uSgEqmfY92Eg8HxXneSJRldeYLoDKKqNLbPZ32OhZnAEeKE/Ay8z0QYQo35WyDw X-Received: by 2002:a05:6a21:998a:b0:ad:f86d:c0bc with SMTP id ve10-20020a056a21998a00b000adf86dc0bcmr116586369pzb.7.1673525809592; Thu, 12 Jan 2023 04:16:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673525809; cv=none; d=google.com; s=arc-20160816; b=Z0Aa4pm+f3vhmmVsw63hHk5CrDOzdsla9WHIYDruUB0/ByVYblJyL9I68Odb28H0dM BMSUnW6Hlf3aScD4V01sVaMm8rjG0YpvjZXpArMbdAxsn1s4Vg64H6faenJE625VgBom A8bsFN9BOyQ91FbuetCYcp1f/qyko8l8QEnV1Foon96yOZhZGRccbIVVsDK/cBqOZLbq PVSAC9LxnojkUL02vPVzMajHyQRcTKsJm2as7IStKGb0kv/aQnKP3js1zMuouLtc612Z SBmSuh0OFaH1+yygbLFiXPl9quyb7dIGDwMroU1+4f16g2uv5f67vF/1gWFuZgFGx2w3 bMtg== 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 :message-id:date:subject:cc:to:from; bh=HYCg2fGXGMv6OIXRvH46DWoYYb10bN8C4MjQ2KkURLo=; b=mdgAUpVgMSPP+tS1DFeoAJZQAKcgrw9U80WNRaa/98nLzWR2WV/Ok4lTFu+bhcDz6z dJR6OgYLFhi9TeM9DFl7+NoddVmYt8ejwPBthuOIMix42jO2pg79Hb1xciijt3T2d6if UCl49Jomh4/jICOwLDdmwZ0JJxP8fPhfolXH77+NbuL8Fgw7vYL5jEn9381d2mbrR9i1 3AWnYAirUsgJUaQCQSjC4MjUoZS/Ohrasrd7yiyEDRyUPfVmvzUqXD9O5H++zhqlbVnp Fj8185ogdO2MKkzzistItS9qsuxQiFbl5MhfFKmdUYw1Dk5qroRGH5qwVpC7MzFHYDcp QBow== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a63610a000000b004bf9be89c20si444141pgb.33.2023.01.12.04.16.37; Thu, 12 Jan 2023 04:16:49 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231610AbjALMF2 (ORCPT <rfc822;zhuangel570@gmail.com> + 99 others); Thu, 12 Jan 2023 07:05:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233260AbjALME3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 12 Jan 2023 07:04:29 -0500 Received: from exchange.fintech.ru (exchange.fintech.ru [195.54.195.159]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79AEB54D81; Thu, 12 Jan 2023 03:59:02 -0800 (PST) Received: from Ex16-01.fintech.ru (10.0.10.18) by exchange.fintech.ru (195.54.195.159) with Microsoft SMTP Server (TLS) id 14.3.498.0; Thu, 12 Jan 2023 14:58:59 +0300 Received: from localhost (10.0.253.157) by Ex16-01.fintech.ru (10.0.10.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Thu, 12 Jan 2023 14:58:58 +0300 From: Nikita Zhandarovich <n.zhandarovich@fintech.ru> To: <stable@vger.kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> CC: Nikita Zhandarovich <n.zhandarovich@fintech.ru>, Felix Fietkau <nbd@nbd.name>, Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>, Ryder Lee <ryder.lee@mediatek.com>, Kalle Valo <kvalo@codeaurora.org>, <linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>, <linux-mediatek@lists.infradead.org>, <linux-kernel@vger.kernel.org>, "Alexey Khoroshilov" <khoroshilov@ispras.ru>, <lvc-project@linuxtesting.org> Subject: [PATCH 5.10 0/1] mt76: move mt76_init_tx_queue in common code Date: Thu, 12 Jan 2023 03:58:49 -0800 Message-ID: <20230112115850.9208-1-n.zhandarovich@fintech.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.0.253.157] X-ClientProxiedBy: Ex16-01.fintech.ru (10.0.10.18) To Ex16-01.fintech.ru (10.0.10.18) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754818906218208288?= X-GMAIL-MSGID: =?utf-8?q?1754818999342651249?= |
Series |
mt76: move mt76_init_tx_queue in common code
|
|
Message
Nikita Zhandarovich
Jan. 12, 2023, 11:58 a.m. UTC
Svace has identified unchecked return value of mt7615_init_tx_queue function in 5.10 branch, even though it makes sense to track it instead. This issue is fixed in upstream version by Lorenzo's patch. The same patch can be cleanly applied to the 5.10 branch. Found by Linux Verification Center (linuxtesting.org) with SVACE.
Comments
On Thu, Jan 12, 2023 at 03:58:49AM -0800, Nikita Zhandarovich wrote: > Svace has identified unchecked return value of mt7615_init_tx_queue > function in 5.10 branch, even though it makes sense to track it > instead. This issue is fixed in upstream version by Lorenzo's patch. > > The same patch can be cleanly applied to the 5.10 branch. I do not understand, what issue/bug does this fix? And how can you trigger it? And why only worry about the 5.10.y kernel branch? thanks, greg k-h
My apologies, I should've have explained my reasoning better. 1. My issue with 5.10 version of mt7615_init_tx_queues() in drivers/net/wireless/mediatek/mt76/mt7615/dma.c is that return value of final call to mt7615_init_tx_queue() is not taken into account when returning result of mt7615_init_tx_queues(). So, if last mt7615_init_tx_queue() fails (due to memory issues, for instance), parent function will still erroneously return 0. 2. To correct the issue, I turned to Lorenzo's patch in b671da33d1c5973f90f098ff66a91953691df582 which solves my petit problem as well as rewrites a single mt76_init_tx_queue() function to be used across all mt76 drivers. 3. I was torn between writing my own little patch to fix a single mistake or use an existing one that increases code readability and uniformity. I settled on latter. 4. As for this patch exclusivity to 5.10.y branch, I have an incentive to prioritise prioritize 5.10. Wasn't sure I should be the one to suggest the patch for other branches. Thanks, Nikita
On Fri, Jan 13, 2023 at 07:04:45AM -0800, Nikita Zhandarovich wrote:
> My apologies, I should've have explained my reasoning better.
Reasoning for what?
Sorry, I have no context here, please properly quote emails so that we
have a hint as to what is going on. Remember, some of us get 1000+ a
day that we need to process somehow...
thanks,
greg k-h