1. 19 1月, 2018 3 次提交
  2. 09 1月, 2018 11 次提交
  3. 04 1月, 2018 2 次提交
  4. 14 11月, 2017 5 次提交
  5. 31 10月, 2017 1 次提交
    • K
      treewide: Fix function prototypes for module_param_call() · e4dca7b7
      Kees Cook 提交于
      Several function prototypes for the set/get functions defined by
      module_param_call() have a slightly wrong argument types. This fixes
      those in an effort to clean up the calls when running under type-enforced
      compiler instrumentation for CFI. This is the result of running the
      following semantic patch:
      
      @match_module_param_call_function@
      declarer name module_param_call;
      identifier _name, _set_func, _get_func;
      expression _arg, _mode;
      @@
      
       module_param_call(_name, _set_func, _get_func, _arg, _mode);
      
      @fix_set_prototype
       depends on match_module_param_call_function@
      identifier match_module_param_call_function._set_func;
      identifier _val, _param;
      type _val_type, _param_type;
      @@
      
       int _set_func(
      -_val_type _val
      +const char * _val
       ,
      -_param_type _param
      +const struct kernel_param * _param
       ) { ... }
      
      @fix_get_prototype
       depends on match_module_param_call_function@
      identifier match_module_param_call_function._get_func;
      identifier _val, _param;
      type _val_type, _param_type;
      @@
      
       int _get_func(
      -_val_type _val
      +char * _val
       ,
      -_param_type _param
      +const struct kernel_param * _param
       ) { ... }
      
      Two additional by-hand changes are included for places where the above
      Coccinelle script didn't notice them:
      
      	drivers/platform/x86/thinkpad_acpi.c
      	fs/lockd/svc.c
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJessica Yu <jeyu@kernel.org>
      e4dca7b7
  6. 18 10月, 2017 4 次提交
  7. 25 8月, 2017 1 次提交
  8. 07 7月, 2017 1 次提交
  9. 08 5月, 2017 2 次提交
    • B
      IB/srpt: Avoid that aborting a command triggers a kernel warning · bd2c52d7
      Bart Van Assche 提交于
      Avoid that the following warning is triggered:
      
      WARNING: CPU: 10 PID: 166 at ../drivers/infiniband/ulp/srpt/ib_srpt.c:2674 srpt_release_cmd+0x139/0x140 [ib_srpt]
      CPU: 10 PID: 166 Comm: kworker/u24:8 Not tainted 4.9.4-1-default #1
      Workqueue: tmr-fileio target_tmr_work [target_core_mod]
      Call Trace:
       [<ffffffffaa3c4f70>] dump_stack+0x63/0x83
       [<ffffffffaa0844eb>] __warn+0xcb/0xf0
       [<ffffffffaa0845dd>] warn_slowpath_null+0x1d/0x20
       [<ffffffffc06ba429>] srpt_release_cmd+0x139/0x140 [ib_srpt]
       [<ffffffffc06e4377>] target_release_cmd_kref+0xb7/0x120 [target_core_mod]
       [<ffffffffc06e4d7f>] target_put_sess_cmd+0x2f/0x60 [target_core_mod]
       [<ffffffffc06e15e0>] core_tmr_lun_reset+0x340/0x790 [target_core_mod]
       [<ffffffffc06e4816>] target_tmr_work+0xe6/0x140 [target_core_mod]
       [<ffffffffaa09e4d3>] process_one_work+0x1f3/0x4d0
       [<ffffffffaa09e7f8>] worker_thread+0x48/0x4e0
       [<ffffffffaa09e7b0>] ? process_one_work+0x4d0/0x4d0
       [<ffffffffaa0a46da>] kthread+0xca/0xe0
       [<ffffffffaa0a4610>] ? kthread_park+0x60/0x60
       [<ffffffffaa71b775>] ret_from_fork+0x25/0x30
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: David Disseldorp <ddiss@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bd2c52d7
    • B
      IB/srpt: Fix abort handling · 55d69427
      Bart Van Assche 提交于
      Let the target core check the CMD_T_ABORTED flag instead of the SRP
      target driver. Hence remove the transport_check_aborted_status()
      call. Since state == SRPT_STATE_CMD_RSP_SENT is something that really
      should not happen, do not try to recover if srpt_queue_response() is
      called for an I/O context that is in that state. This patch is a bug
      fix because the srpt_abort_cmd() call is misplaced - if that function
      is called from srpt_queue_response() it should either be called
      before the command state is changed or after the response has been
      sent.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: David Disseldorp <ddiss@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      55d69427
  10. 02 5月, 2017 1 次提交
  11. 28 1月, 2017 1 次提交
  12. 25 1月, 2017 2 次提交
  13. 15 12月, 2016 1 次提交
  14. 24 9月, 2016 1 次提交
  15. 25 8月, 2016 1 次提交
    • D
      IB/srpt: Update sport->port_guid with each port refresh · 716b076b
      Doug Ledford 提交于
      If port_guid is set with the default subnet_prefix, then we get a change
      event and run a port refresh, we don't update the port_guid.  As a
      result, attempts to create a target device that uses the new
      subnet_prefix in the wwn will fail to find a match and be rejected by
      the ib_srpt driver.  This makes it impossible to configure a port if it
      was initialized with a default subnet_prefix and later changed to any
      non-default subnet-prefix.  Updating the port refresh task to always
      update the wwn based upon the current subnext_prefix solves this
      problem.
      
      Cc: Bart Van Assche <bart.vanassche@sandisk.com>
      Cc: nab@linux-iscsi.org
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      716b076b
  16. 03 8月, 2016 2 次提交
  17. 24 6月, 2016 1 次提交
    • B
      IB/srpt: Reduce QP buffer size · c0cf4512
      Bart Van Assche 提交于
      The memory needed for the send and receive queues associated with
      a QP is proportional to the max_sge parameter. The current value
      of that parameter is such that with an mlx4 HCA the QP buffer size
      is 8 MB. Since DMA is used for communication between HCA and CPU
      that buffer either has to be allocated coherently or map_single()
      must succeed for that buffer. Since large contiguous allocations
      are fragile and since the maximum segment size for e.g. swiotlb
      is 256 KB, reduce the max_sge parameter. This patch avoids that
      the following text appears on the console after SRP logout and
      relogin on a system equipped with multiple IB HCAs:
      
      mlx4_core 0000:05:00.0: swiotlb buffer is full (sz: 8388608 bytes)
      swiotlb: coherent allocation failed for device 0000:05:00.0 size=8388608
      CPU: 11 PID: 148 Comm: kworker/11:1 Not tainted 4.7.0-rc4-dbg+ #1
      Call Trace:
       [<ffffffff812c6d35>] dump_stack+0x67/0x92
       [<ffffffff812efe71>] swiotlb_alloc_coherent+0x141/0x150
       [<ffffffff810458be>] x86_swiotlb_alloc_coherent+0x3e/0x50
       [<ffffffffa03861fa>] mlx4_buf_direct_alloc.isra.5+0x9a/0x120 [mlx4_core]
       [<ffffffffa0386545>] mlx4_buf_alloc+0x165/0x1a0 [mlx4_core]
       [<ffffffffa035053d>] create_qp_common.isra.29+0x57d/0xff0 [mlx4_ib]
       [<ffffffffa03510da>] mlx4_ib_create_qp+0x12a/0x3f0 [mlx4_ib]
       [<ffffffffa031154a>] ib_create_qp+0x3a/0x250 [ib_core]
       [<ffffffffa055dd4b>] srpt_cm_handler+0x4bb/0xcad [ib_srpt]
       [<ffffffffa02c1ab0>] cm_process_work+0x20/0xf0 [ib_cm]
       [<ffffffffa02c3640>] cm_work_handler+0x1ac0/0x2059 [ib_cm]
       [<ffffffff810737ed>] process_one_work+0x19d/0x490
       [<ffffffff81073b29>] worker_thread+0x49/0x490
       [<ffffffff8107a0ea>] kthread+0xea/0x100
       [<ffffffff815b25af>] ret_from_fork+0x1f/0x40
      
      Fixes: b99f8e4d ("IB/srpt: convert to the generic RDMA READ/WRITE API")
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Laurence Oberman <loberman@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      c0cf4512