> -邮件原件-
> 发件人: Michal Kubecek [mailto:mkube...@suse.cz]
> 发送时间: 2019年3月28日 18:26
> 收件人: Li,Rongqing
> 抄送: netdev@vger.kernel.org
> 主题: Re: 答复: [PATCH] net: ethtool: not call vzalloc for zero sized memory
> request
>
> On Thu, Mar 28, 2019 at 09:51:56
On Thu, Mar 28, 2019 at 09:51:56AM +, Li,Rongqing wrote:
> > -邮件原件-
> > 发件人: Michal Kubecek [mailto:mkube...@suse.cz]
> > 发送时间: 2019年3月28日 17:09
> > 收件人: Li,Rongqing
> > 抄送: netdev@vger.kernel.org
> > 主题: Re: [PATCH] net: ethtool: not call v
> -邮件原件-
> 发件人: Michal Kubecek [mailto:mkube...@suse.cz]
> 发送时间: 2019年3月28日 17:09
> 收件人: Li,Rongqing
> 抄送: netdev@vger.kernel.org
> 主题: Re: [PATCH] net: ethtool: not call vzalloc for zero sized memory request
>
> On Thu, Mar 28, 2019 at 02:01:09PM +0800, Li Ron
On Thu, Mar 28, 2019 at 02:01:09PM +0800, Li RongQing wrote:
> NULL or ZERO_SIZE_PTR will be returned for zero sized memory
> request, and derefencing them will lead to a segfault
>
> so it is unnecessory to call vzalloc for zero sized memory
> request and not call __ethtool_get_strings which alwa
NULL or ZERO_SIZE_PTR will be returned for zero sized memory
request, and derefencing them will lead to a segfault
so it is unnecessory to call vzalloc for zero sized memory
request and not call __ethtool_get_strings which always uses
the allocated memory
this also fixes a possible memory leak if