From: David Miller <davem@davemloft.net>
To: mmrmaximuzz@gmail.com
Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com,
joabreu@synopsys.com, mcoquelin.stm32@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] stmmac: fix pointer check after utilization in stmmac_interrupt
Date: Sat, 02 May 2020 16:33:50 -0700 (PDT) [thread overview]
Message-ID: <20200502.163350.2198213381488533981.davem@davemloft.net> (raw)
In-Reply-To: <20200502092906.GA9883@maxim-hplinux>
From: Maxim Petrov <mmrmaximuzz@gmail.com>
Date: Sat, 2 May 2020 12:29:08 +0300
> The paranoidal pointer check in IRQ handler looks very strange - it
> really protects us only against bogus drivers which request IRQ line
> with null pointer dev_id. However, the code fragment is incorrect
> because the dev pointer is used before the actual check. That leads
> to undefined behavior thus compilers are free to remove the pointer
> check at all.
>
> Signed-off-by: Maxim Petrov <mmrmaximuzz@gmail.com>
Seriously, just remove this check altogether.
prev parent reply other threads:[~2020-05-02 23:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 9:29 [PATCH] stmmac: fix pointer check after utilization in stmmac_interrupt Maxim Petrov
2020-05-02 23:33 ` 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=20200502.163350.2198213381488533981.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexandre.torgue@st.com \
--cc=joabreu@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=mmrmaximuzz@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