Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1096870pxb; Sun, 22 Aug 2021 05:56:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGYcvPcyDx6aV6gQ18QDYj4C5Vjfwe28VXSjyiOe013ebCTwKLcvSPYs+/MSUNZ3StEtjk X-Received: by 2002:a17:906:c9cb:: with SMTP id hk11mr30415721ejb.544.1629636963231; Sun, 22 Aug 2021 05:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629636963; cv=none; d=google.com; s=arc-20160816; b=oFkPcXdRwQqfY2JA0jUjS+2zuQgUzc5HG58vFuqSwQpV/oTskdX+1HFeva84YvyNdI 8MRB0g8TClori6GXAlEnoUn1eciklUAmIFosVIzneU6efcr742eChV4yvhXWR0qDMFPJ WAa9ptC4u0RSK6gVXxy4cTwvVCOMI7uhJ5fjt0cJN1M7Ufo+XqjFP+tBrZjwF9v0KYyC vraW0/0E4CG9gSSl9m/dJrJdX3fLztFhIhy2BTGHgmqohs/AE/MWca8K7YJ4lYhHAb7O fn25+fzMW6msHnGpDZPM3d/orV8fuwCIMHmQz98erOfM7m5kdL4BZ6LDrJpgrtrIdNwI NDDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=rxmlNdlUfU1P9x2yEO9RufRY6ZMTXEHbwKbvIeBfIWg=; b=Z66nNK3t+8THYswMMQdeQOxDzogPYo8Ru3ZIze47q1LO7bJoRxmoJww12Be540L/vK 0d2kYjYa4EBZXe6Pt/y3v22C3jHglx52h0Ot/hU7z1A91ojg5jyF7/VLfZNi6awCdwOx LOZ5Ps3fJw6iZPzHeBOWo5k1mKNsw1wvK0gwcdGjH+SkjFoB6gzPd3q0X/wxjf9FjP4B GE0lpnRPkWVTX1jsUaILM5bAUslK8bJKjgMc5oyKQEMi8892EXBp4QrwOfsy8sGUSL4l bgw6Dq9oV+lrUA6R5FZImaHoS1eIRToPn7XGfA/za1VuZitYAnySQ/GqaxFP7Rt/vKbq /Eqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QOXny0/o"; 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 du15si12089846ejc.498.2021.08.22.05.55.26; Sun, 22 Aug 2021 05:56:03 -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="QOXny0/o"; 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 S231580AbhHVMvU (ORCPT + 99 others); Sun, 22 Aug 2021 08:51:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbhHVMvU (ORCPT ); Sun, 22 Aug 2021 08:51:20 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5DB8C061575 for ; Sun, 22 Aug 2021 05:50:38 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id s12so901516ljg.0 for ; Sun, 22 Aug 2021 05:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rxmlNdlUfU1P9x2yEO9RufRY6ZMTXEHbwKbvIeBfIWg=; b=QOXny0/osgqA6UzlB1dRo/nj4oBlLuQxkEwHkmznxMXNCBaWVuAjtiWRGbn5epQ3q+ vjNZ2vV9Ml3MFux+avJmWxIR8aiVl7+jL8K8Xq+YrbVlP40bmydtjikMhemhLa9LmrLm Q+HRmjfJyALVIYzDjEWx4dbB6rT0UT2r9X65jM7gzdN4b74lhmbpPH3WJGhw+VR3aveO C7U63WMcXmzLDIbzIq9UPS85fCd91X3YV3Tarq+nQDuQlPOKoqhHcrb7jOmnQUXjKOli ymMnOWUi4Y5Je/gnpZV3Awb7/29Qbcad71QN3YKuNx4l9J25ANCr7ktOynDWZ7KVU58g SSfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rxmlNdlUfU1P9x2yEO9RufRY6ZMTXEHbwKbvIeBfIWg=; b=jDTlQPYa+znscRybL/VHB2sBYYT2l7UL6xf8jwlCd/MhgErigtLsaHMUPuCU7Ew0zc yTMOhr1rmuO9mMd/LJFVEQ4CgIzkvVHNHIsdLblNThVW9N4WrojH4brleY5sdYLOBPrp 4ridn9rwHhNozMHUe9ufPqr3ZTqza7M+8l9xqfFBuYn0IYpR2Gmc1CCoIsqNrM4w/4GW NNaxIhsHOm3mtVJjM8dEgp91GR8e+PJwXPLpnpJMgT9BNOhLX6DI2A/j/Uqzpyiyma+/ IJ5rzdPeGiLHQTw1p0Jny4fkYKSIVFa1FOd+Wg4XHnEDGDZ6ZB87sldVGmcuiS7865FO RGJg== X-Gm-Message-State: AOAM5308LepxW2Z8ELA8usAv5BZiRhR3N1uU8sk/rvvdYyBUoZriKxaR Bq+ovRaoFCP6zrR86jtvV20= X-Received: by 2002:a2e:a5c6:: with SMTP id n6mr23634756ljp.204.1629636637250; Sun, 22 Aug 2021 05:50:37 -0700 (PDT) Received: from [192.168.1.11] ([46.235.66.127]) by smtp.gmail.com with ESMTPSA id l2sm1192534lfk.84.2021.08.22.05.50.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Aug 2021 05:50:36 -0700 (PDT) Subject: Re: [PATCH RFC 0/3] staging: r8188eu: avoid uninit value bugs To: Greg KH Cc: "Fabio M. De Francesco" , Larry.Finger@lwfinger.net, phil@philpotter.co.uk, straube.linux@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser References: <10584649.zhyk0TxWeL@localhost.localdomain> <2327383.5TodInGmHT@localhost.localdomain> <435eea22-da31-1ebc-840c-ee9e42b27265@gmail.com> From: Pavel Skripkin Message-ID: Date: Sun, 22 Aug 2021 15:50:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/22/21 3:39 PM, Greg KH wrote: >> >> 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. > Thank you, Greg, for confirmation. That's was the point why I started to write this series :) I think, usb_control_msg_recv() won't help us with this problem, since all rtw_read*() functions return an unsigned value now. In future, when driver code will be fixed (ex: a lot of void function, which can fail and leave passed pointer uninitialized) we can move to new usb API and then move driver out of staging :) With regards, Pavel Skripkin