1. 16 Sep, 2011 1 commit
    • Roland Dreier's avatar
      target: Fix race between multiple invocations of target_qf_do_work() · bcac364a
      Roland Dreier authored
      When work is scheduled with schedule_work(), the work can end up
      running on multiple CPUs at the same time -- this happens if
      the work is already running on one CPU and schedule_work() is called
      on another CPU.  This leads to list corruption with target_qf_do_work(),
      which is roughly doing:
      
      	spin_lock(...);
      	list_for_each_entry_safe(...) {
      		list_del(...);
      		spin_unlock(...);
      
      		// do stuff
      
      		spin_lock(...);
      	}
      
      With multiple CPUs running this code, one CPU can end up deleting the
      list entry that the other CPU is about to work on.
      
      Fix this by splicing the list entries onto a local list and then
      operating on that in the work function.  This way, each invocation of
      target_qf_do_work() operates on its own local list and so multiple
      invocations don't corrupt each other's list.  This also avoids dropping
      and reacquiring the lock for each list entry.
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      bcac364a
  2. 15 Sep, 2011 31 commits
  3. 14 Sep, 2011 5 commits
    • Linus Torvalds's avatar
      Merge git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6 · bcd438be
      Linus Torvalds authored
      * git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6: (25 commits)
        [SCSI] bnx2i: Fixed the endian on TTT for NOP out transmission
        [SCSI] libfc: fix referencing to fc_fcp_pkt from the frame pointer via fr_fsp()
        [SCSI] libfc: block SCSI eh thread for blocked rports
        [SCSI] libfc: fix fc_eh_host_reset
        [SCSI] fcoe: Fix deadlock between fip's recv_work and rtnl
        [SCSI] qla2xxx: Update version number to 8.03.07.07-k.
        [SCSI] qla2xxx: Set the task attributes after memsetting fcp cmnd.
        [SCSI] qla2xxx: Correct inadvertent loop state transitions during port-update handling.
        [SCSI] qla2xxx: Save and restore irq in the response queue interrupt handler.
        [SCSI] qla2xxx: Double check for command completion if abort mailbox command fails.
        [SCSI] qla2xxx: Acquire hardware lock while manipulating dsd list.
        [SCSI] qla2xxx: Fix qla24xx revision check while enabling interrupts.
        [SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.
        [SCSI] qla2xxx: T10 DIF - Handle uninitalized sectors.
        [SCSI] hpsa: fix physical device lun and target numbering problem
        [SCSI] hpsa: fix problem that OBDR devices are not detected
        [SCSI] isci: add version number
        [SCSI] isci: fix event-get pointer increment
        [SCSI] isci: dynamic interrupt coalescing
        [SCSI] isci: Leave requests alone if already terminating.
        ...
      bcd438be
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs · 53d872e9
      Linus Torvalds authored
      * 'for-linus' of git://oss.sgi.com/xfs/xfs:
        xfs: fix a use after free in xfs_end_io_direct_write
      53d872e9
    • Al Viro's avatar
      restore pinning the victim dentry in vfs_rmdir()/vfs_rename_dir() · 1d2ef590
      Al Viro authored
      We used to get the victim pinned by dentry_unhash() prior to commit
      64252c75 ("vfs: remove dget() from dentry_unhash()") and ->rmdir()
      and ->rename() instances relied on that; most of them don't care, but
      ones that used d_delete() themselves do.  As the result, we are getting
      rmdir() oopses on NFS now.
      
      Just grab the reference before locking the victim and drop it explicitly
      after unlocking, same as vfs_rename_other() does.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Tested-by: default avatarSimon Kirby <sim@hostway.ca>
      Cc: stable@kernel.org (3.0.x)
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1d2ef590
    • Christoph Hellwig's avatar
      xfs: fix a use after free in xfs_end_io_direct_write · 2d2422ae
      Christoph Hellwig authored
      There is a window in which the ioend that we call inode_dio_wake on
      in xfs_end_io_direct_write is already free.  Fix this by storing
      the inode pointer in a local variable.
      
      This is a fix for the regression introduced in 3.1-rc by
      "fs: move inode_dio_done to the end_io handler".
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
      2d2422ae
    • Jean Delvare's avatar
      hwmon: (coretemp) Initialize tmin · cd5bd3df
      Jean Delvare authored
      ttarget is initialized when the driver is loaded, but tmin is not.
      As a result, tempX_max_hyst attributes read 0. Fix this.
      
      Also use THERM_*_THRESHOLD* constants in these initializations instead
      of hard-coding the constants.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: "R, Durgadoss" <durgadoss.r@intel.com>
      Cc: Guenter Roeck <guenter.roeck@ericsson.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      cd5bd3df
  4. 13 Sep, 2011 3 commits