mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
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>
This commit is contained in:
parent
da3ea35007
commit
75df38aaf1
@ -483,7 +483,7 @@ static struct attribute *paths_subsys_attrs[] = {
|
|||||||
ATTRIBUTE_GROUPS(paths_subsys);
|
ATTRIBUTE_GROUPS(paths_subsys);
|
||||||
|
|
||||||
/* Specific kobject type for our PDC paths */
|
/* 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,
|
.sysfs_ops = &pdcspath_attr_ops,
|
||||||
.default_groups = paths_subsys_groups,
|
.default_groups = paths_subsys_groups,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user