1. 19 5月, 2015 9 次提交
  2. 12 5月, 2015 9 次提交
  3. 06 5月, 2015 11 次提交
  4. 02 5月, 2015 1 次提交
    • I
      rbd: end I/O the entire obj_request on error · 082a75da
      Ilya Dryomov 提交于
      When we end I/O struct request with error, we need to pass
      obj_request->length as @nr_bytes so that the entire obj_request worth
      of bytes is completed.  Otherwise block layer ends up confused and we
      trip on
      
          rbd_assert(more ^ (which == img_request->obj_request_count));
      
      in rbd_img_obj_callback() due to more being true no matter what.  We
      already do it in most cases but we are missing some, in particular
      those where we don't even get a chance to submit any obj_requests, due
      to an early -ENOMEM for example.
      
      A number of obj_request->xferred assignments seem to be redundant but
      I haven't touched any of obj_request->xferred stuff to keep this small
      and isolated.
      
      Cc: Alex Elder <elder@linaro.org>
      Cc: stable@vger.kernel.org # 3.10+
      Reported-by: NShawn Edwards <lesser.evil@gmail.com>
      Reviewed-by: NSage Weil <sage@redhat.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      082a75da
  5. 01 5月, 2015 5 次提交
  6. 30 4月, 2015 5 次提交
    • M
      dm: fix free_rq_clone() NULL pointer when requeueing unmapped request · aa6df8dd
      Mike Snitzer 提交于
      Commit 02233342 ("dm: optimize dm_mq_queue_rq to _not_ use kthread if
      using pure blk-mq") mistakenly removed free_rq_clone()'s clone->q check
      before testing clone->q->mq_ops.  It was an oversight to discontinue
      that check for 1 of the 2 use-cases for free_rq_clone():
      1) free_rq_clone() called when an unmapped original request is requeued
      2) free_rq_clone() called in the request-based IO completion path
      
      The clone->q check made sense for case #1 but not for #2.  However, we
      cannot just reinstate the check as it'd mask a serious bug in the IO
      completion case #2 -- no in-flight request should have an uninitialized
      request_queue (basic block layer refcounting _should_ ensure this).
      
      The NULL pointer seen for case #1 is detailed here:
      https://www.redhat.com/archives/dm-devel/2015-April/msg00160.html
      
      Fix this free_rq_clone() NULL pointer by simply checking if the
      mapped_device's type is DM_TYPE_MQ_REQUEST_BASED (clone's queue is
      blk-mq) rather than checking clone->q->mq_ops.  This avoids the need to
      dereference clone->q, but a WARN_ON_ONCE is added to let us know if an
      uninitialized clone request is being completed.
      Reported-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      aa6df8dd
    • C
      dm: only initialize the request_queue once · 3e6180f0
      Christoph Hellwig 提交于
      Commit bfebd1cd ("dm: add full blk-mq support to request-based DM")
      didn't properly account for the need to short-circuit re-initializing
      DM's blk-mq request_queue if it was already initialized.
      
      Otherwise, reloading a blk-mq request-based DM table (either manually
      or via multipathd) resulted in errors, see:
       https://www.redhat.com/archives/dm-devel/2015-April/msg00132.html
      
      Fix is to only initialize the request_queue on the initial table load
      (when the mapped_device type is assigned).
      
      This is better than having dm_init_request_based_blk_mq_queue() return
      early if the queue was already initialized because it elevates the
      constraint to a more meaningful location in DM core.  As such the
      pre-existing early return in dm_init_request_based_queue() can now be
      removed.
      
      Fixes: bfebd1cd ("dm: add full blk-mq support to request-based DM")
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      3e6180f0
    • H
      cxgb4: Fix MC1 memory offset calculation · 7f0b8a56
      Hariprasad Shenai 提交于
      Commit 6559a7e8 ("cxgb4: Cleanup macros so they follow the same
      style and look consistent") introduced a regression where reading MC1
      memory in adapters where MC0 isn't present or MC0 size is not equal to MC1
      size caused the adapter to crash due to incorrect computation of memoffset.
      Fix is to read the size of MC0 instead of MC1 for offset calculation
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f0b8a56
    • Y
      bnx2x: Delay during kdump load · 12a8541d
      Yuval Mintz 提交于
      In a kdump environment interfaces might be re-loaded without a proper
      unload sequence in the previous running kernel.
      bnx2x management FW and driver maintains a `pulse' that notifies the FW
      that the driver is still up and running.
      
      Driver load on the kdump kernel should be performed only after the pulse
      has been out-of-sync long enough for the management FW to identify that
      the driver has crashed, on which point it will perform some necessary
      cleanup of the HW.
      
      In today's distros kdump loading is quite fast, sometimes too fast for our
      FW to get out-of-sync. This patch delays the bnx2x's probe during kdump
      to allow a proper re-load on the kdump kernel.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12a8541d
    • P
      net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table · e913fb27
      Pai 提交于
      This patch fixes a Kernel Panic in bonding driver debugfs file: rlb_hash_table.
      
      $> modprobe bonding mode=6
      $> cat /sys/kernel/debug/bonding/bond0/rlb_hash_table
      
      This will crash the kernel. The struct alb_bond_info is initialized only when
      the bonding interface is initialized (ip link set bond0 up) and not at the time
      it is allocated. If we try to read the table before that, it'll result in a
      kernel panic.
      
      The patch applies against both net and net-next
      Signed-off-by: NVishwanath Pai <vpai@akamai.com>
      Signed-off-by: NAndy Gospodarek <gospo@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e913fb27