mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Avi Weiss <thnkslprpt@gmail.com>
To: Brett Creeley <brett.creeley@amd.com>, Jason Gunthorpe <jgg@ziepe.ca>
Cc: Dave Jiang <dave.jiang@intel.com>,
	Saeed Mahameed <saeedm@nvidia.com>, Zhi Wang <zhiw@nvidia.com>,
	Jonathan Cameron <jic23@kernel.org>,
	linux-kernel@vger.kernel.org, Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH] fwctl: pds: report device information length
Date: Wed, 28 Oct 2026 14:55:32 +0200	[thread overview]
Message-ID: <20261028125531.978325-2-thnkslprpt@gmail.com> (raw)

pdsfc_info() allocates and populates struct fwctl_info_pds but leaves
the output length unset. Consequently, fwctl_cmd_info() copies no
PDS-specific data and reports a zero device_data_len even when userspace
provides an output buffer.

Set *length to sizeof(*info) before returning the structure.

Fixes: 4d09dd11d7d0 ("pds_fwctl: initial driver framework")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
 drivers/fwctl/pds/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/fwctl/pds/main.c b/drivers/fwctl/pds/main.c
index 68fe254dd10ad..01abc7e83975f 100644
--- a/drivers/fwctl/pds/main.c
+++ b/drivers/fwctl/pds/main.c
@@ -63,6 +63,7 @@ static void *pdsfc_info(struct fwctl_uctx *uctx, size_t *length)
 		return ERR_PTR(-ENOMEM);
 
 	info->uctx_caps = pdsfc_uctx->uctx_caps;
+	*length = sizeof(*info);
 
 	return info;
 }

base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
-- 
2.43.0


             reply	other threads:[~2026-10-28 12:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 12:55 Avi Weiss [this message]
2026-10-28 15:05 ` Dave Jiang

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=20261028125531.978325-2-thnkslprpt@gmail.com \
    --to=thnkslprpt@gmail.com \
    --cc=brett.creeley@amd.com \
    --cc=dave.jiang@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=jic23@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=zhiw@nvidia.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

all inboxes | Powered by JetHome®