# Re: \[PATCH net\] net: fix NULL pointer dereference in l3mdev\_l3\_rcv

- From: David Ahern \<dsahern@kernel.org\>
- Date: 2025-03-19 02:08:51 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/03/2977319
- Thread: https://ratatoskr.run/netdev/2025/03/2969217/t.md

```text
On 3/18/25 3:07 AM, Wang Liang wrote:
>>> It seems to me that checking master->l3mdev_ops like this is racy.
>> vrf device leaves the l3mdev ops set; that is probably the better way
>> to go.
> 
> Thanks.
> 
> Only l3s ipvlan set the dev->l3mdev_ops to NULL at present, I will delete
> 'dev->l3mdev_ops = NULL' in ipvlan_l3s_unregister(), is that ok?
> 

I think that avoids the race you saw. vrf has had the ops for 9 years or
so and not seen that problem.
```
