[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a02fac3b21a97dc766d65c4ed2d080f1ed87e87e.camel@redhat.com>
Date: Fri, 14 Jun 2024 11:16:17 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Vineeth Karumanchi <vineeth.karumanchi@....com>,
nicolas.ferre@...rochip.com, claudiu.beznea@...on.dev, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
linux@...linux.org.uk, vadim.fedorenko@...ux.dev, andrew@...n.ch
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, git@....com
Subject: Re: [PATCH net-next v5 3/4] net: macb: Add ARP support to WOL
Hi,
On Tue, 2024-06-11 at 21:58 +0530, Vineeth Karumanchi wrote:
> @@ -5257,6 +5247,12 @@ static int __maybe_unused macb_suspend(struct device *dev)
> return 0;
>
> if (bp->wol & MACB_WOL_ENABLED) {
> + /* Check for IP address in WOL ARP mode */
> + ifa = rcu_dereference(__in_dev_get_rcu(bp->dev)->ifa_list);
I'm sorry for the late feedback, but:
- you can use rcu_access_pointer() here instead of rcu_dereference()
- (much more importantly) __in_dev_get_rcu() can return a NULL pointer,
you can't unconditionally dereference it.
Thanks!
Paolo
Powered by blists - more mailing lists