The patch titled Subject: mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix has been added to the -mm tree. Its filename is mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix.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/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix reduce implicit and explicit typecasting Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Enrico Weigelt <info@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Kate Stewart <kstewart@xxxxxxxxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmpressure.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) --- a/mm/vmpressure.c~mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix +++ a/mm/vmpressure.c @@ -375,20 +375,18 @@ int vmpressure_register_event(struct mem /* Find required level */ token = strsep(&spec, ","); - level = match_string(vmpressure_str_levels, VMPRESSURE_NUM_LEVELS, token); - if ((int)level < 0) { - ret = level; + ret = match_string(vmpressure_str_levels, VMPRESSURE_NUM_LEVELS, token); + if (ret < 0) goto out; - } + level = ret; /* Find optional mode */ token = strsep(&spec, ","); if (token) { - mode = match_string(vmpressure_str_modes, VMPRESSURE_NUM_MODES, token); - if ((int)mode < 0) { - ret = mode; + ret = match_string(vmpressure_str_modes, VMPRESSURE_NUM_MODES, token); + if (ret < 0) goto out; - } + mode = ret; } ev = kzalloc(sizeof(*ev), GFP_KERNEL); _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are ocfs2-clear-zero-in-unaligned-direct-io-checkpatch-fixes.patch fs-ocfs2-fix-possible-null-pointer-dereferences-in-ocfs2_xa_prepare_entry-fix.patch mm-page_alloc-fix-a-crash-in-free_pages_prepare-fix.patch mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix.patch mm.patch mm-slb-guarantee-natural-alignment-for-kmallocpower-of-two-fix.patch mm-oom-avoid-printk-iteration-under-rcu-fix.patch hugetlb-remove-duplicated-code-checkpatch-fixes.patch linux-next-git-rejects.patch diff-sucks.patch drivers-tty-serial-sh-scic-suppress-warning.patch kernel-forkc-export-kernel_thread-to-modules.patch