RE: [PATCH] net: hyperv: fix a NULL pointer dereference

From: Haiyang Zhang
Date: Mon Mar 11 2019 - 15:49:59 EST




> -----Original Message-----
> From: linux-hyperv-owner@xxxxxxxxxxxxxxx <linux-hyperv-
> owner@xxxxxxxxxxxxxxx> On Behalf Of Haiyang Zhang
> Sent: Monday, March 11, 2019 3:47 PM
> To: Kangjie Lu <kjlu@xxxxxxx>
> Cc: pakki001@xxxxxxx; KY Srinivasan <kys@xxxxxxxxxxxxx>; Stephen
> Hemminger <sthemmin@xxxxxxxxxxxxx>; Sasha Levin <sashal@xxxxxxxxxx>;
> David S. Miller <davem@xxxxxxxxxxxxx>; linux-hyperv@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH] net: hyperv: fix a NULL pointer dereference
>
>
>
> > -----Original Message-----
> > From: Kangjie Lu <kjlu@xxxxxxx>
> > Sent: Monday, March 11, 2019 3:17 AM
> > To: kjlu@xxxxxxx
> > Cc: pakki001@xxxxxxx; KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang
> > <haiyangz@xxxxxxxxxxxxx>; Stephen Hemminger
> <sthemmin@xxxxxxxxxxxxx>;
> > Sasha Levin <sashal@xxxxxxxxxx>; David S. Miller
> > <davem@xxxxxxxxxxxxx>; linux-hyperv@xxxxxxxxxxxxxxx;
> > netdev@xxxxxxxxxxxxxxx; linux- kernel@xxxxxxxxxxxxxxx
> > Subject: [PATCH] net: hyperv: fix a NULL pointer dereference
> >
> > In case kvmalloc_array fails, we should stop using it to avoid NULL
> > pointer dereference.
> >
> > Signed-off-by: Kangjie Lu <kjlu@xxxxxxx>
> > ---
>
Also, please change the subject to be more specific:
hv_netvsc: fix a possible NULL pointer dereference in netvsc_get_ethtool_stats()

Thanks.