linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] char: random: fix urandom ioctl support
@ 2019-12-07 18:58 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2019-12-07 18:58 UTC (permalink / raw)
  To: Theodore Ts'o, Arnd Bergmann, Greg Kroah-Hartman
  Cc: youling 257, linux-kernel

My patch to move the /dev/random compat handling from
fs/compat_ioctl.c int drivers missed the corresponding
/dev/urandom support.

Use the same compat_ptr_ioctl() in both devices.

Fixes: 507e4e2b430b ("compat_ioctl: remove /dev/random commands")
Reported-by: youling 257 <youling257@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/char/random.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 46afd14facb7..9280ca4d85c0 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -2176,6 +2176,7 @@ const struct file_operations urandom_fops = {
 	.read  = urandom_read,
 	.write = random_write,
 	.unlocked_ioctl = random_ioctl,
+	.compat_ioctl = compat_ptr_ioctl,
 	.fasync = random_fasync,
 	.llseek = noop_llseek,
 };
-- 
2.20.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-07 18:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-07 18:58 [PATCH] char: random: fix urandom ioctl support Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).