From patchwork Tue Apr 3 09:58:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 150365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3E28DB6FE8 for ; Tue, 3 Apr 2012 19:58:50 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SF0VY-0005qU-BT; Tue, 03 Apr 2012 09:58:36 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SF0VW-0005qG-4j for kernel-team@lists.ubuntu.com; Tue, 03 Apr 2012 09:58:34 +0000 Received: from 79-78-218-124.dynamic.dsl.as9105.com ([79.78.218.124] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SF0VV-0006g9-U6; Tue, 03 Apr 2012 09:58:34 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: SAUCE: (no-up) elide some ioctl warnings which are known benign Date: Tue, 3 Apr 2012 10:58:32 +0100 Message-Id: <1333447112-6414-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1333447112-6414-1-git-send-email-apw@canonical.com> References: <1333447112-6414-1-git-send-email-apw@canonical.com> Cc: Andy Whitcroft X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com We have been seeing increasing reports of scarey ioctl messages in dmesg, such as the below often in bulk: mdadm: sending ioctl 1261 to a partition! mdadm: sending ioctl 800c0910 to a partition! Looking at the upstream discussions these are all benign and can be safely suppressed. This patch is based on some discussions at the link below, on some work SUSE did in this area. This is not suitable for upstreaming as we need some refactoring to fix the 32bit compat ioctl mess. Link: http://www.spinics.net/lists/raid/msg37770.html Signed-off-by: Andy Whitcroft --- block/scsi_ioctl.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 688be8a..f09cc86 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -710,8 +710,17 @@ int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd) case SG_GET_RESERVED_SIZE: case SG_SET_RESERVED_SIZE: case SG_EMULATED_HOST: + case BLKFLSBUF: + case BLKROSET: return 0; case CDROM_GET_CAPABILITY: + case CDROM_DRIVE_STATUS: + case FDGETPRM: + case RAID_VERSION: + case MTIOCGET: +#ifdef CONFIG_COMPAT + case 0x801c6d02: /* MTIOCGET32 */ +#endif /* Keep this until we remove the printk below. udev sends it * and we do not want to spam dmesg about it. CD-ROMs do * not have partitions, so we get here only for disks.