Subject: Re: [PATCH net-next 2/8] bonding: Check return of dev_set_promiscuity/allmulti

From: Patrick McHardy <[email-masked]>
Date: Mon, 23 Jun 2008 13:13:10 +0200

Wang Chen wrote:
> Joe Eykholt said the following on 2008-6-22 2:19:
>> If netdev->promiscuity overflows, shouldn't there be a WARN_ON or BUG_ON
>> that catches that?  Either someone forgot to clean up, or much less likely,
>> the counter needs to be widened.  It isn't necessarily the current caller's
>> fault, but some indication of the problem is better than nothing.
>>
> 
> If promiscuity overflows, dev_set_promiscuity will printk(KERN_WARNING) now.
> Compare to that, WARN_ON has more information about modules info and dump stack.
> But I think printk has enough information to indicate the problem and we
> don't need WARN_ON.
> How do you think?

WARN_ON doesn't provide any useful information here, if the counter
overflowed, its because *something else* increased it by too much.