From: David Miller <davem@davemloft.net>
To: mka@chromium.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	dianders@chromium.org
Subject: Re: [PATCH] netpoll: Fix device name check in netpoll_setup()
Date: Wed, 26 Jul 2017 17:02:11 -0700 (PDT)	[thread overview]
Message-ID: <20170726.170211.1958869072074713467.davem@davemloft.net> (raw)
In-Reply-To: <20170725183625.132345-1-mka@chromium.org>
From: Matthias Kaehlcke <mka@chromium.org>
Date: Tue, 25 Jul 2017 11:36:25 -0700
> Apparently netpoll_setup() assumes that netpoll.dev_name is a pointer
> when checking if the device name is set:
> 
> if (np->dev_name) {
>   ...
> 
> However the field is a character array, therefore the condition always
> yields true. Check instead whether the first byte of the array has a
> non-zero value.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Applied, thanks a lot.
     prev parent reply	other threads:[~2017-07-27  0:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 18:36 [PATCH] netpoll: Fix device name check in netpoll_setup() Matthias Kaehlcke
2017-07-26 18:44 ` Doug Anderson
2017-07-26 20:52   ` Cong Wang
2017-07-27  0:02 ` David Miller [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=20170726.170211.1958869072074713467.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dianders@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=netdev@vger.kernel.org \
    /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).