From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "Kévin L'hôpital" <kevin.lhopital@savoirfairelinux.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Dan Murphy <dmurphy@ti.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Enguerrand de Ribaucourt
<enguerrand.de-ribaucourt@savoirfairelinux.com>
Subject: Re: [PATCH] net: phy: fix phy_get_internal_delay accessing an empty array
Date: Thu, 7 Mar 2024 09:53:43 +0000 [thread overview]
Message-ID: <ZemOp4MGP/UK31wq@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240307085254.183905-1-kevin.lhopital@savoirfairelinux.com>
On Thu, Mar 07, 2024 at 09:52:54AM +0100, Kévin L'hôpital wrote:
> The phy_get_internal_delay function could try to access to an empty
> array in the case that the driver is calling phy_get_internal_delay
> without defining delay_values and rx-internal-delay-ps or
> tx-internal-delay-ps is defined to 0 in the device-tree.
> This will lead to "unable to handle kernel NULL pointer dereference at
> virtual address 0". To avoid this kernel oops, the test should be delay
> >= 0. As there is already delay < 0 test just before, the test could
> only be size == 0.
>
> Fixes: 92252eec913b ("net: phy: Add a helper to return the index for of the internal delay")
> Signed-off-by: Kévin L'hôpital <kevin.lhopital@savoirfairelinux.com>
> Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
The sign-offs look wrong to me. They indicate the path that the patch is
taking to be merged into mainline. Who is the author of this patch and
who is passing it along? If it's co-development, then there is a specific
tag for that.
For the actual patch itself:
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-03-07 9:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 8:52 [PATCH] net: phy: fix phy_get_internal_delay accessing an empty array Kévin L'hôpital
2024-03-07 9:53 ` Russell King (Oracle) [this message]
2024-03-07 10:47 ` Kévin L'hôpital
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=ZemOp4MGP/UK31wq@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dmurphy@ti.com \
--cc=edumazet@google.com \
--cc=enguerrand.de-ribaucourt@savoirfairelinux.com \
--cc=hkallweit1@gmail.com \
--cc=kevin.lhopital@savoirfairelinux.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@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).