From: "Rybalchenko, Kirill" <kirill.rybalchenko@intel.com>
To: "Chautru, Nicolas" <nicolas.chautru@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>
Cc: "hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
"Vargas, Hernan" <hernan.vargas@intel.com>,
"Chautru, Nicolas" <nicolas.chautru@intel.com>
Subject: RE: [PATCH v1 1/1] bbdev: fix possible null pointer dereference
Date: Mon, 12 May 2025 07:32:08 +0000 [thread overview]
Message-ID: <CH2PR11MB8777A31F44AC1BCA34C4ED3B9897A@CH2PR11MB8777.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20250501221031.4569-2-nicolas.chautru@intel.com>
> -----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
next prev parent reply other threads:[~2025-05-12 7:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-05-12 11:52 ` Maxime Coquelin
2025-05-12 11:59 ` Hemant Agrawal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CH2PR11MB8777A31F44AC1BCA34C4ED3B9897A@CH2PR11MB8777.namprd11.prod.outlook.com \
--to=kirill.rybalchenko@intel.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=hernan.vargas@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=nicolas.chautru@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).