From patchwork Sat Dec 7 18:58:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 180945 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2395040ile; Sat, 7 Dec 2019 10:59:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxC1wJCOV3bCr/VLYXfRO4UjGUhQhwPTLoxLS45VcsfS9iFaHECxe2yIZO/DTgkZPDKGg8I X-Received: by 2002:a9d:6a92:: with SMTP id l18mr16273524otq.37.1575745148356; Sat, 07 Dec 2019 10:59:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575745148; cv=none; d=google.com; s=arc-20160816; b=tyrRlIVKAZpwnlK8ns2p8tmaBSc7lKbythlvgx8O6ZXxkAretR6ZPH7uBf6Q7gVn5n Oc+S3qbcs25ncWKfnreNUNMAQVgQIvDeogYY0G/8YxYxDFQm3uajH/Gbjh6w6LAcB9PM Tx3/yAQu3TJe3ZGitLKXArwb5dBRhm0cNl8YXj2HV0JKhZ4gm8lDgjeqysFotcovucUj eeSNvXGhXzlhVJqijPre+zH1RfkTRS0WCKCDyEMxsjpMTrjMVix2YzEnHq3f0PjUsPdm Z6oo0ZPgUPjKmxV9LQPc2AsUYj0KR8idhDbf14vYPKNssJdWKlWnJd0NBLZEXQzIiu+B oNHw== 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; bh=eELsVF9BCNN1eGf5Dk4Nrpd5PPLPVSx10xHWy2BqqG8=; b=etv2DrYwvwZkTMY/5+Nqjk0cOoa86hbwoY0r7d7udUz5uW4AJ5rN8JH+pe2wKBaZQj rH3vN8DwNhyPVjvQ3GnLBueCIHlemIkgPL/W4S9XesNNSuDOCoLGThW4dIH3S72y8dxl xBY5xfzGe1MdXmZM3UtGn3zrv6lWNjQjD9vhOhVAaY9cpD6JYfO0SK6jUUgGgC070bLs tiooMa2wM8c92xs2AFAjDcz11bJd+egeHnFYE5XwV0KxN5xC5G6DnbtE8oPutoQ4FL30 0AqTX3CdZAz4pOmtZ9lIcuvxBbfFmmEP86HKoz9LJ0Og5i2FAMJSxNd+10JwPLp5OZFx Ufvw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t26si8686431oth.153.2019.12.07.10.59.08; Sat, 07 Dec 2019 10:59:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726646AbfLGS7G (ORCPT + 27 others); Sat, 7 Dec 2019 13:59:06 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:35795 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726464AbfLGS7G (ORCPT ); Sat, 7 Dec 2019 13:59:06 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MhUDj-1i7t2W2CQd-00ecPC; Sat, 07 Dec 2019 19:58:59 +0100 From: Arnd Bergmann To: "Theodore Ts'o" , Arnd Bergmann , Greg Kroah-Hartman Cc: youling 257 , linux-kernel@vger.kernel.org Subject: [PATCH] char: random: fix urandom ioctl support Date: Sat, 7 Dec 2019 19:58:20 +0100 Message-Id: <20191207185837.4030699-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:8CwiCrTP/p6MJDsdA8rUtahJe11dgA3jWUvuqhYyaGBhbsLMeuX 9/TAY4wNzh4ZcUBMkSFOmzhMfFI+STet46uHpit1NvYfcnOcX0UdFzAI6UEutAfP7rxr6Ev AyZnKJZ0UF4hsyuu6ops+X9g429XbJhaeAb4yd7U2oo/YF+dWneW6uufkJwAO8llX/1Puzj ishS4bsB/1nhipk8z+YyA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:WTPxP5nxjXw=:d1Q8mps8ui51i/dZdzQb8X GAHoroG9bmhNGAh6kXsavuNzLmwP65PkDY500dDOAmhu8+k6WdFoc2qDAUReeeBqy/BHKKOba DUuAXBoAglJbxMx+TYEs1TIIGZkhxomPc0/TkyOznPrIBXp2G+qGG/1iuWVno0+Uppkekb90S fOGAz4/jhIsYma0m/Shv6zwobgMwUrYYKy2JJI2JKPHkiNEwEn6QLa4wgNp+Dl2GeKMXUKaXR QSrJc5F+l++tEh+U8bzpereo4l1nVpu8ph5yoJL3mDpLK8FaJub44+KMM40SuL4tDn2A3d4Lf YYCxflL5OZSmgGa+DdapDmBgMip4i9XDBqOtlGyKxJfH4TpKGwk9XOHGDt/Mct0+28UCHu8yI U7K+fhIqpHg/qcL7npEDDtxFzIiAP9kAskgVeafiZDLW+w/OyUXrqGn0WkDfbr4x6HMXahfiZ SwghYuviSF5Q7c80F99+7JJkuy83oNs5tcXYVB5bFlVk5GClEo4Qz1yG9FVauk2KmAu9rkf2s TPZ+Ke3mvsWEpWmpqYv7O2UkZO9oI8WRhPVL8FAMKMEdWYqWTae33XAX3b347QVgBlU9vaQ60 KeA/SBo9wMT1+lzma1OfnUFo+HalwjJFk+sK9Q2+xbgLW7dKDZ/GdQWpFXZJ4HQ+3zGkQHhjZ 3T81NyYt1qn9vBLuHUNGL1fVKbflgN8OZbJFa5WtaOcnp3CJitmPjXZDZwp9O8U8l//tDPjgl QbiamouWT8/1duQRPdPJgQi1uWRcGkzG3+z5WHM34+KRXAIn7ybax2DEnF/8sLI0NeUTeFZZO JzJ5DWhIvuHcol460ChVSfxBGd73XOlDC0ZcIzjEEwV6WKC0DdaDI3GesHwtzyz9ouv0AdgmT CFtA6Ra/z3w3LDkeX/Tg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Arnd Bergmann --- drivers/char/random.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.0 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, };