Subject: Re: [PATCH net] net: mlx5: fix sizeof usage in health_care's reg_handler

From: Daniel Borkmann <[email-masked]>
Date: Sat, 03 Aug 2013 00:43:44 +0200

On 08/03/2013 12:11 AM, David Miller wrote:
> From: Daniel Borkmann <[email-masked]>
> Date: Fri,  2 Aug 2013 12:16:17 +0200
>
>> Therefore, I strongly assume sizeof(*health->health) is being meant
>> to be passed as an argument. Interestingly, there are actually no
>> in-tree users of mlx5_[un]register_health_report_handler(), but some
>> debugging modules might want to know the correct size instead.
>
> I want these hooks and infrastructure removed immediately.
>
> If there are no in-tree users there is no reason for them to
> exist at all.

Ok, I let Or handle that. Maybe he wants to add a user of it, instead.

I also noticed that coverty scanner found a couple of other issues,
e.g. outlen_write() in mlx5/core/cmd.c does a kzalloc() without
doing sanity checks on the user-passed allocation size, e.g. it
could even be a negative value passed to it.