DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 1199] mlx5: segmentation fault with rte_flow_configure function
Date: Fri, 24 Mar 2023 13:55:50 +0000	[thread overview]
Message-ID: <bug-1199-3@http.bugs.dpdk.org/> (raw)

[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1199

            Bug ID: 1199
           Summary: mlx5: segmentation fault with rte_flow_configure
                    function
           Product: DPDK
           Version: 23.03
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: ethdev
          Assignee: dev@dpdk.org
          Reporter: ccm@ccm.ink
  Target Milestone: ---

I encountered a segmentation fault when attempting to configure queues for the
asynchronous version of rte_flow using the DPDK rte_flow_configure function and
assigning varying sizes to each queue.

Just like this:
  const struct rte_flow_queue_attr *queue_attr[2];
  struct rte_flow_queue_attr setup_queue_attr = {.size = 32};
  struct rte_flow_queue_attr normal_queue_attr = {.size = 100};
  queue_attr[0] = &setup_queue_attr;
  queue_attr[1] = &normal_queue_attr;
  rte_flow_configure(port_id, &port_attr, 2, queue_attr, &err);


Upon reviewing the source code, I discovered that an attempt was made to free
an unallocated memory, which could potentially result in a segmentation
fault(line 7470).

[mlx5_flow_hw.c]
7226 if (_queue_attr[i]->size != _queue_attr[0]->size) {
        rte_errno = EINVAL;
        goto err;
7229 }
...
7239    priv->hw_q = mlx5_malloc(MLX5_MEM_ZERO, mem_size,
7240                             64, SOCKET_ID_ANY);
...
7444  err:
...
7469    for (i = 0; i < nb_q_updated; i++) {
7470            rte_ring_free(priv->hw_q[i].indir_iq);
                rte_ring_free(priv->hw_q[i].indir_cq);
        }
7473    mlx5_free(priv->hw_q);

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 3656 bytes --]

                 reply	other threads:[~2023-03-24 13:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-1199-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /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).