1. 09 11月, 2016 20 次提交
  2. 19 8月, 2016 4 次提交
  3. 14 7月, 2016 1 次提交
    • C
      libfc: sanity check cpu number extracted from xid · fa068832
      Chris Leech 提交于
      In the receive path libfc extracts a cpu number from the ox_id in the
      fiber channel header and uses that to do a per_cpu_ptr conversion.  If,
      for some reason, a frame is received with an invalid ox_id, per_cpu_ptr
      will return an invalid pointer and the libfc receive path will panic the
      system trying to use it.
      
      I'm currently looking at such a case, and I don't yet know why a cpu
      number > nr_cpu_ids is appearing in an exchange id.  But adding a sanity
      check in libfc prevents a system panic, and seems like good idea when
      dealing with frames coming in from the network.
      Signed-off-by: NChris Leech <cleech@redhat.com>
      Acked-by: NJohannes Thumshirn <jth@kernel.org>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      fa068832
  4. 13 7月, 2016 2 次提交
  5. 10 11月, 2015 1 次提交
  6. 13 8月, 2015 3 次提交
    • B
      libfc: Fix fc_fcp_cleanup_each_cmd() · 8f2777f5
      Bart Van Assche 提交于
      Since fc_fcp_cleanup_cmd() can sleep this function must not
      be called while holding a spinlock. This patch avoids that
      fc_fcp_cleanup_each_cmd() triggers the following bug:
      
      BUG: scheduling while atomic: sg_reset/1512/0x00000202
      1 lock held by sg_reset/1512:
       #0:  (&(&fsp->scsi_pkt_lock)->rlock){+.-...}, at: [<ffffffffc0225cd5>] fc_fcp_cleanup_each_cmd.isra.21+0xa5/0x150 [libfc]
      Preemption disabled at:[<ffffffffc0225cd5>] fc_fcp_cleanup_each_cmd.isra.21+0xa5/0x150 [libfc]
      Call Trace:
       [<ffffffff816c612c>] dump_stack+0x4f/0x7b
       [<ffffffff810828bc>] __schedule_bug+0x6c/0xd0
       [<ffffffff816c87aa>] __schedule+0x71a/0xa10
       [<ffffffff816c8ad2>] schedule+0x32/0x80
       [<ffffffffc0217eac>] fc_seq_set_resp+0xac/0x100 [libfc]
       [<ffffffffc0218b11>] fc_exch_done+0x41/0x60 [libfc]
       [<ffffffffc0225cff>] fc_fcp_cleanup_each_cmd.isra.21+0xcf/0x150 [libfc]
       [<ffffffffc0225f43>] fc_eh_device_reset+0x1c3/0x270 [libfc]
       [<ffffffff814a2cc9>] scsi_try_bus_device_reset+0x29/0x60
       [<ffffffff814a3908>] scsi_ioctl_reset+0x258/0x2d0
       [<ffffffff814a2650>] scsi_ioctl+0x150/0x440
       [<ffffffff814b3a9d>] sd_ioctl+0xad/0x120
       [<ffffffff8132f266>] blkdev_ioctl+0x1b6/0x810
       [<ffffffff811da608>] block_ioctl+0x38/0x40
       [<ffffffff811b4e08>] do_vfs_ioctl+0x2f8/0x530
       [<ffffffff811b50c1>] SyS_ioctl+0x81/0xa0
       [<ffffffff816cf8b2>] system_call_fastpath+0x16/0x7a
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      8f2777f5
    • B
      libfc: Fix fc_exch_recv_req() error path · f6979ade
      Bart Van Assche 提交于
      Due to patch "libfc: Do not invoke the response handler after
      fc_exch_done()" (commit ID 7030fd62) the lport_recv() call
      in fc_exch_recv_req() is passed a dangling pointer. Avoid this
      by moving the fc_frame_free() call from fc_invoke_resp() to its
      callers. This patch fixes the following crash:
      
      general protection fault: 0000 [#3] PREEMPT SMP
      RIP: fc_lport_recv_req+0x72/0x280 [libfc]
      Call Trace:
       fc_exch_recv+0x642/0xde0 [libfc]
       fcoe_percpu_receive_thread+0x46a/0x5ed [fcoe]
       kthread+0x10a/0x120
       ret_from_fork+0x42/0x70
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      f6979ade
    • B
      ce83a4ca
  7. 24 11月, 2014 2 次提交
  8. 12 11月, 2014 3 次提交
  9. 30 9月, 2014 1 次提交
  10. 05 9月, 2013 3 次提交