> }
>
> +static bool response_token_matches(const struct opal_resp_tok *token, u8
> match)
> +{
> + if (IS_ERR_OR_NULL(token) ||
> + token->type != OPAL_DTA_TOKENID_TOKEN ||
> + token->pos[0] != match)
> + return false;
> + return true;
> +}
> +
This is sorta pedantic but from my reading of the code token can never be null.
It will
either be a valid pointer or ERR_PTR(-EINVAL), but never null.
So maybe change this to IS_ERR(token) etc. Other than that little nit:
Reviewed-by: Scott Bauer <scott.ba...@intel.com>
On Wed, Feb 15, 2017 at 12:42:08PM -0700, Jon Derrick wrote:
> Add a buffer size check against discovery and response header lengths
> before we loop over their buffers.
>
> Signed-off-by: Jon Derrick <jonathan.derr...@intel.com>
Reviewed-by: Scott Bauer <scott.ba...@intel.com>
ntel.com>
Reviewed-by: Scott Bauer <scott.ba...@intel.com>
On Wed, Feb 08, 2017 at 02:58:28PM -0700, Scott Bauer wrote:
> On Wed, Feb 08, 2017 at 10:15:28PM +0100, Arnd Bergmann wrote:
> > When CONFIG_KASAN is in use, the sed_ioctl function uses unusually large
> > stack,
> > as each possible ioctl argument gets its own st
and.
In the future we will have in-kernel callers and I don't want to have to do any
get_fs(KERNEL_DS) wizardry.
Instead I think we can use a union to lessen the stack burden. I tested this
patch just now
with config_ksasan and was able to build.
>From dfa6a2c842a6e45cab198c9058e753835a81521e M