Re: [PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maninder Singh <maninder1.s@xxxxxxxxxxx> writes:

> cn_msg should be validated instead of msg after memory allocation.
>

Thanks,

This was already fixed by Dan:
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2015-May/070193.html

my Reviewed-by:
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2015-June/070599.html

but I don't see it in K. Y. recent submission to Greg. K. Y., could you
please pick it up?

> Signed-off-by: Maninder Singh <maninder1.s@xxxxxxxxxxx>
> Reviewed-by: Akhilesh Kumar <akhilesh.k@xxxxxxxxxxx>
> ---
>  drivers/hv/hv_utils_transport.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c
> index ea7ba5e..6a9d80a 100644
> --- a/drivers/hv/hv_utils_transport.c
> +++ b/drivers/hv/hv_utils_transport.c
> @@ -186,7 +186,7 @@ int hvutil_transport_send(struct hvutil_transport *hvt, void *msg, int len)
>  		return -EINVAL;
>  	} else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) {
>  		cn_msg = kzalloc(sizeof(*cn_msg) + len, GFP_ATOMIC);
> -		if (!msg)
> +		if (!cn_msg)
>  			return -ENOMEM;
>  		cn_msg->id.idx = hvt->cn_id.idx;
>  		cn_msg->id.val = hvt->cn_id.val;

-- 
  Vitaly
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux