diff options
author | Hongbo Li <lihongbo22@huawei.com> | 2024-09-04 04:16:42 +0300 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-09-09 09:53:17 +0300 |
commit | 75df38aaf1f102af32919fad2e055153bee52e1f (patch) | |
tree | 7d6b843e4bb602af06f557bac0a419df7fef6b80 /drivers/parisc | |
parent | da3ea35007d0af457a0afc87e84fddaebc4e0b63 (diff) | |
download | linux-75df38aaf1f102af32919fad2e055153bee52e1f.tar.xz |
parisc: pdc_stable: Constify struct kobj_type
This 'struct kobj_type' is not modified. It is only used in
kobject_init_and_add() which takes a 'const struct kobj_type *ktype'
parameter.
Constifying this structure and moving it to a read-only section,
and can increase over all security.
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/parisc')
-rw-r--r-- | drivers/parisc/pdc_stable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 633266447e2f..16f4496bca95 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c @@ -483,7 +483,7 @@ static struct attribute *paths_subsys_attrs[] = { ATTRIBUTE_GROUPS(paths_subsys); /* Specific kobject type for our PDC paths */ -static struct kobj_type ktype_pdcspath = { +static const struct kobj_type ktype_pdcspath = { .sysfs_ops = &pdcspath_attr_ops, .default_groups = paths_subsys_groups, }; |