The patch titled Subject: kernel/sysctl.c: remove duplicate UINT_MAX check on do_proc_douintvec_conv() has been added to the -mm tree. Its filename is sysctl-remove-duplicate-uint_max-check-on-do_proc_douintvec_conv.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/sysctl-remove-duplicate-uint_max-check-on-do_proc_douintvec_conv.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/sysctl-remove-duplicate-uint_max-check-on-do_proc_douintvec_conv.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: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx> Subject: kernel/sysctl.c: remove duplicate UINT_MAX check on do_proc_douintvec_conv() do_proc_douintvec_conv() has two UINT_MAX checks, we can remove one. This has no functional changes other than fixing a compiler warning: kernel/sysctl.c:2190]: (warning) Identical condition '*lvalp>UINT_MAX', second condition is always false Fixes: 4f2fec00afa60 ("sysctl: simplify unsigned int support") Link: http://lkml.kernel.org/r/20170919072918.12066-1-mcgrof@xxxxxxxxxx Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx> Reported-by: David Binderman <dcb314@xxxxxxxxxxx> Acked-by: Kees Cook <keescook@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/sysctl.c | 2 -- 1 file changed, 2 deletions(-) diff -puN kernel/sysctl.c~sysctl-remove-duplicate-uint_max-check-on-do_proc_douintvec_conv kernel/sysctl.c --- a/kernel/sysctl.c~sysctl-remove-duplicate-uint_max-check-on-do_proc_douintvec_conv +++ a/kernel/sysctl.c @@ -2187,8 +2187,6 @@ static int do_proc_douintvec_conv(unsign if (write) { if (*lvalp > UINT_MAX) return -EINVAL; - if (*lvalp > UINT_MAX) - return -EINVAL; *valp = *lvalp; } else { unsigned int val = *valp; _ Patches currently in -mm which might be from mcgrof@xxxxxxxxxx are sysctl-remove-duplicate-uint_max-check-on-do_proc_douintvec_conv.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