Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754659AbbGCIKT (ORCPT ); Fri, 3 Jul 2015 04:10:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44853 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754844AbbGCIJ4 (ORCPT ); Fri, 3 Jul 2015 04:09:56 -0400 From: Vitaly Kuznetsov To: Maninder Singh , kys@microsoft.com Cc: haiyangz@microsoft.com, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, pankaj.m@samsung.com Subject: Re: [PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer References: <1435902333-31308-1-git-send-email-maninder1.s@samsung.com> Date: Fri, 03 Jul 2015 10:09:52 +0200 In-Reply-To: <1435902333-31308-1-git-send-email-maninder1.s@samsung.com> (Maninder Singh's message of "Fri, 03 Jul 2015 11:15:33 +0530") Message-ID: <876161br1r.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1478 Lines: 43 Maninder Singh 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 > Reviewed-by: Akhilesh Kumar > --- > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/