Skip to content
Snippets Groups Projects
Select Git revision
  • ec4fe4bcc584b55e24e8d1768f5510a62c0fd619
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

i40iw_utils.c

  • Feng Tang's avatar
    ec4fe4bc
    i40iw: Avoid panic when handling the inetdev event · ec4fe4bc
    Feng Tang authored
    
    There is a panic reported that on a system with x722 ethernet, when doing
    the operations like:
    
    	# ip link add br0 type bridge
    	# ip link set eno1 master br0
    	# systemctl restart systemd-networkd
    
    The system will panic "BUG: unable to handle kernel null pointer
    dereference at 0000000000000034", with call chain:
    
    	i40iw_inetaddr_event
    	notifier_call_chain
    	blocking_notifier_call_chain
    	notifier_call_chain
    	__inet_del_ifa
    	inet_rtm_deladdr
    	rtnetlink_rcv_msg
    	netlink_rcv_skb
    	rtnetlink_rcv
    	netlink_unicast
    	netlink_sendmsg
    	sock_sendmsg
    	__sys_sendto
    
    It is caused by "local_ipaddr = ntohl(in->ifa_list->ifa_address)", while
    the in->ifa_list is NULL.
    
    So add a check for the "in->ifa_list == NULL" case, and skip the ARP
    operation accordingly.
    
    Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    ec4fe4bc
    History
    i40iw: Avoid panic when handling the inetdev event
    Feng Tang authored
    
    There is a panic reported that on a system with x722 ethernet, when doing
    the operations like:
    
    	# ip link add br0 type bridge
    	# ip link set eno1 master br0
    	# systemctl restart systemd-networkd
    
    The system will panic "BUG: unable to handle kernel null pointer
    dereference at 0000000000000034", with call chain:
    
    	i40iw_inetaddr_event
    	notifier_call_chain
    	blocking_notifier_call_chain
    	notifier_call_chain
    	__inet_del_ifa
    	inet_rtm_deladdr
    	rtnetlink_rcv_msg
    	netlink_rcv_skb
    	rtnetlink_rcv
    	netlink_unicast
    	netlink_sendmsg
    	sock_sendmsg
    	__sys_sendto
    
    It is caused by "local_ipaddr = ntohl(in->ifa_list->ifa_address)", while
    the in->ifa_list is NULL.
    
    So add a check for the "in->ifa_list == NULL" case, and skip the ARP
    operation accordingly.
    
    Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>