lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 17 Feb 2023 10:47:20 +0100
From:   Christian König <christian.koenig@....com>
To:     Thomas Weißschuh <linux@...ssschuh.net>,
        Sumit Semwal <sumit.semwal@...aro.org>
Cc:     linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linaro-mm-sig@...ts.linaro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma-buf: make kobj_type structure constant

Am 17.02.23 um 04:13 schrieb Thomas Weißschuh:
> Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
> the driver core allows the usage of const struct kobj_type.
>
> Take advantage of this to constify the structure definition to prevent
> modification at runtime.
>
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>

Reviewed-by: Christian König <christian.koenig@....com>

I will pick this up for upstreaming through drm-misc-next.

Thanks,
Christian.

> ---
>   drivers/dma-buf/dma-buf-sysfs-stats.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma-buf/dma-buf-sysfs-stats.c b/drivers/dma-buf/dma-buf-sysfs-stats.c
> index fbf725fae7c1..6cfbbf0720bd 100644
> --- a/drivers/dma-buf/dma-buf-sysfs-stats.c
> +++ b/drivers/dma-buf/dma-buf-sysfs-stats.c
> @@ -112,7 +112,7 @@ static void dma_buf_sysfs_release(struct kobject *kobj)
>   	kfree(sysfs_entry);
>   }
>   
> -static struct kobj_type dma_buf_ktype = {
> +static const struct kobj_type dma_buf_ktype = {
>   	.sysfs_ops = &dma_buf_stats_sysfs_ops,
>   	.release = dma_buf_sysfs_release,
>   	.default_groups = dma_buf_stats_default_groups,
>
> ---
> base-commit: 3ac88fa4605ec98e545fb3ad0154f575fda2de5f
> change-id: 20230217-kobj_type-dma-buf-a2ea6a8a1de3
>
> Best regards,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ