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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <152261540772.30503.1698627927664620191.stgit@warthog.procyon.org.uk>
Date:   Sun, 01 Apr 2018 21:43:27 +0100
From:   David Howells <dhowells@...hat.com>
To:     linux-kernel@...r.kernel.org
Subject: [PATCH 32/45] C++: __to_fd() needs to reduce the size of v for
 struct fd::flags

__to_fd() needs to reduce the size of v before it assigns the computed
value to fd::flags or suffer a warning about reduction of size of integer.

Signed-off-by: David Howells <dhowells@...hat.com>
---

 include/linux/file.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/file.h b/include/linux/file.h
index 279720db984a..9807271c850a 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -49,7 +49,7 @@ extern void __f_unlock_pos(struct file *);
 
 static inline struct fd __to_fd(unsigned long v)
 {
-	return (struct fd){(struct file *)(v & ~3),v & 3};
+	return (struct fd){(struct file *)(v & ~3), (unsigned int)v & 3};
 }
 
 static inline struct fd fdget(unsigned int fd)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ