From: Li RongQing
Date: Fri, 29 Mar 2019 09:18:02 +0800
> 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 functions which maybe derefence the
On Fri, Mar 29, 2019 at 09:35:38AM +, Li,Rongqing wrote:
>
>
> > -邮件原件-
> > 发件人: Michal Kubecek [mailto:mkube...@suse.cz]
> > 发送时间: 2019年3月29日 17:29
> > 收件人: Li,Rongqing
> > 抄送: netdev@vger.kernel.org
> > 主题: Re: [PATCH][v2] net: ethto
> -邮件原件-
> 发件人: Michal Kubecek [mailto:mkube...@suse.cz]
> 发送时间: 2019年3月29日 17:29
> 收件人: Li,Rongqing
> 抄送: netdev@vger.kernel.org
> 主题: Re: [PATCH][v2] net: ethtool: not call vzalloc for zero sized memory
> request
>
> On Fri, Mar 29, 2019 at 09:18:02
On Fri, Mar 29, 2019 at 09:18:02AM +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 functions which maybe derefence
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 functions which maybe derefence the
NULL allocated memory
this also fixes a possible memory leak if ph