• Bart Van Assche's avatar
    IB/srp: Fix connection state tracking · 329ee6bf
    Bart Van Assche authored
    commit c014c8cd upstream.
    
    Reception of a DREQ message only causes the state of a single
    channel to change. Hence move the 'connected' member variable
    from the target to the channel data structure. This patch
    avoids that following false positive warning can be reported
    by srp_destroy_qp():
    
    WARNING: at drivers/infiniband/ulp/srp/ib_srp.c:617 srp_destroy_qp+0xa6/0x120 [ib_srp]()
    Call Trace:
    [<ffffffff8106e10f>] warn_slowpath_common+0x7f/0xc0
    [<ffffffff8106e16a>] warn_slowpath_null+0x1a/0x20
    [<ffffffffa0440226>] srp_destroy_qp+0xa6/0x120 [ib_srp]
    [<ffffffffa0440322>] srp_free_ch_ib+0x82/0x1e0 [ib_srp]
    [<ffffffffa044408b>] srp_create_target+0x7ab/0x998 [ib_srp]
    [<ffffffff81346f60>] dev_attr_store+0x20/0x30
    [<ffffffff811dd90f>] sysfs_write_file+0xef/0x170
    [<ffffffff8116d248>] vfs_write+0xc8/0x190
    [<ffffffff8116d411>] sys_write+0x51/0x90
    Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
    Cc: Sagi Grimberg <sagig@mellanox.com>
    Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
    329ee6bf
ib_srp.h 7.69 KB