Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

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

 



Hi Sridhar,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Sridhar-Samudrala/Enable-virtio_net-to-act-as-a-standby-for-a-passthru-device/20180508-123531
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> net/core/net_failover.c:868:16: sparse: Using plain integer as NULL pointer
   net/core/net_failover.c:115:12: sparse: context imbalance in 'net_failover_select_queue' - wrong count at exit

vim +868 net/core/net_failover.c

   828	
   829	/**
   830	 * net_failover_register - Register a failover instance
   831	 *
   832	 * @dev: failover or standby netdev
   833	 * @ops: failover ops
   834	 *
   835	 * Paravirtual drivers supporting 3-netdev model call this routine indirectly
   836	 * via net_failover_create(). It passes failover netdev and ops will be NULL
   837	 * as the slave events are handled internally.
   838	 * Paravirtual drivers supporting 2-netdev model call this routine by passing
   839	 * standby netdev and ops that are called to handle slave register/unregister/
   840	 * link change events.
   841	 *
   842	 * Return: pointer to failover instance
   843	 */
   844	struct net_failover *net_failover_register(struct net_device *dev,
   845						   struct net_failover_ops *ops)
   846	{
   847		struct net_failover *failover;
   848	
   849		failover = kzalloc(sizeof(*failover), GFP_KERNEL);
   850		if (!failover)
   851			return ERR_PTR(-ENOMEM);
   852	
   853		rcu_assign_pointer(failover->ops, ops);
   854		dev_hold(dev);
   855		dev->priv_flags |= IFF_FAILOVER;
   856		rcu_assign_pointer(failover->failover_dev, dev);
   857	
   858		spin_lock(&net_failover_lock);
   859		list_add_tail(&failover->list, &net_failover_list);
   860		spin_unlock(&net_failover_lock);
   861	
   862		netdev_info(dev, "failover master:%s registered\n", dev->name);
   863	
   864		net_failover_existing_slave_register(dev);
   865	
   866		return failover;
   867	
 > 868		return 0;
   869	}
   870	EXPORT_SYMBOL_GPL(net_failover_register);
   871	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux