public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove error message on illegal ioctl
@ 2002-12-11  5:56 Robert Love
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Love @ 2002-12-11  5:56 UTC (permalink / raw)
  To: linux-kernel

Linus is away so I am just throwing this out on lkml..

This error message is uber annoying and needs to go.  Non-root can flood
the console with this junk on invalid SCSI CD-ROM ioctl(), and that is
exactly what gnome-cd does.

An illegal ioctl() returns an error to the program.  That is sufficient
- we do not need KERN_ERROR warnings all over the place.  Especially
when any user can cause them at any rate.

This patch, against 2.5.51, removes the message.

	Robert Love

 drivers/scsi/sr_ioctl.c |    3 ---
 1 files changed, 3 deletions(-)


diff -urN linux-2.5.51-mm1/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
--- linux-2.5.51-mm1/drivers/scsi/sr_ioctl.c	2002-12-10 17:45:03.000000000 -0500
+++ linux/drivers/scsi/sr_ioctl.c	2002-12-11 00:44:24.000000000 -0500
@@ -156,9 +156,6 @@
 			err = -ENOMEDIUM;
 			break;
 		case ILLEGAL_REQUEST:
-			if (!cgc->quiet)
-				printk(KERN_ERR "%s: CDROM (ioctl) reports ILLEGAL "
-				       "REQUEST.\n", cd->cdi.name);
 			err = -EIO;
 			if (SRpnt->sr_sense_buffer[12] == 0x20 &&
 			    SRpnt->sr_sense_buffer[13] == 0x00)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] remove error message on illegal ioctl
@ 2002-12-14  2:22 Robert Love
  2002-12-16  9:16 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Love @ 2002-12-14  2:22 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

This error message is uber annoying and needs to go.  Non-root can flood
the console with this junk on invalid SCSI CD-ROM ioctl(),
and that is exactly what gnome-cd does.

An illegal ioctl() returns an error to the program.  That is
sufficient - we do not need KERN_ERROR warnings all over the place.
Especially when any user can cause them at any rate.

This patch, against 2.5.51, removes the message.  Linus, please
apply.

	Robert Love

 drivers/scsi/sr_ioctl.c |    3 ---
 1 files changed, 3 deletions(-)


diff -urN linux-2.5.51/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
--- linux-2.5.51/drivers/scsi/sr_ioctl.c	2002-12-10 17:45:03.000000000 -0500
+++ linux/drivers/scsi/sr_ioctl.c	2002-12-11 00:44:24.000000000 -0500
@@ -156,9 +156,6 @@
 			err = -ENOMEDIUM;
 			break;
 		case ILLEGAL_REQUEST:
-			if (!cgc->quiet)
-				printk(KERN_ERR "%s: CDROM (ioctl) reports ILLEGAL "
-				       "REQUEST.\n", cd->cdi.name);
 			err = -EIO;
 			if (SRpnt->sr_sense_buffer[12] == 0x20 &&
 			    SRpnt->sr_sense_buffer[13] == 0x00)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] remove error message on illegal ioctl
  2002-12-14  2:22 [PATCH] remove error message on illegal ioctl Robert Love
@ 2002-12-16  9:16 ` Jens Axboe
  2002-12-16  9:39   ` Linus Torvalds
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2002-12-16  9:16 UTC (permalink / raw)
  To: Robert Love; +Cc: torvalds, linux-kernel

On Fri, Dec 13 2002, Robert Love wrote:
> This error message is uber annoying and needs to go.  Non-root can flood
> the console with this junk on invalid SCSI CD-ROM ioctl(),
> and that is exactly what gnome-cd does.
> 
> An illegal ioctl() returns an error to the program.  That is
> sufficient - we do not need KERN_ERROR warnings all over the place.
> Especially when any user can cause them at any rate.
> 
> This patch, against 2.5.51, removes the message.  Linus, please
> apply.

Vetoed. That particular function is also used for generic command passed
down from the uniform cdrom layer, and it's indeed very handy to see
errors if they occur from there.

Your non-root user still has to be able to open the cdrom.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] remove error message on illegal ioctl
  2002-12-16  9:16 ` Jens Axboe
@ 2002-12-16  9:39   ` Linus Torvalds
  2002-12-16 11:56     ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2002-12-16  9:39 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Robert Love, linux-kernel



On Mon, 16 Dec 2002, Jens Axboe wrote:
>
> Your non-root user still has to be able to open the cdrom.

Why not just make this all use the "quiet" flag, and make the ioctl's
always set it. That's what it's there for.

		Linus


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] remove error message on illegal ioctl
  2002-12-16  9:39   ` Linus Torvalds
@ 2002-12-16 11:56     ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2002-12-16 11:56 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Robert Love, linux-kernel

On Mon, Dec 16 2002, Linus Torvalds wrote:
> 
> 
> On Mon, 16 Dec 2002, Jens Axboe wrote:
> >
> > Your non-root user still has to be able to open the cdrom.
> 
> Why not just make this all use the "quiet" flag, and make the ioctl's
> always set it. That's what it's there for.

Yes that would be fine. I just don't want uniform packets to be silently
dropped, that makes debugging a problem with a drive pretty much
impossible.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-12-16 11:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-14  2:22 [PATCH] remove error message on illegal ioctl Robert Love
2002-12-16  9:16 ` Jens Axboe
2002-12-16  9:39   ` Linus Torvalds
2002-12-16 11:56     ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2002-12-11  5:56 Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox