The patch titled Subject: param: initialize store function to NULL if not available has been added to the -mm tree. Its filename is param-initialize-store-function-to-null-if-not-available.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/param-initialize-store-function-to-null-if-not-available.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/param-initialize-store-function-to-null-if-not-available.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: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Subject: param: initialize store function to NULL if not available I rebased Kees' 'param: do not set store func without write perm' on top of my 'params: cleanup sysfs allocation'. However, my patch uses krealloc which doesn't zero memory, leaving .store unset. Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Reported-by: Sasha Levin <sasha.levin@xxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/params.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN kernel/params.c~param-initialize-store-function-to-null-if-not-available kernel/params.c --- a/kernel/params.c~param-initialize-store-function-to-null-if-not-available +++ a/kernel/params.c @@ -648,6 +648,8 @@ static __modinit int add_sysfs_param(str /* Do not allow runtime DAC changes to make param writable. */ if ((kp->perm & (S_IWUSR | S_IWGRP | S_IWOTH)) != 0) mk->mp->attrs[mk->mp->num].mattr.store = param_attr_store; + else + mk->mp->attrs[mk->mp->num].mattr.store = NULL; mk->mp->attrs[mk->mp->num].mattr.attr.name = (char *)name; mk->mp->attrs[mk->mp->num].mattr.attr.mode = kp->perm; mk->mp->num++; _ Patches currently in -mm which might be from rusty@xxxxxxxxxxxxxxx are origin.patch param-initialize-store-function-to-null-if-not-available.patch init-remove-config_init_fallback.patch linux-next.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