From: Leon Romanovsky <leon@kernel.org>
To: Pavan Chebbi <pavan.chebbi@broadcom.com>
Cc: jgg@ziepe.ca, michael.chan@broadcom.com,
linux-kernel@vger.kernel.org, dave.jiang@intel.com,
saeedm@nvidia.com, Jonathan.Cameron@huawei.com,
gospo@broadcom.com, selvin.xavier@broadcom.com,
kalesh-anakkur.purayil@broadcom.com
Subject: Re: [PATCH fwctl 4/5] fwctl/bnxt_fwctl: Add bnxt fwctl device
Date: Sun, 25 Jan 2026 15:19:56 +0200 [thread overview]
Message-ID: <20260125131956.GC13967@unreal> (raw)
In-Reply-To: <20260118123401.3188438-5-pavan.chebbi@broadcom.com>
On Sun, Jan 18, 2026 at 04:34:00AM -0800, Pavan Chebbi wrote:
> Create bnxt_fwctl device. This will bind to bnxt's aux device.
> On the upper edge, it will register with the fwctl subsystem.
> It will make use of bnxt's ULP functions to send FW commands.
>
> Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
> ---
> MAINTAINERS | 6 +
> drivers/fwctl/Kconfig | 11 +
> drivers/fwctl/Makefile | 1 +
> drivers/fwctl/bnxt/Makefile | 4 +
> drivers/fwctl/bnxt/main.c | 416 ++++++++++++++++++++++++++++++++++++
> include/uapi/fwctl/bnxt.h | 64 ++++++
> include/uapi/fwctl/fwctl.h | 1 +
> 7 files changed, 503 insertions(+)
> create mode 100644 drivers/fwctl/bnxt/Makefile
> create mode 100644 drivers/fwctl/bnxt/main.c
> create mode 100644 include/uapi/fwctl/bnxt.h
<...>
> +static void *bnxtctl_fw_rpc(struct fwctl_uctx *uctx,
> + enum fwctl_rpc_scope scope,
> + void *in, size_t in_len, size_t *out_len)
> +{
> + struct bnxtctl_dev *bnxtctl =
> + container_of(uctx->fwctl, struct bnxtctl_dev, fwctl);
> + struct bnxt_aux_priv *bnxt_aux_priv = bnxtctl->aux_priv;
> + void *dma_virt_addr[MAX_NUM_DMA_INDICATIONS];
> + dma_addr_t dma_addr[MAX_NUM_DMA_INDICATIONS];
> + struct fwctl_dma_info_bnxt *dma_buf = NULL;
> + struct device *dev = &uctx->fwctl->dev;
> + struct fwctl_rpc_bnxt *msg = in;
> + struct bnxt_fw_msg rpc_in;
> + int i, rc, err = 0;
> +
> + rpc_in.msg = memdup_user(u64_to_user_ptr(msg->req), msg->req_len);
> + if (IS_ERR(rpc_in.msg))
> + return rpc_in.msg;
> +
> + if (!bnxtctl_validate_rpc(bnxt_aux_priv->edev, &rpc_in, scope)) {
> + err = -EPERM;
> + goto free_msg_out;
> + }
<...>
> +free_msg_out:
> + kfree(rpc_in.msg);
> +
> + if (err) {
> + kfree(rpc_in.resp);
You are kfree junk address here.
Thanks
> + return ERR_PTR(err);
> + }
> +
> + return rpc_in.resp;
> +}
> +
next prev parent reply other threads:[~2026-01-25 13:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 12:33 [PATCH fwctl 0/5] fwctl/bnxt_fwctl: fwctl for Broadcom Netxtreme devices Pavan Chebbi
2026-01-18 12:33 ` [PATCH fwctl 1/5] fwctl/bnxt_en: Move common definitions to include/linux/bnxt/ Pavan Chebbi
2026-01-25 12:35 ` Leon Romanovsky
2026-01-18 12:33 ` [PATCH fwctl 2/5] fwctl/bnxt_en: Refactor aux bus functions to be more generic Pavan Chebbi
2026-01-25 13:09 ` Leon Romanovsky
2026-01-25 13:50 ` Pavan Chebbi
2026-01-25 16:43 ` Leon Romanovsky
2026-01-18 12:33 ` [PATCH fwctl 3/5] fwctl/bnxt_en: Create an aux device for fwctl Pavan Chebbi
2026-01-18 12:34 ` [PATCH fwctl 4/5] fwctl/bnxt_fwctl: Add bnxt fwctl device Pavan Chebbi
2026-01-25 13:19 ` Leon Romanovsky [this message]
2026-01-18 12:34 ` [PATCH fwctl 5/5] fwctl/bnxt_fwctl: Add documentation entries Pavan Chebbi
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=20260125131956.GC13967@unreal \
--to=leon@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=dave.jiang@intel.com \
--cc=gospo@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=pavan.chebbi@broadcom.com \
--cc=saeedm@nvidia.com \
--cc=selvin.xavier@broadcom.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