DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix check for default plugin directory
@ 2017-11-06 13:58 Bruce Richardson
  2017-11-06 20:36 ` Aaron Conole
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2017-11-06 13:58 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The check for the existence of the default plugin directory calls stat
using an incorrect variable, which will cause a NULL pointer dereference
error.

Coverity issue: 198440
Fixes: d6a4399cdfc9 ("eal: avoid error for non-existent default PMD path")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 450f2664a..996a03424 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -280,7 +280,7 @@ eal_plugins_init(void)
 	struct shared_driver *solib = NULL;
 	struct stat sb;
 
-	if (*default_solib_dir != '\0' && stat(solib->name, &sb) == 0 &&
+	if (*default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 &&
 				S_ISDIR(sb.st_mode))
 		eal_plugin_add(default_solib_dir);
 
-- 
2.13.6

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: fix check for default plugin directory
  2017-11-06 13:58 [dpdk-dev] [PATCH] eal: fix check for default plugin directory Bruce Richardson
@ 2017-11-06 20:36 ` Aaron Conole
  2017-11-07  0:23   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Conole @ 2017-11-06 20:36 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

Bruce Richardson <bruce.richardson@intel.com> writes:

> The check for the existence of the default plugin directory calls stat
> using an incorrect variable, which will cause a NULL pointer dereference
> error.
>
> Coverity issue: 198440
> Fixes: d6a4399cdfc9 ("eal: avoid error for non-existent default PMD path")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

Glad I checked the list before going after this one. ;)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: fix check for default plugin directory
  2017-11-06 20:36 ` Aaron Conole
@ 2017-11-07  0:23   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-11-07  0:23 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Aaron Conole

06/11/2017 21:36, Aaron Conole:
> Bruce Richardson <bruce.richardson@intel.com> writes:
> 
> > The check for the existence of the default plugin directory calls stat
> > using an incorrect variable, which will cause a NULL pointer dereference
> > error.
> >
> > Coverity issue: 198440
> > Fixes: d6a4399cdfc9 ("eal: avoid error for non-existent default PMD path")
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Acked-by: Aaron Conole <aconole@redhat.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-07  0:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 13:58 [dpdk-dev] [PATCH] eal: fix check for default plugin directory Bruce Richardson
2017-11-06 20:36 ` Aaron Conole
2017-11-07  0:23   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).