Re: [PATCH net-next v5 3/4] net: macb: Add ARP support to WOL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux