[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1459985052.17828.22.camel@intel.com>
Date: Wed, 6 Apr 2016 23:24:12 +0000
From: "Keller, Jacob E" <jacob.e.keller@...el.com>
To: "davem@...emloft.net" <davem@...emloft.net>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC: "nhorman@...hat.com" <nhorman@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Allan, Bruce W" <bruce.w.allan@...el.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"jogreene@...hat.com" <jogreene@...hat.com>
Subject: Re: [net-next 03/16] fm10k: Avoid crashing the kernel
On Tue, 2016-04-05 at 12:12 -0400, David Miller wrote:
> As Joe suggested, it is not reasonable to expect all compilers to be
> able to figure
> out the result of all of the index increments in this function lead
> to a specific
> constant value.
>
> Your only option is to either keep the code as-is, or add proper
> error reporting to
> this function and to all callers, in order to handle the situation at
> run time which
> I realize is exactly what you are trying to avoid.
>
> If this crashes at run time with the BUG_ON(), it's going to happen
> really quickly
> when you bring the interface up. So I don't see
> the run time check as so tragic.
So we're ok with just not changing this then, and living with a crash?
That's fine with me, I suppose.
Should the second WARN_ONCE be changed to a BUG_ON as well to get a
crash instead of just a warning?
Thanks,
Jake
Powered by blists - more mailing lists