From patchwork Thu Oct 17 19:39:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 11197027 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE589139A for ; Thu, 17 Oct 2019 19:39:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 973DE21A49 for ; Thu, 17 Oct 2019 19:39:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440088AbfJQTjx (ORCPT ); Thu, 17 Oct 2019 15:39:53 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:45074 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437851AbfJQTjq (ORCPT ); Thu, 17 Oct 2019 15:39:46 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLBce-0006fk-Et; Thu, 17 Oct 2019 19:39:44 +0000 From: Al Viro To: linux-scsi@vger.kernel.org Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Al Viro Subject: [RFC PATCH 8/8] SG_IO: get rid of access_ok() Date: Thu, 17 Oct 2019 20:39:25 +0100 Message-Id: <20191017193925.25539-8-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191017193925.25539-1-viro@ZenIV.linux.org.uk> References: <20191017193659.GA18702@ZenIV.linux.org.uk> <20191017193925.25539-1-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Al Viro simply not needed there - neither sg_new_read() nor sg_new_write() need it. Signed-off-by: Al Viro --- drivers/scsi/sg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index f3d090b93cdf..0940abd91d3c 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -896,8 +896,6 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) return -ENODEV; if (!scsi_block_when_processing_errors(sdp->device)) return -ENXIO; - if (!access_ok(p, SZ_SG_IO_HDR)) - return -EFAULT; result = sg_new_write(sfp, filp, p, SZ_SG_IO_HDR, 1, read_only, 1, &srp); if (result < 0)