Skip to content

Commit 75df38a

Browse files
Hongbo Lihdeller
authored andcommitted
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>
1 parent da3ea35 commit 75df38a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/parisc/pdc_stable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ static struct attribute *paths_subsys_attrs[] = {
483483
ATTRIBUTE_GROUPS(paths_subsys);
484484

485485
/* Specific kobject type for our PDC paths */
486-
static struct kobj_type ktype_pdcspath = {
486+
static const struct kobj_type ktype_pdcspath = {
487487
.sysfs_ops = &pdcspath_attr_ops,
488488
.default_groups = paths_subsys_groups,
489489
};

0 commit comments

Comments
 (0)