Subject: Re: v2: [PATCH 2/3] netdevice: Fix promiscuity and allmulti overflow

From: Patrick McHardy <[email-masked]>
Date: Tue, 17 Jun 2008 14:59:46 +0200

Wang Chen wrote:
> +	if (dev->promiscuity == 0) {
> +		/*
> +		 * Avoid overflow.
> +		 * If inc causes overflow, untouch promisc and return error.
> +		 */
> +		if (inc < 0)
> +			dev->flags &= ~IFF_PROMISC;
> +		else {
> +			dev->promiscuity -= inc;
> +			printk(KERN_ERR "%s: promiscuity touches roof, "
> +				"set promiscuity failed, promiscuity feature "
> +				"of device will be broken.\n", dev->name);
> +			return -EOVERFLOW;
> +		}
> +	}

Assuming the caller does proper error handling, that printk is
not true.