sk->sk_data_ready() of sctp socket can be called from both BH and non-BH
contexts, but ksocklnd version of sk_data_ready, ksocknal_data_ready()
does not handle the BH case. Change how ksnd_global_lock is taken in
this case.
Test-Parameters: trivial testlist=sanity-lnet
Test-Parameters: testgroup=review-ldiskfs-arm testlist=sanity-lnet
Change-Id: I07fade0da4cdfe095edc7a17e4f65012d6f92942
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48715
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
/* interleave correctly with closing sockets... */
LASSERT(!in_irq());
/* interleave correctly with closing sockets... */
LASSERT(!in_irq());
- read_lock(&ksocknal_data.ksnd_global_lock);
+ read_lock_bh(&ksocknal_data.ksnd_global_lock);
conn = sk->sk_user_data;
if (conn == NULL) { /* raced with ksocknal_terminate_conn */
conn = sk->sk_user_data;
if (conn == NULL) { /* raced with ksocknal_terminate_conn */
} else
ksocknal_read_callback(conn);
} else
ksocknal_read_callback(conn);
- read_unlock(&ksocknal_data.ksnd_global_lock);
+ read_unlock_bh(&ksocknal_data.ksnd_global_lock);