r2400 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches patches/series

maximilian attems maks-guest@costa.debian.org
Mon, 24 Jan 2005 17:57:08 +0100


Author: maks-guest
Date: 2005-01-24 17:57:07 +0100 (Mon, 24 Jan 2005)
New Revision: 2400

Added:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-cmd-warned.dpatch
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-permit.dpatch
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-quiet.dpatch
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-remove-dup.dpatch
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-14
Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
Log:
add the scsi-ioctl backports


Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2005-01-24 16:54:05 UTC (rev 2399)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2005-01-24 16:57:07 UTC (rev 2400)
@@ -1,3 +1,12 @@
+kernel-source-2.6.8 (2.6.8-14) UNRELEASED; urgency=low
+
+  * Backport more scsi-ioctl fixes: add CMD_WARNED,  remove dulicate 
+    safe_for_read(READ_BUFFER), add LOG_SENSE as read-ok and 
+    LOG_SELECT as write-ok, quieten scsi ioctl when asking for 
+    a lot of memory and failing. (Maximilian Attems)
+
+ -- 
+
 kernel-source-2.6.8 (2.6.8-13) unstable; urgency=high
 
   * add more USB card reader blacklist entries.  Patch from Fedora via

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-cmd-warned.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-cmd-warned.dpatch	2005-01-24 16:54:05 UTC (rev 2399)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-cmd-warned.dpatch	2005-01-24 16:57:07 UTC (rev 2400)
@@ -0,0 +1,57 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: warn once for unknown SCSI command
+## DP: Patch author: Jens Axboe <axboe@suse.de>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/14 18:26:43-08:00 axboe@suse.de 
+#   [PATCH] warn once for unknown SCSI command
+#   
+#   Warn once for each unknown command sent through SG_IO or the old SCSI
+#   command ioctl.
+#   
+#   Signed-off-by: Jens Axboe <axboe@suse.de>
+#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+# 
+# drivers/block/scsi_ioctl.c
+#   2004/11/11 08:46:30-08:00 axboe@suse.de +7 -1
+#   warn once for unknown SCSI command
+# 
+diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
+--- a/drivers/block/scsi_ioctl.c	2005-01-24 07:45:12 -08:00
++++ b/drivers/block/scsi_ioctl.c	2005-01-24 07:45:12 -08:00
+@@ -107,12 +107,13 @@
+ 
+ #define CMD_READ_SAFE	0x01
+ #define CMD_WRITE_SAFE	0x02
++#define CMD_WARNED	0x04
+ #define safe_for_read(cmd)	[cmd] = CMD_READ_SAFE
+ #define safe_for_write(cmd)	[cmd] = CMD_WRITE_SAFE
+ 
+ static int verify_command(struct file *file, unsigned char *cmd)
+ {
+-	static const unsigned char cmd_type[256] = {
++	static unsigned char cmd_type[256] = {
+ 
+ 		/* Basic read-only commands */
+ 		safe_for_read(TEST_UNIT_READY),
+@@ -197,8 +197,10 @@
+ 			return 0;
+	}
+
+-	if (!type)
++	if (!type) {
++		cmd_type[cmd[0]] = CMD_WARNED;
+		printk(KERN_WARNING "scsi: unknown opcode 0x%02x\n", cmd[0]);
++ 	}
+ 
+ 	/* And root can do any command.. */
+	if (capable(CAP_SYS_RAWIO))

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-permit.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-permit.dpatch	2005-01-24 16:54:05 UTC (rev 2399)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-permit.dpatch	2005-01-24 16:57:07 UTC (rev 2400)
@@ -0,0 +1,48 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Permit LOG_SENSE and LOG_SELECT in SG_IO command table
+## DP: Patch author: Daniel Drake <dsd@gentoo.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/19 15:00:58-08:00 dsd@gentoo.org 
+#   [PATCH] Permit LOG_SENSE and LOG_SELECT in SG_IO command table
+#   
+#   This patch adds LOG_SENSE as a read-ok command.  cdrecord-prodvd uses this.
+#    I also added LOG_SELECT as write-ok as this seems to fit in as well.
+#   
+#   Signed-off-by: Daniel Drake <dsd@gentoo.org>
+#   Acked-by: Jens Axboe <axboe@suse.de>
+#   Signed-off-by: Andrew Morton <akpm@osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+# 
+# drivers/block/scsi_ioctl.c
+#   2004/11/18 23:03:15-08:00 dsd@gentoo.org +2 -0
+#   Permit LOG_SENSE and LOG_SELECT in SG_IO command table
+# 
+diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
+--- a/drivers/block/scsi_ioctl.c	2005-01-24 07:45:05 -08:00
++++ b/drivers/block/scsi_ioctl.c	2005-01-24 07:45:05 -08:00
+@@ -127,6 +127,7 @@
+ 		safe_for_read(INQUIRY),
+ 		safe_for_read(MODE_SENSE),
+ 		safe_for_read(MODE_SENSE_10),
++		safe_for_read(LOG_SENSE),
+ 		safe_for_read(START_STOP),
+ 		safe_for_read(GPCMD_VERIFY_10),
+ 		safe_for_read(VERIFY_16),
+@@ -169,6 +170,7 @@
+ 		safe_for_write(ERASE),
+ 		safe_for_write(GPCMD_MODE_SELECT_10),
+ 		safe_for_write(MODE_SELECT),
++		safe_for_write(LOG_SELECT),
+ 		safe_for_write(GPCMD_BLANK),
+ 		safe_for_write(GPCMD_CLOSE_TRACK),
+ 		safe_for_write(GPCMD_FLUSH_CACHE),

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-quiet.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-quiet.dpatch	2005-01-24 16:54:05 UTC (rev 2399)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-quiet.dpatch	2005-01-24 16:57:07 UTC (rev 2400)
@@ -0,0 +1,41 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: quiet scsi ioctls warnings
+## DP: Patch author: Arjan van de Ven <arjanv@redhat.com>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/12/26 22:20:44-08:00 alan@lxorguk.ukuu.org.uk 
+#   [PATCH] quiet scsi ioctls warnings
+#   
+#   SCSI ioctls can ask for a lot of memory and fail. We don't need to vomit
+#   in the log file for this case. Again taken from the Red Hat minor
+#   patches applied for FC3.
+#   
+#   Original-patch: Arjan van de Ven <arjanv@redhat.com>
+#   Signed-off-by: Alan Cox <alan@redhat.com>
+#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+# 
+# drivers/block/scsi_ioctl.c
+#   2004/12/26 09:27:51-08:00 alan@lxorguk.ukuu.org.uk +1 -1
+#   quiet scsi ioctls warnings
+# 
+diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
+--- a/drivers/block/scsi_ioctl.c	2005-01-24 07:45:00 -08:00
++++ b/drivers/block/scsi_ioctl.c	2005-01-24 07:45:00 -08:00
+@@ -357,7 +357,7 @@
+ 
+ 	bytes = max(in_len, out_len);
+ 	if (bytes) {
+-		buffer = kmalloc(bytes, q->bounce_gfp | GFP_USER);
++		buffer = kmalloc(bytes, q->bounce_gfp | GFP_USER| __GFP_NOWARN);
+ 		if (!buffer)
+ 			return -ENOMEM;
+ 

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-remove-dup.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-remove-dup.dpatch	2005-01-24 16:54:05 UTC (rev 2399)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/scsi-ioctl-remove-dup.dpatch	2005-01-24 16:57:07 UTC (rev 2400)
@@ -0,0 +1,37 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description:  Remove duplicate safe_for_read(READ_BUFFER) entry
+## DP: Patch author: Miles Bader <miles@gnu.org>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/11/15 20:12:51-08:00 miles@gnu.org 
+#   [PATCH] Remove duplicate safe_for_read(READ_BUFFER) entry in scsi_ioctl.c
+#   
+#   Signed-off-by: Miles Bader <miles@gnu.org>
+#   Cc: James Bottomley <James.Bottomley@steeleye.com>
+#   Signed-off-by: Andrew Morton <akpm@osdl.org>
+#   Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+# 
+# drivers/block/scsi_ioctl.c
+#   2004/11/15 19:29:30-08:00 miles@gnu.org +0 -1
+#   Remove duplicate safe_for_read(READ_BUFFER) entry in scsi_ioctl.c
+# 
+diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
+--- a/drivers/block/scsi_ioctl.c	2005-01-24 07:45:10 -08:00
++++ b/drivers/block/scsi_ioctl.c	2005-01-24 07:45:10 -08:00
+@@ -130,7 +130,6 @@
+ 		safe_for_read(START_STOP),
+ 		safe_for_read(GPCMD_VERIFY_10),
+ 		safe_for_read(VERIFY_16),
+-		safe_for_read(READ_BUFFER),
+ 
+ 		/* Audio CD commands */
+ 		safe_for_read(GPCMD_PLAY_CD),

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-14
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-14	2005-01-24 16:54:05 UTC (rev 2399)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-14	2005-01-24 16:57:07 UTC (rev 2400)
@@ -0,0 +1,4 @@
++ scsi-ioctl-cmd-warned.dpatch
++ scsi-ioctl-remove-dup.dpatch
++ scsi-ioctl-permit.dpatch
++ scsi-ioctl-quiet.dpatch