Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1172215pxb; Sun, 22 Aug 2021 08:06:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUYHPb+mZxTFVYsO/X8vuXwYKN7TM40t1kGHZzI0UhkGV7nOsdci3GEqT/haGJ7TBZk2Wd X-Received: by 2002:a17:906:b0d1:: with SMTP id bk17mr31391268ejb.59.1629644769483; Sun, 22 Aug 2021 08:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629644769; cv=none; d=google.com; s=arc-20160816; b=eUFCZReWXte+mU2qqBySLc7BYudUnqG6HhzGnLpwPVrxCsgGy2LmrUIgVkIC0Hh7Rb NAeO0mvNIVE2PDjZURWRsxC3jDuIOgGu45v8024m3f+QLS60gclX1iVJK39aimh6TPgP GW1YP3wgNhFgfWlCQmtWDeJzX2qgLd+3hNiy51WvQ6Vg0RF64TjLZu7mYEZKEK8dQ48j 8Wx4Q6w/HHmuthQUGZs4M1homutA29St0WbtdGQfdCOyopVo/1tsfvT+jCoS1vuq9s3h 9mWbWzGxsuVfTVjUYlopSSeFm0YSEsz7EscgsUZ0EfkdWwNef2r13d2ZGWLGgbHKu7sP cVsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zXD+5VHMd7QYSc+oqJ848WpTg1hq4vUp/oR/6I5ToGU=; b=OBb5plxVdjGQvnUpADBgzN7a82KvFQCRTd36UwqRcf9HeYZaw8hGwti0Rto6NgpRCL ebG4nM4ihBM/5CYUQmmHoxEzk8PT6CO9Bj+7Zpfi6FFFbg0t73tFSOzk1xCC1PaFTirK LyisR8lDprh0tQ21VV2WpT1d59BfLC4jzDK6GVFzHGeaTehYD83+FMGikPlw7txDL2rM 1IDed8XL2lWZjuJfTIKGKwfVoN2zQCwgQWQFtOslkUF4TCsXnkVlQyuqd1ZIRzjB5720 xqlhoOJG4EpU27WnMZUwGsl68kWljJUwxccLOZasNS3FwXnXaNsXO1/13fI6Kd7Dceox WUWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@philpotter-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=x52fkWOG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga2si12322964ejc.213.2021.08.22.08.05.46; Sun, 22 Aug 2021 08:06:09 -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=@philpotter-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=x52fkWOG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233643AbhHVPFL (ORCPT + 99 others); Sun, 22 Aug 2021 11:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233009AbhHVPFK (ORCPT ); Sun, 22 Aug 2021 11:05:10 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2EAAC061575 for ; Sun, 22 Aug 2021 08:04:29 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id k24so14193491pgh.8 for ; Sun, 22 Aug 2021 08:04:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zXD+5VHMd7QYSc+oqJ848WpTg1hq4vUp/oR/6I5ToGU=; b=x52fkWOGcLRNhnA+tJucUVoRxBPE5kYI8BkWvF3EUHx16W+RwVmOy9d5siJCYgODaE gK4b/EYgtZIZjbSVgi8qEXivS/+MPHyJaleBuSmESCoBepcVTcL9j2oS7glQJRF/ex6V qlUnM1qU2SYNO6I9plDJ9cbQ3iyIF84b3Bm1GLpFjM3c58EfhEgWdtnDgNMo0YfmEjGE ZHSPxEJxNKqvJH6COm3CKUB/q0sNDJ2JXhqvwnq5ldEZCuUfoP3YFi41weQhR/z8GkiB plN0bnWPhjdYjSi/nbkTJcuxWgl7uzOgefbZvVEsEtHoZlrB4ZTK7VUdfWFeoB/Ogxb9 1HBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zXD+5VHMd7QYSc+oqJ848WpTg1hq4vUp/oR/6I5ToGU=; b=btKmmdfkr0Mvmac1t3Om1nckDiYiX86PjKyVNaO0vuxBbaquC4ae7PUK0ILCO+WX+u VKxpiV2kRa8LdJJmh1jzTO3EpoujDkccIEGiGlME0jMGzh9xoQpD0QorkO2eFJY6v79X DKP9Mj3uUaXi33EqQQpdidS6LEn1r0cPt5tfzt3DY6uPP6pNja/kpGq0HXWRTIBpmJQI 3ilJgX/usYwnu4MHn2m21dOUqn2Q2XFv3mhQSkgdGQJPR50go4/xS7AU5g5UaVr+A2T5 qBmNedb85hozJ3PpYcQTGOqTh0ucMsrT+/nAP6E/2x/aYYqcddc3sRN/CmWq84fs4XSn cI6g== X-Gm-Message-State: AOAM533OesfRYXmgdsYzXh9kSopN6BHKEEMWyJU9rAgNa7mCDxbteU4l X/vb6lqohJ/VH3Kasx4oMBfqEQe8jHEP+oeI81IKFA== X-Received: by 2002:a63:d910:: with SMTP id r16mr27752915pgg.318.1629644669117; Sun, 22 Aug 2021 08:04:29 -0700 (PDT) MIME-Version: 1.0 References: <435eea22-da31-1ebc-840c-ee9e42b27265@gmail.com> <2244219.zNr1yEsLHP@localhost.localdomain> In-Reply-To: <2244219.zNr1yEsLHP@localhost.localdomain> From: Phillip Potter Date: Sun, 22 Aug 2021 16:04:18 +0100 Message-ID: Subject: Re: [PATCH RFC 0/3] staging: r8188eu: avoid uninit value bugs To: "Fabio M. De Francesco" Cc: Pavel Skripkin , Greg KH , Larry Finger , Michael Straube , linux-staging@lists.linux.dev, Linux Kernel Mailing List , Martin Kaiser Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 22 Aug 2021 at 14:21, Fabio M. De Francesco wrote: > > 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 > > > > Dear Fabio, I can't speak for anyone else, but I will reply to as many e-mails as I'm able - there is no need to try and get my attention, you shall have it by default, as and when I am able to give it :-) As V2 has been sent out by Pavel, I will try and take a look soon. Regards, Phil