[PATCH] fwctl: pds: report device information length
From: Avi Weiss
Date: Wed Oct 28 2026 - 09:00:42 EST
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@xxxxxxxxx>
---
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