Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread Michael D
I don't think you can stop it being dereferenced... you just need to prevent an attacker from exploiting the null pointer dereference vulnerability right? And this is done by returning the function right away? On 21 June 2017 at 22:36, David Miller <da...@davemloft.net> wrote: > From

Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c

2017-06-21 Thread Michael D
How do we actually stop a null pointer being dereferenced here? Other examples I've seen check for null and then immediately return the function with an error code so that it cannot be referenced again. Something like: if (WARN_ON(!new_active) return 1 This behaviour should be OK for this