1. 16 9月, 2011 7 次提交
    • K
      tcm_fc: Invalidation of DDP context for FCoE target in error conditions · 079587b4
      Kiran Patil 提交于
      Problem: HW DDP context wasn;t invalidated in case of ABORTS, etc...
      This leads to the problem where memory pages which are used for DDP
      as user descriptor could get reused for some other purpose (such as to
      satisfy new memory allocation request either by kernel or user mode threads)
      and since HW DDP context was not invalidated, HW continue to write to
      those pages, hence causing memory corruption.
      
      Fix: Either on incoming ABORTS or due to exchange time out, allowed the
      target to cleanup HW DDP context if it was setup for respective ft_cmd.
      Added new function to perform this cleanup, furthur it can be enhanced
      for other cleanup activity.
      
      Additinal Notes: To avoid calling ddp_done from multiple places, composed
      the functionality in helper function "ft_invl_hw_context" and it is being
      called from multiple places. Cleaned up code in function "ft_recv_write_data"
      w.r.t DDP.
      Signed-off-by: NKiran Patil <kiran.patil@intel.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      079587b4
    • R
      target: Fix race between multiple invocations of target_qf_do_work() · bcac364a
      Roland Dreier 提交于
      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: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bcac364a
    • L
      asm alternatives: remove incorrect alignment notes · a7f934d4
      Linus Torvalds 提交于
      On x86-64, they were just wasteful: with the explicitly added (now
      unnecessary) padding, the size of the alternatives structure was 16
      bytes, and an alignment of 8 bytes didn't hurt much.
      
      However, it was still silly, since the natural size and alignment for
      the structure is actually just 12 bytes, 4-byte aligned since commit
      59e97e4d ("x86: Make alternative instruction pointers relative").
      So removing the padding, and removing the extra alignment is just a good
      idea.
      
      On x86-32, the alignment of 4 bytes was correct, but was incorrectly
      hardcoded as 8 bytes in <asm/alternative-asm.h>.  That header file had
      used to be an x86-64 only header file, but various unification efforts
      have made it be used for x86-32 too (ie the unification of rwlock and
      rwsem).
      
      That in turn caused x86-32 boot failures, because the extra alignment
      would result in random zero-filled words in the altinstructions section,
      causing oopses early at boot when doing alternative instruction
      replacement.
      
      So just remove all the alignment noise entirely.  It's wrong, and it's
      unnecessary.  The section itself is already properly aligned by the
      linker scripts, and all additions to the section had better be of the
      proper 12-byte format, keeping it aligned.  So if the align directive
      were to ever make a difference, that would be an indication of a serious
      bug to begin with.
      Reported-by: NWerner Landgraf <w.landgraf@ru.r>
      Acked-by: NAndrew Lutomirski <luto@mit.edu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a7f934d4
    • L
      Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 17d8428e
      Linus Torvalds 提交于
      * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        nfs: Do not allow multiple mounts on same mountpoint when using -o noac
        NFS: Fix a typo in nfs_flush_multi
        NFSv4: renewd needs to be able to handle the NFS4ERR_CB_PATH_DOWN error
        NFSv4: The NFSv4.0 client must send RENEW calls if it holds a delegation
        NFSv4: nfs4_proc_renew should be declared static
        NFSv4: nfs4_proc_async_renew should use a GFP_NOFS allocation
      17d8428e
    • L
      Merge branch 'hwmon-for-linus' of git://github.com/groeck/linux · fa758702
      Linus Torvalds 提交于
      * 'hwmon-for-linus' of git://github.com/groeck/linux:
        hwmon: (coretemp) Initialize tmin
        hwmon: (pmbus) Fix low limit temperature alarms
      fa758702
    • C
      hfsplus: fix filesystem size checks · f1fcd9f0
      Christoph Hellwig 提交于
      generic_check_addressable can't deal with hfsplus's larger than page
      size allocation blocks, so simply opencode the checks that we actually
      need in hfsplus_fill_super.
      Signed-off-by: NChristoph Hellwig <hch@tuxera.com>
      Reported-by: NPavel Ivanov <paivanof@gmail.com>
      Tested-by: NPavel Ivanov <paivanof@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f1fcd9f0
    • S
      hfsplus: Fix kfree of wrong pointers in hfsplus_fill_super() error path · f588c960
      Seth Forshee 提交于
      Commit 6596528e ("hfsplus: ensure bio requests are not smaller than
      the hardware sectors") changed the pointers used for volume header
      allocations but failed to free the correct pointers in the error path
      path of hfsplus_fill_super() and hfsplus_read_wrapper.
      
      The second hunk came from a separate patch by Pavel Ivanov.
      Reported-by: NPavel Ivanov <paivanof@gmail.com>
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NChristoph Hellwig <hch@tuxera.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f588c960
  2. 15 9月, 2011 29 次提交
  3. 14 9月, 2011 4 次提交