The patch titled Subject: kernel/ksysfs.c: add __ro_after_init to bin_attribute structure has been added to the -mm tree. Its filename is kernel-ksysfs-add-__ro_after_init-to-bin_attribute-structure.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/kernel-ksysfs-add-__ro_after_init-to-bin_attribute-structure.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/kernel-ksysfs-add-__ro_after_init-to-bin_attribute-structure.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Bhumika Goyal <bhumirks@xxxxxxxxx> Subject: kernel/ksysfs.c: add __ro_after_init to bin_attribute structure The object notes_attr of type bin_attribute is not modified after getting initailized by ksysfs_init. Apart from initialization in ksysfs_init it is also passed as an argument to the function sysfs_create_bin_file but this argument is of type const. Therefore, add __ro_after_init to its declaration. Link: http://lkml.kernel.org/r/1486839969-16891-1-git-send-email-bhumirks@xxxxxxxxx Signed-off-by: Bhumika Goyal <bhumirks@xxxxxxxxx> Acked-by: Kees Cook <keescook@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/ksysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/ksysfs.c~kernel-ksysfs-add-__ro_after_init-to-bin_attribute-structure kernel/ksysfs.c --- a/kernel/ksysfs.c~kernel-ksysfs-add-__ro_after_init-to-bin_attribute-structure +++ a/kernel/ksysfs.c @@ -195,7 +195,7 @@ static ssize_t notes_read(struct file *f return count; } -static struct bin_attribute notes_attr = { +static struct bin_attribute notes_attr __ro_after_init = { .attr = { .name = "notes", .mode = S_IRUGO, _ Patches currently in -mm which might be from bhumirks@xxxxxxxxx are kernel-ksysfs-add-__ro_after_init-to-bin_attribute-structure.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html