lkml.org 
[lkml]   [2022]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 008/240] random: dont forget compat_ioctl on urandom
    Date
    From: "Jason A. Donenfeld" <Jason@zx2c4.com>

    commit 4aa37c463764052c68c5c430af2a67b5d784c1e0 upstream.

    Recently, there's been some compat ioctl cleanup, in which large
    hardcoded lists were replaced with compat_ptr_ioctl. One of these
    changes involved removing the random.c hardcoded list entries and adding
    a compat ioctl function pointer to the random.c fops. In the process,
    urandom was forgotten about, so this commit fixes that oversight.

    Fixes: 507e4e2b430b ("compat_ioctl: remove /dev/random commands")
    Cc: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
    Link: https://lore.kernel.org/r/20191217172455.186395-1-Jason@zx2c4.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/char/random.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/char/random.c
    +++ b/drivers/char/random.c
    @@ -2199,6 +2199,7 @@ const struct file_operations urandom_fop
    .read = urandom_read,
    .write = random_write,
    .unlocked_ioctl = random_ioctl,
    + .compat_ioctl = compat_ptr_ioctl,
    .fasync = random_fasync,
    .llseek = noop_llseek,
    };

    \
     
     \ /
      Last update: 2022-06-20 15:36    [W:5.216 / U:0.672 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site