Re: [PATCH][v2] net: ethtool: not call vzalloc for zero sized memory request

2019-04-01 Thread David Miller
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

Re: 答复: [PATCH][v2] net: ethtool: not call vzalloc for zero sized memory request

2019-03-29 Thread Michal Kubecek
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

答复: [PATCH][v2] net: ethtool: not call vzalloc for zero sized memory request

2019-03-29 Thread Li,Rongqing
> -邮件原件- > 发件人: 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

Re: [PATCH][v2] net: ethtool: not call vzalloc for zero sized memory request

2019-03-29 Thread Michal Kubecek
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

[PATCH][v2] net: ethtool: not call vzalloc for zero sized memory request

2019-03-28 Thread Li RongQing
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