mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Avi Weiss <thnkslprpt@gmail.com>,
	Brett Creeley <brett.creeley@amd.com>,
	Jason Gunthorpe <jgg@ziepe.ca>
Cc: Saeed Mahameed <saeedm@nvidia.com>, Zhi Wang <zhiw@nvidia.com>,
	Jonathan Cameron <jic23@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fwctl: pds: report device information length
Date: Wed, 28 Oct 2026 08:05:30 -0700	[thread overview]
Message-ID: <370b02eb-e488-493f-8eb1-56c0e0b39fc6@intel.com> (raw)
In-Reply-To: <20261028125531.978325-2-thnkslprpt@gmail.com>



On 10/28/26 5:55 AM, Avi Weiss wrote:
> 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>

Looks pretty straight forward fix

Reviewed-by: Dave Jiang <dave.jiang@intel.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


      reply	other threads:[~2026-10-28 15:05 UTC|newest]

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

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=370b02eb-e488-493f-8eb1-56c0e0b39fc6@intel.com \
    --to=dave.jiang@intel.com \
    --cc=brett.creeley@amd.com \
    --cc=jgg@ziepe.ca \
    --cc=jic23@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=thnkslprpt@gmail.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®