Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755449AbbGCSRN (ORCPT ); Fri, 3 Jul 2015 14:17:13 -0400 Received: from mail-bl2on0101.outbound.protection.outlook.com ([65.55.169.101]:50517 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755163AbbGCSRF convert rfc822-to-8bit (ORCPT ); Fri, 3 Jul 2015 14:17:05 -0400 From: KY Srinivasan To: Vitaly Kuznetsov , Maninder Singh CC: Haiyang Zhang , "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 Thread-Topic: [PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer Thread-Index: AQHQtVObOACICqI41ESGVJ3FSac1ap3JZKcEgACpXjA= Date: Fri, 3 Jul 2015 18:17:02 +0000 Message-ID: References: <1435902333-31308-1-git-send-email-maninder1.s@samsung.com> <876161br1r.fsf@vitty.brq.redhat.com> In-Reply-To: <876161br1r.fsf@vitty.brq.redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none; x-originating-ip: [2001:4898:80e8:ed31::2] x-microsoft-exchange-diagnostics: 1;BY2PR0301MB0774;5:jjFx8cEb9AXekIQuUxXCJRk+rqAzdsJVXtVK2dAWRoci9mtGJkZqICQWNd+4q0cNwa1Il2kTQREJF6oYKNpm2l8rYI2tFL5+l8yOrCdAjdtO0VhI9ermD697EWFyxbrxIetzX3TF7Z2PayNoX//ucQ==;24:g0jBwzDAEKefZtahdJQRmbOhY/Co1xHt0/dieZ6qrXMTtdpq2vbASGoo3jbsOVjooPVxVUs0WLO4p8sgJOIkAgr76bHrDDAiIx0sHWoBrM4=;20:AlMxA9AkmklRWXkxKCVdfHbTwLl0KDpfWdfw+uKbKSTCVZ83NfxBylkq9DSoWfRErNqpaU/5q5Q+LPL/QDJoKA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0774; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401001)(5005006)(3002001);SRVR:BY2PR0301MB0774;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0774; x-forefront-prvs: 0626C21B10 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(164054003)(13464003)(377454003)(51704005)(19580395003)(2656002)(87936001)(19580405001)(74316001)(2950100001)(77096005)(1720100001)(77156002)(40100003)(62966003)(122556002)(92566002)(102836002)(33656002)(5001770100001)(86612001)(15975445007)(2900100001)(86362001)(5002640100001)(5003600100002)(5001960100002)(46102003)(189998001)(99286002)(106116001)(50986999)(76576001)(76176999)(54356999);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0301MB0774;H:BY2PR0301MB1654.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2015 18:17:02.2002 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0774 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1949 Lines: 62 > -----Original Message----- > From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] > Sent: Friday, July 3, 2015 1:10 AM > To: Maninder Singh; KY Srinivasan > Cc: Haiyang Zhang; 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 > > 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? Yes; will do. K. Y > > > 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/