linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: alexandre.torgue@st.com, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com, joabreu@synopsys.com,
	mcoquelin.stm32@gmail.com, peppe.cavallaro@st.com,
	davem@davemloft.net, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net: stmmac: add sanity check to device_property_read_u32_array call
Date: Wed, 19 Jun 2019 07:55:28 +0100	[thread overview]
Message-ID: <92f9e5a6-d2a2-6bf2-ff8a-2430fe977f93@canonical.com> (raw)
In-Reply-To: <20190619051308.23582-1-martin.blumenstingl@googlemail.com>

On 19/06/2019 06:13, Martin Blumenstingl wrote:
> Hi Colin,
> 
>> Currently the call to device_property_read_u32_array is not error checked
>> leading to potential garbage values in the delays array that are then used
>> in msleep delays.  Add a sanity check to the property fetching.
>>
>> Addresses-Coverity: ("Uninitialized scalar variable")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> I have also sent a patch [0] to fix initialize the array.
> can you please look at my patch so we can work out which one to use?
> 
> my concern is that the "snps,reset-delays-us" property is optional,
> the current dt-bindings documentation states that it's a required
> property. in reality it isn't, there are boards (two examples are
> mentioned in my patch: [0]) without it.
> 
> so I believe that the resulting behavior has to be:
> 1. don't delay if this property is missing (instead of delaying for
>    <garbage value> ms)
> 2. don't error out if this property is missing
> 
> your patch covers #1, can you please check whether #2 is also covered?
> I tested case #2 when submitting my patch and it worked fine (even
> though I could not reproduce the garbage values which are being read
> on some boards)
> 
> 
> Thank you!
> Martin
> 
> 
> [0] https://lkml.org/lkml/2019/4/19/638
> 
Is that the correct link?

Colin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-06-19  6:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 16:58 [PATCH] net: stmmac: add sanity check to device_property_read_u32_array call Colin King
2019-06-19  1:04 ` David Miller
2019-06-19  5:13 ` Martin Blumenstingl
2019-06-19  6:55   ` Colin Ian King [this message]
2019-06-20  1:34     ` Martin Blumenstingl
2019-06-25  4:44       ` Martin Blumenstingl
2019-06-25  7:58         ` Colin Ian King
2019-06-28  4:15           ` Martin Blumenstingl
2019-06-28  8:32             ` Colin Ian King
2019-06-28 16:05               ` Martin Blumenstingl
2019-07-01 22:43                 ` Martin Blumenstingl
2019-07-02  6:48                   ` Colin Ian King

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=92f9e5a6-d2a2-6bf2-ff8a-2430fe977f93@canonical.com \
    --to=colin.king@canonical.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=joabreu@synopsys.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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).