netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: trix@redhat.com
Cc: jussi.kivilinna@iki.fi, davem@davemloft.net, kuba@kernel.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Tom Rix <trix@redhat.com>
Subject: Re: [PATCH] rndis_wlan: tighten check of rndis_query_oid return
Date: Tue, 18 Aug 2020 12:53:01 +0000 (UTC)	[thread overview]
Message-ID: <20200818125301.5F7B7C433A1@smtp.codeaurora.org> (raw)
In-Reply-To: <20200811140219.8412-1-trix@redhat.com>

trix@redhat.com wrote:

> From: Tom Rix <trix@redhat.com>
> 
> clang static analysis reports this problem
> 
> rndis_wlan.c:3147:25: warning: Assigned value is garbage or undefined
>                 wiphy->max_num_pmkids = le32_to_cpu(caps.num_pmkids);
>                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> The setting of caps happens here, with a call to rndis_query_oid()
> 
> 	retval = rndis_query_oid(usbdev,
> 	if (retval >= 0) {
> 
> Reviewing rndis_query_oid() shows that on success 0 is returned,
> failure is otherwise.  So the retval check is not tight enough.
> So tighten the retval check.  Similar problem in
> rndis_wlan_get_caps().
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Patch applied to wireless-drivers-next.git, thanks.

094dd0d73062 rndis_wlan: tighten check of rndis_query_oid return

-- 
https://patchwork.kernel.org/patch/11709263/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


      reply	other threads:[~2020-08-18 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 14:02 [PATCH] rndis_wlan: tighten check of rndis_query_oid return trix
2020-08-18 12:53 ` Kalle Valo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200818125301.5F7B7C433A1@smtp.codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=jussi.kivilinna@iki.fi \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).