diff options
Diffstat (limited to 'net/can/af_can.c')
-rw-r--r-- | net/can/af_can.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c index 484bbf6dd032..8035fbf526ae 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c | |||
@@ -615,7 +615,7 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev, | |||
615 | struct can_frame *cf = (struct can_frame *)skb->data; | 615 | struct can_frame *cf = (struct can_frame *)skb->data; |
616 | int matches; | 616 | int matches; |
617 | 617 | ||
618 | if (dev->type != ARPHRD_CAN || dev_net(dev) != &init_net) { | 618 | if (dev->type != ARPHRD_CAN || !net_eq(dev_net(dev), &init_net)) { |
619 | kfree_skb(skb); | 619 | kfree_skb(skb); |
620 | return 0; | 620 | return 0; |
621 | } | 621 | } |
@@ -728,7 +728,7 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg, | |||
728 | struct net_device *dev = (struct net_device *)data; | 728 | struct net_device *dev = (struct net_device *)data; |
729 | struct dev_rcv_lists *d; | 729 | struct dev_rcv_lists *d; |
730 | 730 | ||
731 | if (dev_net(dev) != &init_net) | 731 | if (!net_eq(dev_net(dev), &init_net)) |
732 | return NOTIFY_DONE; | 732 | return NOTIFY_DONE; |
733 | 733 | ||
734 | if (dev->type != ARPHRD_CAN) | 734 | if (dev->type != ARPHRD_CAN) |