Commit 5baf1ec3 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Tim Gardner

UBUNTU: SAUCE: (no-up) elide some ioctl warnings which are known benign

BugLink: http://bugs.launchpad.net/bugs/972355

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.htmlSigned-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 5d225a70
......@@ -28,6 +28,9 @@
#include <linux/slab.h>
#include <linux/times.h>
#include <linux/uio.h>
#include <linux/fd.h>
#include <linux/raid/md_u.h>
#include <linux/mtio.h>
#include <asm/uaccess.h>
#include <scsi/scsi.h>
......@@ -705,8 +708,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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment