* [PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer
@ 2015-07-03 5:45 Maninder Singh
2015-07-03 8:09 ` Vitaly Kuznetsov
0 siblings, 1 reply; 3+ messages in thread
From: Maninder Singh @ 2015-07-03 5:45 UTC (permalink / raw)
To: kys, haiyangz, devel, linux-kernel; +Cc: pankaj.m, Maninder Singh
cn_msg should be validated instead of msg after memory allocation.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com>
---
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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer
2015-07-03 5:45 [PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer Maninder Singh
@ 2015-07-03 8:09 ` Vitaly Kuznetsov
2015-07-03 18:17 ` KY Srinivasan
0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Kuznetsov @ 2015-07-03 8:09 UTC (permalink / raw)
To: Maninder Singh, kys; +Cc: haiyangz, devel, linux-kernel, pankaj.m
Maninder Singh <maninder1.s@samsung.com> 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@samsung.com>
> Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer
2015-07-03 8:09 ` Vitaly Kuznetsov
@ 2015-07-03 18:17 ` KY Srinivasan
0 siblings, 0 replies; 3+ messages in thread
From: KY Srinivasan @ 2015-07-03 18:17 UTC (permalink / raw)
To: Vitaly Kuznetsov, Maninder Singh
Cc: Haiyang Zhang, devel, linux-kernel, pankaj.m
> -----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 <maninder1.s@samsung.com> 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 <maninder1.s@samsung.com>
> > Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com>
> > ---
> > 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-03 18:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-03 5:45 [PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer Maninder Singh
2015-07-03 8:09 ` Vitaly Kuznetsov
2015-07-03 18:17 ` KY Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).