linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Alan <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jgarzik@pobox.com>, Tejun Heo <htejun@gmail.com>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] libata: check cdb len per dev instead of per host
Date: Thu, 01 Feb 2007 12:28:57 -0500	[thread overview]
Message-ID: <45C22359.8060701@rtr.ca> (raw)
In-Reply-To: <20070201171613.72091b81@localhost.localdomain>

Alan wrote:
> On Thu, 01 Feb 2007 11:58:09 -0500
> Mark Lord <liml@rtr.ca> 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@pobox.com>
---
--- 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);

      reply	other threads:[~2007-02-01 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-01 16:58 [PATCH] libata: check cdb len per dev instead of per host Mark Lord
2007-02-01 17:16 ` Alan
2007-02-01 17:28   ` Mark Lord [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45C22359.8060701@rtr.ca \
    --to=liml@rtr.ca \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).