Looks good Thanks Meetakshi On Thu, Apr 25, 2024 at 10:14 PM Steve French <smfrench@xxxxxxxxx> wrote: > > 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: stable@xxxxxxxxxxxxxxx > Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> > --- > fs/smb/client/transport.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/smb/client/transport.c b/fs/smb/client/transport.c > index 443b4b89431d..fc0ddc75abc9 100644 > --- a/fs/smb/client/transport.c > +++ b/fs/smb/client/transport.c > @@ -1059,9 +1059,11 @@ struct TCP_Server_Info > *cifs_pick_channel(struct cifs_ses *ses) > 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; > } > > -- > Thanks, > > Steve