* [PATCH v1 0/1] bbdev: fix possible null pointer dereferencing @ 2025-05-01 22:10 Nicolas Chautru 2025-05-01 22:10 ` [PATCH v1 1/1] bbdev: fix possible null pointer dereference Nicolas Chautru 0 siblings, 1 reply; 5+ messages in thread From: Nicolas Chautru @ 2025-05-01 22:10 UTC (permalink / raw) To: dev, maxime.coquelin; +Cc: hemant.agrawal, hernan.vargas, Nicolas Chautru Hi Maxime, Minor fix for warning reported by coverity. Thanks Nic Nicolas Chautru (1): bbdev: fix possible null pointer dereference lib/bbdev/rte_bbdev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/1] bbdev: fix possible null pointer dereference 2025-05-01 22:10 [PATCH v1 0/1] bbdev: fix possible null pointer dereferencing Nicolas Chautru @ 2025-05-01 22:10 ` Nicolas Chautru 2025-05-12 7:32 ` Rybalchenko, Kirill 2025-05-12 11:52 ` Maxime Coquelin 0 siblings, 2 replies; 5+ messages in thread From: Nicolas Chautru @ 2025-05-01 22:10 UTC (permalink / raw) To: dev, maxime.coquelin; +Cc: hemant.agrawal, hernan.vargas, Nicolas Chautru This change addresses the CID 457446: Null pointer dereferences (REVERSE_INULL). Not expected to happen in practice, but the config may be potentially undefined through API. Coverity issue: 457446 Fixes: 61aa25b96e14 ("bbdev: add trace points") Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com> --- lib/bbdev/rte_bbdev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index f341e6f3b9..56f313ee64 100644 --- a/lib/bbdev/rte_bbdev.c +++ b/lib/bbdev/rte_bbdev.c @@ -440,10 +440,6 @@ int rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, const struct rte_bbdev_queue_conf *conf) { - - rte_bbdev_trace_queue_configure(dev_id, queue_id, rte_bbdev_op_type_str(conf->op_type), - conf->priority); - int ret = 0; struct rte_bbdev_driver_info dev_info; struct rte_bbdev *dev = get_dev(dev_id); @@ -451,6 +447,11 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_queue_conf *stored_conf; const char *op_type_str; unsigned int max_priority; + + rte_bbdev_trace_queue_configure(dev_id, queue_id, + conf != NULL ? rte_bbdev_op_type_str(conf->op_type) : NULL, + conf != NULL ? conf->priority : 0); + VALID_DEV_OR_RET_ERR(dev, dev_id); VALID_DEV_OPS_OR_RET_ERR(dev, dev_id); -- 2.34.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v1 1/1] bbdev: fix possible null pointer dereference 2025-05-01 22:10 ` [PATCH v1 1/1] bbdev: fix possible null pointer dereference Nicolas Chautru @ 2025-05-12 7:32 ` Rybalchenko, Kirill 2025-05-12 11:52 ` Maxime Coquelin 1 sibling, 0 replies; 5+ messages in thread From: Rybalchenko, Kirill @ 2025-05-12 7:32 UTC (permalink / raw) To: Chautru, Nicolas, dev, maxime.coquelin Cc: hemant.agrawal, Vargas, Hernan, Chautru, Nicolas > -----Original Message----- > From: Nicolas Chautru <nicolas.chautru@intel.com> > Sent: Thursday 1 May 2025 23:11 > To: dev@dpdk.org; maxime.coquelin@redhat.com > Cc: hemant.agrawal@nxp.com; Vargas, Hernan <hernan.vargas@intel.com>; > Chautru, Nicolas <nicolas.chautru@intel.com> > Subject: [PATCH v1 1/1] bbdev: fix possible null pointer dereference > > This change addresses the CID 457446: Null pointer dereferences > (REVERSE_INULL). Not expected to happen in practice, but the > config may be potentially undefined through API. > > Coverity issue: 457446 > Fixes: 61aa25b96e14 ("bbdev: add trace points") > > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com> Acked-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> > --- > lib/bbdev/rte_bbdev.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c > index f341e6f3b9..56f313ee64 100644 > --- a/lib/bbdev/rte_bbdev.c > +++ b/lib/bbdev/rte_bbdev.c > @@ -440,10 +440,6 @@ int > rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, > const struct rte_bbdev_queue_conf *conf) > { > - > - rte_bbdev_trace_queue_configure(dev_id, queue_id, > rte_bbdev_op_type_str(conf->op_type), > - conf->priority); > - > int ret = 0; > struct rte_bbdev_driver_info dev_info; > struct rte_bbdev *dev = get_dev(dev_id); > @@ -451,6 +447,11 @@ rte_bbdev_queue_configure(uint16_t dev_id, > uint16_t queue_id, > struct rte_bbdev_queue_conf *stored_conf; > const char *op_type_str; > unsigned int max_priority; > + > + rte_bbdev_trace_queue_configure(dev_id, queue_id, > + conf != NULL ? rte_bbdev_op_type_str(conf- > >op_type) : NULL, > + conf != NULL ? conf->priority : 0); > + > VALID_DEV_OR_RET_ERR(dev, dev_id); > > VALID_DEV_OPS_OR_RET_ERR(dev, dev_id); > -- > 2.34.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] bbdev: fix possible null pointer dereference 2025-05-01 22:10 ` [PATCH v1 1/1] bbdev: fix possible null pointer dereference Nicolas Chautru 2025-05-12 7:32 ` Rybalchenko, Kirill @ 2025-05-12 11:52 ` Maxime Coquelin 2025-05-12 11:59 ` Hemant Agrawal 1 sibling, 1 reply; 5+ messages in thread From: Maxime Coquelin @ 2025-05-12 11:52 UTC (permalink / raw) To: Nicolas Chautru, dev; +Cc: hemant.agrawal, hernan.vargas On 5/2/25 12:10 AM, Nicolas Chautru wrote: > This change addresses the CID 457446: Null pointer dereferences > (REVERSE_INULL). Not expected to happen in practice, but the > config may be potentially undefined through API. > > Coverity issue: 457446 > Fixes: 61aa25b96e14 ("bbdev: add trace points") > > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com> > --- > lib/bbdev/rte_bbdev.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c > index f341e6f3b9..56f313ee64 100644 > --- a/lib/bbdev/rte_bbdev.c > +++ b/lib/bbdev/rte_bbdev.c > @@ -440,10 +440,6 @@ int > rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, > const struct rte_bbdev_queue_conf *conf) > { > - > - rte_bbdev_trace_queue_configure(dev_id, queue_id, rte_bbdev_op_type_str(conf->op_type), > - conf->priority); > - > int ret = 0; > struct rte_bbdev_driver_info dev_info; > struct rte_bbdev *dev = get_dev(dev_id); > @@ -451,6 +447,11 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, > struct rte_bbdev_queue_conf *stored_conf; > const char *op_type_str; > unsigned int max_priority; > + > + rte_bbdev_trace_queue_configure(dev_id, queue_id, > + conf != NULL ? rte_bbdev_op_type_str(conf->op_type) : NULL, > + conf != NULL ? conf->priority : 0); > + > VALID_DEV_OR_RET_ERR(dev, dev_id); > > VALID_DEV_OPS_OR_RET_ERR(dev, dev_id); Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Thanks, Maxime ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v1 1/1] bbdev: fix possible null pointer dereference 2025-05-12 11:52 ` Maxime Coquelin @ 2025-05-12 11:59 ` Hemant Agrawal 0 siblings, 0 replies; 5+ messages in thread From: Hemant Agrawal @ 2025-05-12 11:59 UTC (permalink / raw) To: Maxime Coquelin, Nicolas Chautru, dev; +Cc: hernan.vargas > -----Original Message----- > From: Maxime Coquelin <maxime.coquelin@redhat.com> > Sent: 12 May 2025 17:23 > To: Nicolas Chautru <nicolas.chautru@intel.com>; dev@dpdk.org > Cc: Hemant Agrawal <hemant.agrawal@nxp.com>; hernan.vargas@intel.com > Subject: Re: [PATCH v1 1/1] bbdev: fix possible null pointer dereference > Importance: High > > > > On 5/2/25 12:10 AM, Nicolas Chautru wrote: > > This change addresses the CID 457446: Null pointer dereferences > > (REVERSE_INULL). Not expected to happen in practice, but the config > > may be potentially undefined through API. > > > > Coverity issue: 457446 > > Fixes: 61aa25b96e14 ("bbdev: add trace points") > > > > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com> > > --- > > lib/bbdev/rte_bbdev.c | 9 +++++---- > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c index > > f341e6f3b9..56f313ee64 100644 > > --- a/lib/bbdev/rte_bbdev.c > > +++ b/lib/bbdev/rte_bbdev.c > > @@ -440,10 +440,6 @@ int > > rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, > > const struct rte_bbdev_queue_conf *conf) > > { > > - > > - rte_bbdev_trace_queue_configure(dev_id, queue_id, > rte_bbdev_op_type_str(conf->op_type), > > - conf->priority); > > - > > int ret = 0; > > struct rte_bbdev_driver_info dev_info; > > struct rte_bbdev *dev = get_dev(dev_id); @@ -451,6 +447,11 @@ > > rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, > > struct rte_bbdev_queue_conf *stored_conf; > > const char *op_type_str; > > unsigned int max_priority; > > + > > + rte_bbdev_trace_queue_configure(dev_id, queue_id, > > + conf != NULL ? rte_bbdev_op_type_str(conf- > >op_type) : NULL, > > + conf != NULL ? conf->priority : 0); > > + > > VALID_DEV_OR_RET_ERR(dev, dev_id); > > > > VALID_DEV_OPS_OR_RET_ERR(dev, dev_id); > > Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> > Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-12 11:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-05-01 22:10 [PATCH v1 0/1] bbdev: fix possible null pointer dereferencing Nicolas Chautru 2025-05-01 22:10 ` [PATCH v1 1/1] bbdev: fix possible null pointer dereference Nicolas Chautru 2025-05-12 7:32 ` Rybalchenko, Kirill 2025-05-12 11:52 ` Maxime Coquelin 2025-05-12 11:59 ` Hemant Agrawal
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).