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>] [day] [month] [year] [list]
Date:   Wed, 19 Aug 2020 10:50:27 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Alexander Viro <viro@...iv.linux.org.uk>
Cc:     Leon Romanovsky <leonro@...lanox.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH RESEND] fs: Delete always true compilation define

From: Leon Romanovsky <leonro@...lanox.com>

In commit 1027abe8827b ("[PATCH] merge locate_fd() and get_unused_fd()")
the existing "#if 1" was moved from one place to another. Originally
that compilation define was set for the sanity check and more than 12
years later it is safe to remove it.

Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
---
 fs/file.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/file.c b/fs/file.c
index 21c0893f2f1d..13a89df7c74e 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -535,13 +535,11 @@ int __alloc_fd(struct files_struct *files,
 	else
 		__clear_close_on_exec(fd, fdt);
 	error = fd;
-#if 1
 	/* Sanity check */
 	if (rcu_access_pointer(fdt->fd[fd]) != NULL) {
 		printk(KERN_WARNING "alloc_fd: slot %d not NULL!\n", fd);
 		rcu_assign_pointer(fdt->fd[fd], NULL);
 	}
-#endif

 out:
 	spin_unlock(&files->file_lock);
--
2.26.2

Powered by blists - more mailing lists