Re: [PATCH] libata: check cdb len per dev instead of per host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan wrote:
On Thu, 01 Feb 2007 11:58:09 -0500
Mark Lord <liml@xxxxxx> wrote:

Fix libata to perform CDB len validation per device
rather than per host.  This way, validation still works
when we have a mix of 12-byte and 16-byte devices on
a common host interface.#

Users can pass 16byte commands in the "safe" list of commands so can spam
the log via the printk

That's nothing new.
We can do that already today with the original existing printk().

This patch (below) gets rid of the offending printk(),
replacing it instead with DPRINTK.

Signed-off-by: Mark Lord <mlord@xxxxxxxxx>
---
--- linux/drivers/ata/libata-scsi.c.orig	2007-02-01 12:26:03.000000000 -0500
+++ linux/drivers/ata/libata-scsi.c	2007-02-01 12:26:54.000000000 -0500
@@ -2762,8 +2762,7 @@
		max_len = dev->cdb_len;
if (unlikely(!scmd->cmd_len || scmd->cmd_len > max_len)) {
- 		ata_dev_printk(dev, KERN_WARNING,
- 			"WARNING: bad CDB len=%u, max=%u\n",
+ 		DPRINTK("bad CDB len=%u, max=%u\n",
 			scmd->cmd_len, max_len);
		scmd->result = DID_ERROR << 16;
		done(scmd);
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux