lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201005203749.28083-1-sudipm.mukherjee@gmail.com>
Date:   Mon,  5 Oct 2020 21:37:49 +0100
From:   Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:     Luis Chamberlain <mcgrof@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>
Cc:     linux-kernel@...r.kernel.org, linux-safety@...ts.elisa.tech,
        linux-fsdevel@...r.kernel.org,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH] kernel/sysctl.c: drop unneeded assignment in proc_do_large_bitmap()

The variable 'first' is assigned 0 inside the while loop in the if block
but it is not used in the if block and is only used in the else block.
So, remove the unneeded assignment.

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@...il.com>
---

The resultant binary stayed same after this change. Verified with
md5sum which remained same with and without this change.

$ md5sum kernel/sysctl.o 
e9e97adbfd3f0b32f83dd35d100c0e4e  kernel/sysctl.o

 kernel/sysctl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ce75c67572b9..b51ebfd1ba6e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1508,7 +1508,6 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
 			}
 
 			bitmap_set(tmp_bitmap, val_a, val_b - val_a + 1);
-			first = 0;
 			proc_skip_char(&p, &left, '\n');
 		}
 		left += skipped;
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ