1. 03 Aug, 2011 1 commit
    • Kiran Patil's avatar
      tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data · dcd998cc
      Kiran Patil authored
      Problem: HW DDP context was not 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.  Fix ft_recv_write_data() to properly handle
      fc_frame_payload_get to return pointer to payload if it exist. If there is
      no payload which is most common case (+ve case in case if DDP is working
      as expected, it will return NULL. Yes, scope of buf is limited to printk.
      Invalidation of HW context (which is done inside ft_invl_hw_context() is
      necessary in SUCCESS and FAILURE case of DDP. Hence invalidation is DONE
      as long as there was DDP setup (whether it worked correctly or not,
      
      NOTE: For some reason, if there is any error w.r.t DDP such as out of
      order packet reception, HW simply post the full packet in rx queue.
      Signed-off-by: default avatarKiran Patil <kiran.patil@intel.com>
      Cc: Robert W Love <robert.w.love@intel.com>
      Signed-off-by: default avatarNicholas A. Bellinger <nab@linux-iscsi.org>
      dcd998cc
  2. 30 Jul, 2011 1 commit
    • Nicholas Bellinger's avatar
      target: Fix bug for transport_generic_wait_for_tasks with direct operation · dd8ae59d
      Nicholas Bellinger authored
      This patch fixes a bug in transport_handle_cdb_direct() usage with target_core
      where transport_generic_wait_for_tasks() was bypassing active I/O + usage of
      cmd->t_transport_stop_comp because cmd->t_transport_active=1 was not being set
      before dispatching with transport_generic_new_cmd().  The fix follows existing
      usage in transport_generic_handle_cdb*() -> transport_add_cmd_to_queue() and
      set these directly, as well as handle transport_generic_new_cmd() exceptions
      for QUEUE_FULL and CHECK_CONDITION instead of propigating up to RX context
      fabric code.
      
      The bug was manifesting itself with the following SLUB poison overwritten
      warnings with iscsi-target v4.1 LUNs using the new process context direct
      operation during session reinstatement with active I/O exception handling:
      
      [885410.498267] =============================================================================
      [885410.621622] BUG lio_cmd_cache: Poison overwritten
      [885410.621791] -----------------------------------------------------------------------------
      [885410.621792]
      [885410.623420] INFO: 0xffff880000cf3750-0xffff880000cf378d. First byte 0x6a instead of 0x6b
      [885410.626332] INFO: Allocated in iscsit_allocate_cmd+0x1c/0xd4 [iscsi_target_mod] age=345 cpu=1 pid=22554
      [885411.855189] INFO: Freed in iscsit_release_cmd+0x208/0x217 [iscsi_target_mod] age=1410 cpu=1 pid=22554
      [885411.856048] INFO: Slab 0xffffea000002d480 objects=22 used=0 fp=0xffff880000cf7300 flags=0x4080
      [885411.856368] INFO: Object 0xffff880000cf33c0 @offset=13248 fp=0xffff880000cf6780
      
      <SNIP>
      
      [885411.955678] Pid: 22554, comm: iscsi_trx Not tainted 3.0.0-rc7+ #30
      [885411.956040] Call Trace:
      [885411.957029]  [<ffffffff810e5cf9>] print_trailer+0x12e/0x137
      [885412.752879]  [<ffffffff810e61d9>] check_bytes_and_report+0xb9/0xfd
      [885412.754933]  [<ffffffff810e62d2>] check_object+0xb5/0x192
      [885412.755099]  [<ffffffff810e6445>] __free_slab+0x96/0x13a
      [885412.757008]  [<ffffffff810e652a>] discard_slab+0x41/0x43
      [885412.758171]  [<ffffffff810e7a4c>] __slab_free+0xf3/0xfe
      [885412.761027]  [<ffffffffa030a536>] ? iscsit_release_cmd+0x208/0x217 [iscsi_target_mod]
      [885412.761354]  [<ffffffff810e7e95>] kmem_cache_free+0x6f/0xac
      [885412.761536]  [<ffffffffa030a536>] iscsit_release_cmd+0x208/0x217 [iscsi_target_mod]
      [885412.762056]  [<ffffffffa020e467>] ? iblock_free_task+0x34/0x39 [target_core_iblock]
      [885412.762368]  [<ffffffffa0314131>] lio_release_cmd+0x10/0x12 [iscsi_target_mod]
      [885412.764129]  [<ffffffffa02c2254>] transport_release_cmd+0x2f/0x33 [target_core_mod]
      [885412.805024]  [<ffffffffa02c230e>] transport_generic_remove+0xb6/0xc3 [target_core_mod]
      [885412.806424]  [<ffffffff81035b5f>] ? try_to_wake_up+0x1bd/0x1bd
      [885412.809033]  [<ffffffffa02c241f>] transport_generic_free_cmd+0x75/0x7d [target_core_mod]
      [885412.810066]  [<ffffffffa02c2643>] transport_generic_wait_for_tasks+0x21c/0x22b [target_core_mod]
      [885412.811056]  [<ffffffff8139f0b1>] ? mutex_lock+0x11/0x32
      [885412.813059]  [<ffffffff8139f0b1>] ? mutex_lock+0x11/0x32
      [885412.813200]  [<ffffffffa030b81d>] iscsit_close_connection+0x1d5/0x63a [iscsi_target_mod]
      [885412.813517]  [<ffffffffa0300a82>] iscsit_take_action_for_connection_exit+0xdb/0xe0 [iscsi_target_mod]
      [885412.813851]  [<ffffffffa03111e9>] iscsi_target_rx_thread+0x11f6/0x1221 [iscsi_target_mod]
      [885412.829024]  [<ffffffff81033e8d>] ? pick_next_task_fair+0xbe/0x10e
      [885412.831010]  [<ffffffffa030fff3>] ? iscsit_handle_scsi_cmd+0x91d/0x91d [iscsi_target_mod]
      [885412.833011]  [<ffffffffa030fff3>] ? iscsit_handle_scsi_cmd+0x91d/0x91d [iscsi_target_mod]
      [885412.835010]  [<ffffffff8105388a>] kthread+0x7d/0x85
      [885412.837022]  [<ffffffff813a7124>] kernel_thread_helper+0x4/0x10
      [885412.838008]  [<ffffffff8105380d>] ? kthread_worker_fn+0x145/0x145
      [885412.840047]  [<ffffffff813a7120>] ? gs_change+0x13/0x13
      [885412.842007] FIX lio_cmd_cache: Restoring 0xffff880000cf3750-0xffff880000cf378d=0x6
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      dd8ae59d
  3. 28 Jul, 2011 2 commits
    • Randy Dunlap's avatar
      target: iscsi_target depends on NET · d52a10d0
      Randy Dunlap authored
      iscsi target code uses lots on network interface functions, so it
      should depend on NET.  Fixes many build errors when NET is not enabled:
      
      ERROR: "kernel_sendmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "in_aton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "sock_release" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_listen" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_setsockopt" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_recvmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_accept" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "sock_create" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_bind" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "in6_pton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      d52a10d0
    • Nicholas Bellinger's avatar
      target: Fix WRITE_SAME_16 lba assignment breakage · 5db0753b
      Nicholas Bellinger authored
      This patch fixes a bug in WRITE_SAME_16 LBA assignment where get_unaligned_be16()
      is incorrectly being used instead of get_unaligned_be64() for a 64-bit LBA.
      
      This was introduced with:
      
      commit a1d8b49a
      Author: Andy Grover <agrover@redhat.com>
      Date:   Mon May 2 17:12:10 2011 -0700
      
          target: Updates from AGrover and HCH (round 3)
      
          (target: inline struct se_transport_task into struct se_cmd)
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      5db0753b
  4. 27 Jul, 2011 6 commits
  5. 26 Jul, 2011 3 commits
  6. 25 Jul, 2011 3 commits
  7. 23 Jul, 2011 13 commits
  8. 22 Jul, 2011 11 commits
    • Linus Torvalds's avatar
      Merge branch 'timers-rtc-for-linus' of... · 52de84f3
      Linus Torvalds authored
      Merge branch 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86: Serialize EFI time accesses on rtc_lock
        x86: Serialize SMP bootup CMOS accesses on rtc_lock
        rtc: stmp3xxx: Remove UIE handlers
        rtc: stmp3xxx: Get rid of mach-specific accessors
        rtc: stmp3xxx: Initialize drvdata before registering device
        rtc: stmp3xxx: Port stmp-functions to mxs-equivalents
        rtc: stmp3xxx: Restore register definitions
        rtc: vt8500: Use define instead of hardcoded value for status bit
      52de84f3
    • Linus Torvalds's avatar
      Merge branch 'timers-core-for-linus' of... · 112ec469
      Linus Torvalds authored
      Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        time: Fix stupid KERN_WARN compile issue
        rtc: Avoid accumulating time drift in suspend/resume
        time: Avoid accumulating time drift in suspend/resume
        time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime
      112ec469
    • Linus Torvalds's avatar
      Merge branch 'timers-cleanup-for-linus' of... · a99a7d14
      Linus Torvalds authored
      Merge branch 'timers-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'timers-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        mips: Fix i8253 clockevent fallout
        i8253: Cleanup outb/inb magic
        arm: Footbridge: Use common i8253 clockevent
        mips: Use common i8253 clockevent
        x86: Use common i8253 clockevent
        i8253: Create common clockevent implementation
        i8253: Export i8253_lock unconditionally
        pcpskr: MIPS: Make config dependencies finer grained
        pcspkr: Cleanup Kconfig dependencies
        i8253: Move remaining content and delete asm/i8253.h
        i8253: Consolidate definitions of PIT_LATCH
        x86: i8253: Consolidate definitions of global_clock_event
        i8253: Alpha, PowerPC: Remove unused asm/8253pit.h
        alpha: i8253: Cleanup remaining users of i8253pit.h
        i8253: Remove I8253_LOCK config
        i8253: Make pcsp sound driver use the shared i8253_lock
        i8253: Make pcspkr input driver use the shared i8253_lock
        i8253: Consolidate all kernel definitions of i8253_lock
        i8253: Unify all kernel declarations of i8253_lock
        i8253: Create linux/i8253.h and use it in all 8253 related files
      a99a7d14
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of... · bdc7ccfc
      Linus Torvalds authored
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (24 commits)
        sched: Cleanup duplicate local variable in [enqueue|dequeue]_task_fair
        sched: Replace use of entity_key()
        sched: Separate group-scheduling code more clearly
        sched: Reorder root_domain to remove 64 bit alignment padding
        sched: Do not attempt to destroy uninitialized rt_bandwidth
        sched: Remove unused function cpu_cfs_rq()
        sched: Fix (harmless) typo 'CONFG_FAIR_GROUP_SCHED'
        sched, cgroup: Optimize load_balance_fair()
        sched: Don't update shares twice on on_rq parent
        sched: update correct entity's runtime in check_preempt_wakeup()
        xtensa: Use generic config PREEMPT definition
        h8300: Use generic config PREEMPT definition
        m32r: Use generic PREEMPT config
        sched: Skip autogroup when looking for all rt sched groups
        sched: Simplify mutex_spin_on_owner()
        sched: Remove rcu_read_lock() from wake_affine()
        sched: Generalize sleep inside spinlock detection
        sched: Make sleeping inside spinlock detection working in !CONFIG_PREEMPT
        sched: Isolate preempt counting in its own config option
        sched: Remove pointless in_atomic() definition check
        ...
      bdc7ccfc
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of... · 4d4abdcb
      Linus Torvalds authored
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (123 commits)
        perf: Remove the nmi parameter from the oprofile_perf backend
        x86, perf: Make copy_from_user_nmi() a library function
        perf: Remove perf_event_attr::type check
        x86, perf: P4 PMU - Fix typos in comments and style cleanup
        perf tools: Make test use the preset debugfs path
        perf tools: Add automated tests for events parsing
        perf tools: De-opt the parse_events function
        perf script: Fix display of IP address for non-callchain path
        perf tools: Fix endian conversion reading event attr from file header
        perf tools: Add missing 'node' alias to the hw_cache[] array
        perf probe: Support adding probes on offline kernel modules
        perf probe: Add probed module in front of function
        perf probe: Introduce debuginfo to encapsulate dwarf information
        perf-probe: Move dwarf library routines to dwarf-aux.{c, h}
        perf probe: Remove redundant dwarf functions
        perf probe: Move strtailcmp to string.c
        perf probe: Rename DIE_FIND_CB_FOUND to DIE_FIND_CB_END
        tracing/kprobe: Update symbol reference when loading module
        tracing/kprobes: Support module init function probing
        kprobes: Return -ENOENT if probe point doesn't exist
        ...
      4d4abdcb
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of... · 0342cbcf
      Linus Torvalds authored
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        rcu: Fix wrong check in list_splice_init_rcu()
        net,rcu: Convert call_rcu(xt_rateest_free_rcu) to kfree_rcu()
        sysctl,rcu: Convert call_rcu(free_head) to kfree
        vmalloc,rcu: Convert call_rcu(rcu_free_vb) to kfree_rcu()
        vmalloc,rcu: Convert call_rcu(rcu_free_va) to kfree_rcu()
        ipc,rcu: Convert call_rcu(ipc_immediate_free) to kfree_rcu()
        ipc,rcu: Convert call_rcu(free_un) to kfree_rcu()
        security,rcu: Convert call_rcu(sel_netport_free) to kfree_rcu()
        security,rcu: Convert call_rcu(sel_netnode_free) to kfree_rcu()
        ia64,rcu: Convert call_rcu(sn_irq_info_free) to kfree_rcu()
        block,rcu: Convert call_rcu(disk_free_ptbl_rcu_cb) to kfree_rcu()
        scsi,rcu: Convert call_rcu(fc_rport_free_rcu) to kfree_rcu()
        audit_tree,rcu: Convert call_rcu(__put_tree) to kfree_rcu()
        security,rcu: Convert call_rcu(whitelist_item_free) to kfree_rcu()
        md,rcu: Convert call_rcu(free_conf) to kfree_rcu()
      0342cbcf
    • Linus Torvalds's avatar
      Merge branch 'core-printk-for-linus' of... · 391d6276
      Linus Torvalds authored
      Merge branch 'core-printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        lockdep: Fix trace_[soft,hard]irqs_[on,off]() recursion
        printk: Fix console_sem vs logbuf_lock unlock race
        printk: Release console_sem after logbuf_lock
      391d6276
    • Linus Torvalds's avatar
      Merge branch 'core-locking-for-linus' of... · 75b56ec2
      Linus Torvalds authored
      Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        lockdep: Fix lockdep_no_validate against IRQ states
        mutex: Make mutex_destroy() an inline function
        plist: Remove the need to supply locks to plist heads
        lockup detector: Fix reference to the non-existent CONFIG_DETECT_SOFTLOCKUP option
      75b56ec2
    • Konstantin Khlebnikov's avatar
      vfs: use ERR_CAST for err-ptr tossing in lookup_instantiate_filp · 5a9a4364
      Konstantin Khlebnikov authored
      Replace unclear (struct dentry *) to (struct file *) typecast with ERR_CAST() macro.
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      5a9a4364
    • Jan Kara's avatar
      isofs: Remove global fs lock · d769b3c2
      Jan Kara authored
      sbi->s_mutex isn't needed for isofs at all so we can just remove it. Generally,
      since isofs is always mounted read-only, filesystem structure cannot change
      under us.  So buffer_head contents stays constant after it's filled in. That
      leaves us with possible changes of global data structures. Superblock changes
      only during filesystem mount (even remount does not change it), inodes are only
      filled in during reading from disk. So there are no changes of these structures
      to bother about.
      
      Arguments why sbi->s_mutex can be removed at each place:
      isofs_readdir: Accesses sb, inode, filp, local variables => s_mutex not needed
      isofs_lookup: Protected by directory's i_mutex. Accesses sb, inode, dentry,
        local variables => s_mutex not needed
      rock_ridge_symlink_readpage: Protected by page lock. Accesses sb, inode,
        local variables => s_mutex not needed.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      d769b3c2
    • Al Viro's avatar
      jffs2: fix IN_DELETE_SELF on overwriting rename() killing a directory · 22ba747f
      Al Viro authored
      We don't generate IN_DELETE_SELF on victim of overwriting rename() if
      it happens to be a directory.  Trivially fixed by doing to ->i_nlink
      what we do ->pino_nlink a couple of lines later in jffs2_rename().
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      22ba747f