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: <CAFCwf10TBWre6SxtgvPALmiSDxSWCn0387sWPPKTrVh9DRcG2w@mail.gmail.com>
Date:	Thu, 28 Jan 2016 14:41:55 +0200
From:	Oded Gabbay <oded.gabbay@...il.com>
To:	Amitoj Kaur Chawla <amitoj1606@...il.com>
Cc:	David Airlie <airlied@...ux.ie>,
	Maling list - DRI developers 
	<dri-devel@...ts.freedesktop.org>,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
	julia.lawall@...6.fr
Subject: Re: [PATCH] gpu: drm: amd: amdkfd: Remove unnecessary cast in kfree

On Mon, Jan 25, 2016 at 7:33 PM, Amitoj Kaur Chawla
<amitoj1606@...il.com> wrote:
> Remove an unnecassary cast in the argument to kfree.
>
> Found using Coccinelle. The semantic patch used to find this is as follows:
>
> //<smpl>
> @@
> type T;
> expression *f;
> @@
>
> - kfree((T *)(f));
> + kfree(f);
> //</smpl>
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@...il.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index 9be0070..a902ae0 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> @@ -194,7 +194,7 @@ static void kfd_process_wq_release(struct work_struct *work)
>
>         kfree(p);
>
> -       kfree((void *)work);
> +       kfree(work);
>  }
>
>  static void kfd_process_destroy_delayed(struct rcu_head *rcu)
> --
> 1.9.1
>

Thanks!
Applied to my -fixes tree.
For future reference, use "drm/amdkfd: ..." as the prefix of the
subject line. I fixed it for this patch.

       Oded

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ