Coverity spotted a place where we should have been holding the
channel lock when accessing the ses channel index.
Addresses-Coverity:
1582039 ("Data race condition (MISSING_LOCK)")
Cc: [email protected]
Reviewed-by: Shyam Prasad N <[email protected]>
Signed-off-by: Steve French <[email protected]>
index = (uint)atomic_inc_return(&ses->chan_seq);
index %= ses->chan_count;
}
+
+ server = ses->chans[index].server;
spin_unlock(&ses->chan_lock);
- return ses->chans[index].server;
+ return server;
}
int