Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1523867pxb; Thu, 16 Sep 2021 09:12:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRPG+FBZ9OZ5en5Y1n3tUD1PhHExmOv0zb5RHWppzjJulrpir3Sib66VlvQmFERpfdQuN+ X-Received: by 2002:a92:3642:: with SMTP id d2mr4566791ilf.234.1631808731604; Thu, 16 Sep 2021 09:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631808731; cv=none; d=google.com; s=arc-20160816; b=g4wwswXM+w0iJMQs0eBMU5QuNYpLGxL9U9VNunekTsJmhFbk0/KIam1wUu0oKirdTZ VsWtaTJSpMRApSUW7Vo5YTOvUDazuifOTu6v3mQnS8pmb6vCsFktTVvL0WIABSD0W7Na j/XsU4GgdRVk7Z7RWDxSHhQtdoVftiQbduBE9kjRxmnF62ExZHCGiJDT6z934a/gt8wJ uuDQFnNQ9dGSijUjHCi+tFUswZ2OPuUNO9gSlOApi/VrGuFhN7Kad0ZdW7LEkvnsz7wz iLXYAf7uMfAZrroYR2geIyeYUcxHmZTIBZ2AqTpoeqrufJKvvQpjihgPZrTrlZ8vcs9y W78w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=twma8HW5ZprTm8ijaBYMOodE6OFZNgFG0ScfmeH4Y1A=; b=CD1wvh6Sploee8b0jfw34grAwIsKfzILIOaRXS6gQfp9MhpKJ2WN5dZDFDT1xmTmm3 sEbEu+aRvCcJOa0UaWS1Vx1GhBdDy7BiCzfxC/lUjL/gM//cOjV4kuhNd/jGAI0sDP8F jhzTEUPFLzU0JHaLd4HDNPQiNDfkD+pAPcp9E9NJGRCSeA6TZv8f7dmUz+pe6mlaa1Nx aI1K4nLc5uinfyPvIfDsCj0xCU4lhh9kPWxe5FDX6emynYSJulcU6/VTJgnY2bHbeVLv AYFZ4xHwv9jCO/iaq1ALFtGs3Qgk2RPi2WKYdi0Ox09FyBfyEWCeFlCOlQxoOgKGXbaK xjcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NgCosYzg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j2si3096876ilr.113.2021.09.16.09.12.00; Thu, 16 Sep 2021 09:12:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NgCosYzg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235527AbhIPQKi (ORCPT + 99 others); Thu, 16 Sep 2021 12:10:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:46666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234127AbhIPQHN (ORCPT ); Thu, 16 Sep 2021 12:07:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5FCA861263; Thu, 16 Sep 2021 16:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808352; bh=J9aWaZfBGx2uTbh0ZAICfl9+7pt3ZQkHDKnpzBfHsIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NgCosYzgXZ2KdBVDGR2Sh0YEOW0pJ6N3VPjV5fbRALfyG7NiUV0xyXGksOyECiDs/ 6FaGvcTRFyi9TAR//bhLWU8BaTHtLEFdWjmwaZZYn90Hjl1THeDhrEBezb300goMPH EGHOdwqwu0vvVHKqw9Vv44gQJ2Zl5/gD3HuAINcs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bart Van Assche , Jens Axboe , Christoph Hellwig , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.10 058/306] scsi: bsg: Remove support for SCSI_IOCTL_SEND_COMMAND Date: Thu, 16 Sep 2021 17:56:43 +0200 Message-Id: <20210916155755.923264527@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig [ Upstream commit beec64d0c9749afedf51c3c10cf52de1d9a89cc0 ] SCSI_IOCTL_SEND_COMMAND has been deprecated longer than bsg exists and has been warning for just as long. More importantly it harcodes SCSI CDBs and thus will do the wrong thing on non-SCSI bsg nodes. Link: https://lore.kernel.org/r/20210724072033.1284840-2-hch@lst.de Fixes: aa387cc89567 ("block: add bsg helper library") Reviewed-by: Bart Van Assche Acked-by: Jens Axboe Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- block/bsg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/bsg.c b/block/bsg.c index 3d78e843a83f..2cbc1fcc8247 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -371,10 +371,13 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case SG_GET_RESERVED_SIZE: case SG_SET_RESERVED_SIZE: case SG_EMULATED_HOST: - case SCSI_IOCTL_SEND_COMMAND: return scsi_cmd_ioctl(bd->queue, NULL, file->f_mode, cmd, uarg); case SG_IO: return bsg_sg_io(bd->queue, file->f_mode, uarg); + case SCSI_IOCTL_SEND_COMMAND: + pr_warn_ratelimited("%s: calling unsupported SCSI_IOCTL_SEND_COMMAND\n", + current->comm); + return -EINVAL; default: return -ENOTTY; } -- 2.30.2