lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b37e3df1-9627-79a5-237c-acf505a0dd4a@linux.intel.com>
Date:   Fri, 12 Jan 2018 14:28:01 +0000
From:   Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
To:     kbuild test robot <fengguang.wu@...el.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...el.com>
Cc:     dri-devel@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
        intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        kbuild-all@...org, Rodrigo Vivi <rodrigo.vivi@...el.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/pmu: fix noderef.cocci warnings


On 12/01/2018 13:31, kbuild test robot wrote:
> From: Fengguang Wu <fengguang.wu@...el.com>
> 
> drivers/gpu/drm/i915/i915_pmu.c:795:34-40: ERROR: application of sizeof to pointer
> 
>   sizeof when applied to a pointer typed expression gives the size of
>   the pointer
> 
> Generated by: scripts/coccinelle/misc/noderef.cocci
> 
> Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs")
> Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
> ---
> 
>   i915_pmu.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -792,7 +792,7 @@ create_event_attributes(struct drm_i915_
>   		goto err_alloc;
>   
>   	/* Max one pointer of each attribute type plus a termination entry. */
> -	attr = kzalloc((count * 2 + 1) * sizeof(attr), GFP_KERNEL);
> +	attr = kzalloc((count * 2 + 1) * sizeof(*attr), GFP_KERNEL);
>   	if (!attr)
>   		goto err_alloc;
>   

Luckily it is the same size so no actual bug, but fix is still valid. 
Will merge it once it passes CI, thanks!

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@...el.com>

Regards,

Tvrtko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ