1. 08 2月, 2007 1 次提交
  2. 03 2月, 2007 1 次提交
    • N
      [SCSI] sd: udev accessing an uninitialized scsi_disk field results in a crash · 017f2e37
      Nagendra Singh Tomar 提交于
      	sd_probe() calls class_device_add() even before initializing the
      sdkp->device variable. class_device_add() eventually results in the user mode
      udev program to be called. udev program can read the the allow_restart
      attribute of the newly created scsi device. This is resulting in a crash as
      the show function for allow_restart (i.e sd_show_allow_restart) returns the
      attribute value by reading the sdkp->device->allow_restart variable. As the
      sdkp->device is not initialized before calling the user mode hotplug helper,
      this results in a crash.
      	The patch below solves it by calling class_device_add() only after the
      necessary fields in the scsi_disk structure are initialized properly.
      Signed-off-by: NNagendra Singh Tomar <nagendra_tomar@adaptec.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      017f2e37
  3. 31 1月, 2007 1 次提交
  4. 27 1月, 2007 3 次提交
    • K
      [SCSI] st: A MTIOCTOP/MTWEOF within the early warning will cause the file number to be incorrect · 91614c05
      Kai Makisara 提交于
      On Wed, 24 Jan 2007, Andrew Morton wrote:
      
      > On Mon, 22 Jan 2007 13:07:20 -0800
      > bugme-daemon@bugzilla.kernel.org wrote:
      >
      > > http://bugzilla.kernel.org/show_bug.cgi?id=7864
      > >
      > >            Summary: A MTIOCTOP/MTWEOF within the early warning will cause
      > >                     the file number to be incorrect
      > >     Kernel Version: 2.6.19.2
      > >             Status: NEW
      > >           Severity: low
      > >              Owner: io_scsi@kernel-bugs.osdl.org
      > >          Submitter: ce_reisinger@yahoo.com
      > >
      > >
      > > Write records to a SCSI tape until a write fails with a ENOSPC (you have reached
      > > early warning.
      > > Now perform a:
      > >    struct mtget before, after;
      > >    ioctl(fd, MTIOCGET, &before);
      > >    struct mtop mtop = { MTWEOF, 1 };
      > >    ioctl(fd, MTIOCTOP, &mtop);
      > >    ioctl(fd, MTIOCGET, &after);
      > >
      > > Check the value of mt_fileno in the before and after structures. Notice the
      > > after is 2 greater then the before.
      > >
      > > The problem appears to be in the block of code starting at line 2817 in st.c.
      > > This block is entered because the drive did return a CHECK CONDITION with NO
      > > SENSE and the SENSE_EOM bit set. At lines 2824/5 the fileno is incremented. But
      > > it has already been increased by the number of filemarks requested by the
      > > MTIOCTOP. I believe that the residue count in the sense data should be
      > > subtracted from fileno, not a increment as is done.
      > >
      >
      > Thanks.  Could you please send us a tested patch to fix these things, as
      > per http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt ?
      >
      The analysis is basically correct and explains the bug. According to the
      SCSI standards, the sense code is NO SENSE or RECOVERED ERROR in case
      writing filemark(s) succeeds. If it fails (partly or completely) the sense
      code is VOLUME OVERFLOW. The patch below is tested to fix the case when
      one filemark is successfully written after the EOM early warning. It
      should also fix the case at real EOM but this has not been tested.
      
      Carl, thanks for reporting the bug and providing the analysis for the fix.
      Signed-off-by: NKai Makisara <kai.makisara@kolumbus.fi>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      91614c05
    • D
      [SCSI] qla4xxx: bug fixes · 477ffb9d
      David C Somayajulu 提交于
      The included patch fixes the following issues:
      
      1. qla3xxx/qla4xxx co-existence issue which can result in a lockup
      when qla3xxx driver is unloaded, or when ifdown; ifup is performed on
      one of the interfaces correponding to qla3xxx. This is because qla4xxx
      HBA supports one ethernet and iscsi interfaces per port. Both iscsi
      and ethernet interfaces share the same state machine. The problem has
      to do with synchronizing access to the state machine in the event of a
      reset
      
      2. mutex_lock() is sometimes not followed by mutex_unlock() prior to
      invoking a msleep() in qla4xxx_mailbox_command()
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      477ffb9d
    • M
      [SCSI] Fix scsi_add_device() for async scanning · 938e2ac0
      Matthew Wilcox 提交于
      I had thought that all drivers which didn't call scsi_scan_host()
      called scsi_scan_target().  Some, such as sbp2, mptsas and libata-scsi,
      call scsi_add_device() or __scsi_add_device().  We just need to wait
      for the currently executing async scans to complete first.  This is the
      same code that's in scsi_scan_target(), except that we have to return
      an error instead of void when we're declining to scan at all.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      938e2ac0
  5. 12 1月, 2007 1 次提交
  6. 06 1月, 2007 12 次提交
  7. 04 1月, 2007 14 次提交
  8. 31 12月, 2006 1 次提交
  9. 19 12月, 2006 2 次提交
  10. 18 12月, 2006 1 次提交
  11. 14 12月, 2006 2 次提交
    • R
      [PATCH] getting rid of all casts of k[cmz]alloc() calls · 5cbded58
      Robert P. J. Day 提交于
      Run this:
      
      	#!/bin/sh
      	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
      	  echo "De-casting $f..."
      	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
      	done
      
      And then go through and reinstate those cases where code is casting pointers
      to non-pointers.
      
      And then drop a few hunks which conflicted with outstanding work.
      
      Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Paul Fulghum <paulkf@microgate.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Karsten Keil <kkeil@suse.de>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5cbded58
    • R
      [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() · cd861280
      Robert P. J. Day 提交于
      All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
      equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
      ordering of the first two arguments are fixed.
      Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cd861280
  12. 10 12月, 2006 1 次提交