ACK/Cmnt: [SRU][Jammy][PATCH 1/1] UBUNTU: SAUCE: dmaengine: idxd: set is_visible member of idxd_wq_attribute_group
Stefan Bader
stefan.bader at canonical.com
Wed Jun 12 08:20:42 UTC 2024
On 11.06.24 20:59, Jacob Martin wrote:
> BugLink: https://bugs.launchpad.net/bugs/2069081
>
> The backport of commit b0325aefd398 ("dmaengine: idxd: add WQ operation
> cap restriction support") for K5.15 omitted a line setting the
> is_visible callback of idxd_wq_attribute_group to the
> idxd_wq_attr_visible function introduced in the same commit.
>
> This results in the op_config attribute being accessible from userspace
> when the underlying wq->opcap_bmap pointer used to service reads from it
> is uninitialized, leading to a NULL pointer dereference when the
> op_config attribute is read. Resolve this by setting the is_visible
> callback as the upstream commit does.
>
> Signed-off-by: Jacob Martin <jacob.martin at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---
Interesting how I managed to drop that bit. Good catch. I probably would
add a standard
Fixes: b0325aefd398 ("dmaengine: idxd: add WQ operation cap restriction
support")
on the s-o-b area.
-Stefan
> drivers/dma/idxd/sysfs.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
> index 0908746ce586..636f349b6e2d 100644
> --- a/drivers/dma/idxd/sysfs.c
> +++ b/drivers/dma/idxd/sysfs.c
> @@ -1114,6 +1114,7 @@ static umode_t idxd_wq_attr_visible(struct kobject *kobj,
>
> static const struct attribute_group idxd_wq_attribute_group = {
> .attrs = idxd_wq_attributes,
> + .is_visible = idxd_wq_attr_visible,
> };
>
> static const struct attribute_group *idxd_wq_attribute_groups[] = {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xE8675DEECBEECEA3.asc
Type: application/pgp-keys
Size: 48643 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20240612/3183e73c/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20240612/3183e73c/attachment-0001.sig>
More information about the kernel-team
mailing list