]> git.karo-electronics.de Git - linux-beck.git/commitdiff
scsi: Do not display buffer pointers in scsi_log_send()
authorHannes Reinecke <hare@suse.de>
Thu, 8 Jan 2015 06:43:49 +0000 (07:43 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 9 Jan 2015 14:44:32 +0000 (15:44 +0100)
scsi_log_send() would display buffer pointer for higher logging levels.
This is not only of questionable value but also exposes kernel pointer to
userspace, which is discouraged in some setups. So drop this message
altogether.

Tested-by: Robert Elliott <elliott@hp.com>
Reviewed-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/scsi.c

index 7f028cb1d099e21e37faeacf6f8622b4ffffb8b3..08c90a711556f4261fb1639b489afd766e24eeb2 100644 (file)
@@ -531,7 +531,7 @@ void scsi_log_send(struct scsi_cmnd *cmd)
         *
         * 3: same as 2
         *
-        * 4: same as 3 plus dump extra junk
+        * 4: same as 3
         */
        if (unlikely(scsi_logging_level)) {
                level = SCSI_LOG_LEVEL(SCSI_LOG_MLQUEUE_SHIFT,
@@ -540,13 +540,6 @@ void scsi_log_send(struct scsi_cmnd *cmd)
                        scmd_printk(KERN_INFO, cmd,
                                    "Send: scmd 0x%p\n", cmd);
                        scsi_print_command(cmd);
-                       if (level > 3) {
-                               printk(KERN_INFO "buffer = 0x%p, bufflen = %d,"
-                                      " queuecommand 0x%p\n",
-                                       scsi_sglist(cmd), scsi_bufflen(cmd),
-                                       cmd->device->host->hostt->queuecommand);
-
-                       }
                }
        }
 }