Skip to content
  • Bart Van Assche's avatar
    IB/srp: Fix connection state tracking · c014c8cd
    Bart Van Assche authored
    
    
    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>
    Cc: <stable@vger.kernel.org> #v3.19
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    c014c8cd