Re: [PATCH v2] misc: mic: Use memdup_user() as a cleanup

From: Greg KH
Date: Tue Dec 12 2017 - 06:49:35 EST


On Tue, Dec 12, 2017 at 11:40:58AM +0100, Vasyl Gomonovych wrote:
> Fix coccicheck warning which recommends to use memdup_user():
>
> drivers/misc/mic/vop/vop_vringh.c:940:14-21: WARNING opportunity for memdup_user
> drivers/misc/mic/vop/vop_vringh.c:998:8-15: WARNING opportunity for memdup_user
>
> Generated by: scripts/coccinelle/memdup_user/memdup_user.cocci
>
> Changelog:
> - v1:
> - Replace kzalloc + copy_from_user on memdup_user
> - v2:
> - Clear forgotten done label
> After merging the char-misc tree, today's linux-next build
> (x86_64_allmodconfig) produced this warning:
> drivers/misc/mic/vop/vop_vringh.c: In function 'vop_ioctl':
> drivers/misc/mic/vop/vop_vringh.c:1001:1: warning: label 'done' defined but not used [-Wunused-label]

Will not work as I already have taken v1.

Also, put the changelog below the --- line please.

thanks,

greg k-h