* [PATCH] trivial coverity cleanup from multichannel series
@ 2021-11-16 3:05 Steve French
2021-11-16 15:28 ` Paulo Alcantara
0 siblings, 1 reply; 4+ messages in thread
From: Steve French @ 2021-11-16 3:05 UTC (permalink / raw)
To: CIFS; +Cc: Shyam Prasad N, Paulo Alcantara
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
Coverity complains about printks inside of spinlocks - move the
cifs_debug print call in cifs_try_adding_channels outside of the
spinlock. See attached patch.
c
--
Thanks,
Steve
[-- Attachment #2: 0001-cifs-move-debug-print-out-of-spinlock.patch --]
[-- Type: text/x-patch, Size: 1107 bytes --]
From 95305b4141ece91e77691860b70cdf4d28537a7f Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Mon, 15 Nov 2021 21:00:08 -0600
Subject: [PATCH] cifs: move debug print out of spinlock
It is better to print debug messages outside of the chan_lock
spinlock where possible.
CC: Shyam Prasad N <sprasad@microsoft.com>
Addresses-Coverity: 1493854 ("Thread deadlock")
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/cifs/sess.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 2c10b186ed6e..7db8b22edac9 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -95,9 +95,9 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
}
if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
- cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
ses->chan_max = 1;
spin_unlock(&ses->chan_lock);
+ cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
return 0;
}
spin_unlock(&ses->chan_lock);
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] trivial coverity cleanup from multichannel series
2021-11-16 3:05 [PATCH] trivial coverity cleanup from multichannel series Steve French
@ 2021-11-16 15:28 ` Paulo Alcantara
2021-11-16 16:42 ` Shyam Prasad N
0 siblings, 1 reply; 4+ messages in thread
From: Paulo Alcantara @ 2021-11-16 15:28 UTC (permalink / raw)
To: Steve French, CIFS; +Cc: Shyam Prasad N
Looks good,
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trivial coverity cleanup from multichannel series
2021-11-16 15:28 ` Paulo Alcantara
@ 2021-11-16 16:42 ` Shyam Prasad N
2021-11-16 16:44 ` Steve French
0 siblings, 1 reply; 4+ messages in thread
From: Shyam Prasad N @ 2021-11-16 16:42 UTC (permalink / raw)
To: Paulo Alcantara; +Cc: Steve French, CIFS
On Tue, Nov 16, 2021 at 8:59 PM Paulo Alcantara <pc@cjr.nz> wrote:
>
> Looks good,
>
> Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Looks good.
But is this the only such occurrence?
--
Regards,
Shyam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trivial coverity cleanup from multichannel series
2021-11-16 16:42 ` Shyam Prasad N
@ 2021-11-16 16:44 ` Steve French
0 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2021-11-16 16:44 UTC (permalink / raw)
To: Shyam Prasad N; +Cc: Paulo Alcantara, CIFS
There may be others, I have fixed a few, and I am not convinced it is
illegal (just presumably better to printk outside of spinlocks, due to
the nesting concern, if reasonably possible) - in some cases we have
ignored it.
On Tue, Nov 16, 2021 at 10:42 AM Shyam Prasad N <nspmangalore@gmail.com> wrote:
>
> On Tue, Nov 16, 2021 at 8:59 PM Paulo Alcantara <pc@cjr.nz> wrote:
> >
> > Looks good,
> >
> > Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
>
>
> Looks good.
> But is this the only such occurrence?
> --
> Regards,
> Shyam
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-16 16:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-16 3:05 [PATCH] trivial coverity cleanup from multichannel series Steve French
2021-11-16 15:28 ` Paulo Alcantara
2021-11-16 16:42 ` Shyam Prasad N
2021-11-16 16:44 ` Steve French
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.