Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1115216pxb; Sun, 22 Aug 2021 06:23:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvHmhSCtnulqi9Xh/sYLUSPZlMBJd79jWl/WY/guHGoi0bxJRVuHSi4F5/jq5q8iw0GJrP X-Received: by 2002:a05:6402:26d3:: with SMTP id x19mr586708edd.173.1629638598734; Sun, 22 Aug 2021 06:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629638598; cv=none; d=google.com; s=arc-20160816; b=m+BDbDfri7bRQnvojg9ZvPD17mngyzeUpQpaqyFZBKrkMuGZaAg6JrByPe4KLnaUvx pKgtdIRXUUsxbzDjYTwzF8hOjNC7vUK5Ch/LR/FbLhpfkh+RSrz6Nfy+JciDVUEa4NnM aLOXi8iqjbqsmuDXJqh8P5ns9MSda03Bv83mfUQHAxCKfqyIzu4s7ffjeb9r1vNWOzl6 3Wxwk7mF8Rv1d+McXtr31KSG2zyryW1Y6cd2QeNsUjderctnLeWicIEaqfhC0lVtQxap QZ36k1mKsKq7awHnaWbpcdBvbM08Helwc3DPrqiisCI2xfXJUwmG1S2ys6c1Y/ZLRcUV /QlA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zqTECFuRJLYarOpHoCCGqs8juSsxGgWk5yRR8uFe8PQ=; b=waG9TLSp9sdis5XkYVAKWlQwhbSwkD1JFfhgTtkmIwDOVBFNqkWlV7Rg5KpbBc/J1B JQkmYJrwzICCKfdZ6spRQ45x6QQD4vf3YlLRLjTpT4t3y/ogH0+angQjeiyqv0GHVcdO R3AbvL4mMLwi53x9Nkz4lJ/x2mHJy7z7XPLj12JoJ3+aRBdcu4WS1iUltCbyCB8lV8ca 4JSv/xJ9u3k9URfjWR+tAk7o5HGkG62fNWPzF6Ame+UsJ3pj5EqHoVlZyNfjRLGBzavV yxuEundgwUOYJw/47BMnSm7dHSUcs2yt5O4cREhuuKlTYfTjQeta/cDyN0IL2GJNG1nF XHWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B0zxd0Dr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si11875233edy.417.2021.08.22.06.22.54; Sun, 22 Aug 2021 06:23:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B0zxd0Dr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231583AbhHVNWW (ORCPT + 99 others); Sun, 22 Aug 2021 09:22:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbhHVNWV (ORCPT ); Sun, 22 Aug 2021 09:22:21 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 277D4C061575 for ; Sun, 22 Aug 2021 06:21:34 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id g21so21753125edw.4 for ; Sun, 22 Aug 2021 06:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zqTECFuRJLYarOpHoCCGqs8juSsxGgWk5yRR8uFe8PQ=; b=B0zxd0DrjaauXCH+xSyRZj73jq8+b3uylHtP4zqqDF4bCYYG5qLbEYqOom/Z/x1Xnl KDqKU8vv5PqjsHIBs2imIBvph+BPJHQE2wPBvnZtE2U6qsQ15UkUtmKktLRHU6fRSBhC z5McxyJM1eqccfMarsX7TYICT7JidPetxYzW2sSzB+RyjYzQjR97V1waKYbrABfsS9Rt AmsSBUtZmttjq77ny6qqOk4UIjjLfKw33Dv4nPKpl4/GULkfPgwBmygStXX9dvZuLv4o /M0Uu4gkA4Jy+XytmbCR1OOF7nHecmEKxFiBLmjulcNheI7lfOzjJ6rLQp76GAPzibzv Pynw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zqTECFuRJLYarOpHoCCGqs8juSsxGgWk5yRR8uFe8PQ=; b=LjIZ6xCMQKKfFxJq3EgeHYmd6pCG/e1PJM7pMQUXP0JwN1T7xrGXiuW46RU5XzqJLU mdeIgQe5+t0aPdczWMeiwHT5MDwvyd8ohy55l3VdpvNR2sew5YOT2+a+Y98ynRylvZdB PU4beHldM69apc3AMNEo9i22lsWZyRslRmjErMFJG4JWkRVAY03qIGzOmYyoivWjbHLZ 8Z9q40B1NoqPSxqtx132QVdPisvQAFdJODvRt9WI1IzDzyXsrNVFw3o/5HbW4EmmY4US SmphYhn4y7kF/OvMcWuVEuGUID1MRkgN9MX5jvqLWy20cA9BzJ43TS/nsYb/sS4txLXK g9Fw== X-Gm-Message-State: AOAM530ii/omtVRjA0O7Ml6wI4/U2+u8u9KNq0ajZMZVrlYC09zc7E6U JMlrQ/5FdJC49pjAJBul5LQ= X-Received: by 2002:a05:6402:2302:: with SMTP id l2mr14428895eda.13.1629638492669; Sun, 22 Aug 2021 06:21:32 -0700 (PDT) Received: from localhost.localdomain (host-79-22-100-164.retail.telecomitalia.it. [79.22.100.164]) by smtp.gmail.com with ESMTPSA id v13sm5727689ejh.62.2021.08.22.06.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Aug 2021 06:21:32 -0700 (PDT) From: "Fabio M. De Francesco" To: Pavel Skripkin , Greg KH Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, straube.linux@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: Re: [PATCH RFC 0/3] staging: r8188eu: avoid uninit value bugs Date: Sun, 22 Aug 2021 15:21:30 +0200 Message-ID: <2244219.zNr1yEsLHP@localhost.localdomain> In-Reply-To: References: <435eea22-da31-1ebc-840c-ee9e42b27265@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday, August 22, 2021 2:39:34 PM CEST Greg KH wrote: > On Sun, Aug 22, 2021 at 03:10:56PM +0300, Pavel Skripkin wrote: > > On 8/22/21 1:59 PM, Fabio M. De Francesco wrote: > > > On Sunday, August 22, 2021 12:09:29 PM CEST Pavel Skripkin wrote: [...] > > > So, it's up to the callers to test if (!_rtw_read*()) and then act > > > accordingly. If they get 0 they should know how to handle the errors. > > > > Yes, but _rtw_read*() == 0 indicates 2 states: > > 1. Error on transfer side > > 2. Actual register value is 0 > > That's not a good design, it should be fixed. Note there is the new > usb_control_msg_recv() function which should probably be used instead > here, to prevent this problem from happening. I think that no functions should return 0 for signaling FAILURE. If I'm not wrong, the kernel quite always prefers to return 0 on SUCCESS and <0 on FAILURE. Why don't you just fix this? > > > In summation. if anything should be changed, it is the code of the callers of > > > _rtw_read*() if you find out they they don't properly handle the returning > > > values of this function. You should find every place where _rtw_read*() are > > > called and figure out if the returns are properly checked and handled; if not, > > > make some change only there. > > > > > > Larry, Philip, where are you? Am I missing something? > > Relax, there is no need to get jumpy, people do not have to respond > instantly to emails here. Especially when it is not their job to do so. I should have placed a big smile at the end of the phrase. I was just kidding while trying to get their attention. I know there is no hurry and that no one has any obligation of this kind. Again, just kidding :) Thanks, Fabio > greg k-h