After taking long time bisecting kernel (3.13 <-> 3.16) it came out that
the following commit (and its dependencies) are the ones that fixes the
issue:

commit b73c3adabdb1e2cb2f2c69bc3cbb9306aa3f9700
Author: Ariel Nahum <ari...@mellanox.com>
Date:   Thu May 22 11:00:18 2014 +0300

    IB/iser: Simplify connection management
    
    iSER relies on refcounting to manage iser connections establishment
    and teardown.
    
    Following commit 39ff05dbbbdb ("IB/iser: Enhance disconnection logic
    for multi-pathing"), iser connection maintain 3 references:
    
     - iscsi_endpoint (at creation stage)
     - cma_id (at connection request stage)
     - iscsi_conn (at bind stage)
    
    We can avoid taking explicit refcounts by correctly serializing iser
    teardown flows (graceful and non-graceful).
    
    Our approach is to trigger a scheduled work to handle ordered teardown
    by gracefully waiting for 2 cleanup stages to complete:
    
     1. Cleanup of live pending tasks indicated by iscsi_conn_stop completion
     2. Flush errors processing
    
    Each completed stage will notify a waiting worker thread when it is
    done to allow teardwon continuation.
    
    Since iSCSI connection establishment may trigger endpoint disconnect
    without a successful endpoint connect, we rely on the iscsi <-> iser
    binding (.conn_bind) to learn about the teardown policy we should take
    wrt cleanup stages.
    
    Since all cleanup worker threads are scheduled (release_wq) in
    .ep_disconnect it is safe to assume that when module_exit is called,
    all cleanup workers are already scheduled. Thus proper module unload
    shall flush all scheduled works before allowing safe exit, to
    guarantee no resources got left behind.
    
    Signed-off-by: Ariel Nahum <ari...@mellanox.com>
    Signed-off-by: Sagi Grimberg <sa...@mellanox.com>
    Reviewed-by: Roi Dayan <r...@mellanox.com>
    Reviewed-by: Or Gerlitz <ogerl...@mellanox.com>
    Signed-off-by: Roland Dreier <rol...@purestorage.com>

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1443648

Title:
  Kernel panics on iSER (iscsi over IB) logouts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1443648/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to