From patchwork Tue Dec 17 17:24:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 181893 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp6048716ile; Tue, 17 Dec 2019 09:25:18 -0800 (PST) X-Google-Smtp-Source: APXvYqxYO1XGS4aPhWWhrgq/n4DrfgCKOJDhubSluh8HYD0Nhx3ODzvoS1TahGr3YuMMkpus6CYL X-Received: by 2002:a9d:6a8f:: with SMTP id l15mr37824304otq.59.1576603518034; Tue, 17 Dec 2019 09:25:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576603518; cv=none; d=google.com; s=arc-20160816; b=udRdEeohEKTv98bNRVGsSiVAMITBIPcfii5uUeLD9iaNiLI4EDHTQC+MIOt3atDdQZ XQf876ECP1n+swVqllMS28Uuyi/BFNePUlvgRM3eDdqCf3K63va/TaIwVKoiedxPV7Vk RzzbHhjB1UaERzfOgVDcu58b7LmuQbJIXde1y2VoiOm0tdGJ5g8Q/AoOElBjlMAca/Jo wQCuYnMnQU5NVIWADZxBit/JOjAtqsS+RpzC+SqjKYe3nCgFIgoQCcwkVDdDyi7mE5Ow X8ricnRGxQ/EmHY1dJybvRJNO94TUZhyyfRpME2X3WYXJXwkcCxgma4YMytO7fVOXTEd 9T6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZJwLj+rZckWJGXBdg9Q++oZdiPJFCthMixxdN2x5314=; b=xDcYhl0j8llpDhuR+gMMV7bp18uX5j3LoaOjRUvjGdgQF+4L3ohJpIAEVuejgjKDeh yG3LH4fNKa7KmIB09m2Zh0SMHTa2upDbsXBcLjJlEf12xArS1wnfbSwiDb0OcT34Ptrt jeRodFWiZjoOwvA2wWAaDDnj4cucDO4wfwCaEookzG4FKvTfuY3dBcYXfMF2Aw77viqU knv0Fr7Ytj/7R2U/9QSV0b+LmHlp00aIiYqoue9SxeMCwXCeafpX9wzGXyO2IbxARWtF BgpERm3FJ3n+ggJg8Ys2JkmtrUqYoY1sbEtcd9xODLQxhRmemJHNzFlDMXDoCZOQf/SO tSKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=p8jscr+A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j143si13151191oib.16.2019.12.17.09.25.17; Tue, 17 Dec 2019 09:25:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=p8jscr+A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727572AbfLQRZR (ORCPT + 27 others); Tue, 17 Dec 2019 12:25:17 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:45269 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726723AbfLQRZQ (ORCPT ); Tue, 17 Dec 2019 12:25:16 -0500 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 844719df; Tue, 17 Dec 2019 16:28:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=from:to:cc :subject:date:message-id:mime-version:content-transfer-encoding; s=mail; bh=BJdwj6yJFuqILwjC4/F5JGMrUWI=; b=p8jscr+AvKDJllcKhf/z MLlGpE8fX0giSC2k1USSnWv0sfm0/llBHa1IIFg81Wytj1i/eDAprIff5+XEa6b+ em7jNxi+pZdGrTHAxGEyLt7++EFtXOuhFDrBy4D/slt4zNknbuYHnMTwL+yZK+pr DdHTnKRnQz4cxXeBg5Y86JtMBpeEfHY6VwvsPJb2A4kzvoBQxSB7vr9+vRXQZv3E +gkuhreFX6hjrxiHiEz22y8nydpP4WJAdWSZYklsDWKIM8Va6uGXX+nL3GWF/OGt gn145jbL0Gpp6W3zBfRjOHHkLvFcHH4HWPwkylcT2ZEfvJd13s3ELSLbX8/v7gTf Mw== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id cb6a263f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 17 Dec 2019 16:28:46 +0000 (UTC) From: "Jason A. Donenfeld" To: linux-kernel@vger.kernel.org, arnd@arndb.de Cc: "Jason A. Donenfeld" , Greg Kroah-Hartman Subject: [PATCH] random: don't forget compat_ioctl on unrandom Date: Tue, 17 Dec 2019 18:24:55 +0100 Message-Id: <20191217172455.186395-1-Jason@zx2c4.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Greg Kroah-Hartman Signed-off-by: Jason A. Donenfeld --- drivers/char/random.c | 1 + 1 file changed, 1 insertion(+) -- 2.24.1 diff --git a/drivers/char/random.c b/drivers/char/random.c index 909e0c3d82ea..cda12933a17d 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -2175,6 +2175,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, };