Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-04 Thread Mohammad Abdul Awal
On 03/04/2019 18:32, David Marchand wrote: On Wed, Apr 3, 2019 at 6:53 PM Ferruh Yigit > wrote: On 4/3/2019 5:41 PM, Bruce Richardson wrote: > On Wed, Apr 03, 2019 at 05:35:22PM +0100, Ferruh Yigit wrote: >> On 4/3/2019 5:27 PM, Thomas Monjalon wrote:

Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread Stephen Hemminger
On Wed, 3 Apr 2019 17:07:26 +0100 Mohammad Abdul Awal wrote: > Null value for parameter name will cause segfault for the > strnlen and strcmp functions. > > Fixes: 0b33b68d12 ("ethdev: export allocate function") > Fixes: 942661004c ("ethdev: export secondary attach function") > Cc: sta...@dpdk.

Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread Thomas Monjalon
03/04/2019 19:30, Awal, Mohammad Abdul: > From: Yigit, Ferruh > > On 4/3/2019 5:27 PM, Thomas Monjalon wrote: > > > 03/04/2019 18:07, Mohammad Abdul Awal: > > >> Null value for parameter name will cause segfault for the > > >> strnlen and strcmp functions. > > > > > > I'm not sure we want such obvi

Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread David Marchand
On Wed, Apr 3, 2019 at 6:53 PM Ferruh Yigit wrote: > On 4/3/2019 5:41 PM, Bruce Richardson wrote: > > On Wed, Apr 03, 2019 at 05:35:22PM +0100, Ferruh Yigit wrote: > >> On 4/3/2019 5:27 PM, Thomas Monjalon wrote: > >>> 03/04/2019 18:07, Mohammad Abdul Awal: > Null value for parameter name wi

Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread Awal, Mohammad Abdul
The null checks are for the input param "char *name" of APIs rte_eth_dev_allocate and rte_eth_dev_attach_secondary. I will change the err msg to suggested one. > -Original Message- > From: Yigit, Ferruh > Sent: Wednesday, April 3, 2019 5:35 PM > To: Thomas Monjalon ; Awal, Mohammad Abdul

Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread Ferruh Yigit
On 4/3/2019 5:41 PM, Bruce Richardson wrote: > On Wed, Apr 03, 2019 at 05:35:22PM +0100, Ferruh Yigit wrote: >> On 4/3/2019 5:27 PM, Thomas Monjalon wrote: >>> 03/04/2019 18:07, Mohammad Abdul Awal: Null value for parameter name will cause segfault for the strnlen and strcmp functions. >>

Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread Bruce Richardson
On Wed, Apr 03, 2019 at 05:35:22PM +0100, Ferruh Yigit wrote: > On 4/3/2019 5:27 PM, Thomas Monjalon wrote: > > 03/04/2019 18:07, Mohammad Abdul Awal: > >> Null value for parameter name will cause segfault for the strnlen and > >> strcmp functions. > > > > I'm not sure we want such obvious checks

Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread Ferruh Yigit
On 4/3/2019 5:27 PM, Thomas Monjalon wrote: > 03/04/2019 18:07, Mohammad Abdul Awal: >> Null value for parameter name will cause segfault for the >> strnlen and strcmp functions. > > I'm not sure we want such obvious checks for all APIs. > Here I would say yes. These are internal functions, not A

Re: [dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread Thomas Monjalon
03/04/2019 18:07, Mohammad Abdul Awal: > Null value for parameter name will cause segfault for the > strnlen and strcmp functions. I'm not sure we want such obvious checks for all APIs. Here I would say yes. > Fixes: 0b33b68d12 ("ethdev: export allocate function") > Fixes: 942661004c ("ethdev: ex

[dpdk-dev] [PATCH 1/3] ethdev: fix null pointer checking

2019-04-03 Thread Mohammad Abdul Awal
Null value for parameter name will cause segfault for the strnlen and strcmp functions. Fixes: 0b33b68d12 ("ethdev: export allocate function") Fixes: 942661004c ("ethdev: export secondary attach function") Cc: sta...@dpdk.org Signed-off-by: Mohammad Abdul Awal --- lib/librte_ethdev/rte_ethdev.c