Skip to contentSkip to conversation

cifs: always add credits back for unsolicited PDUs

PATCH In review Ronnie Sahlberg 3 participants 4 messages Jul 5, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: always add credits back for unsolicited PDUs

not just if CONFIG_CIFS_DEBUG2 is enabled.

---
 fs/cifs/connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/connect.c +1 -1
index 8c4121da624e..11adca981263 100644
@@ -1221,11 +1221,11 @@ cifs_demultiplex_thread(void *p)
 					 atomic_read(&midCount));
 				cifs_dump_mem("Received Data is: ", bufs[i],
 					      HEADER_SIZE(server));
+				smb2_add_credits_from_hdr(bufs[i], server);
 #ifdef CONFIG_CIFS_DEBUG2
 				if (server->ops->dump_detail)
 					server->ops->dump_detail(bufs[i],
 								 server);
-				smb2_add_credits_from_hdr(bufs[i], server);
 				cifs_dump_mids(server);
 #endif /* CIFS_DEBUG2 */
 			}
Signature · 1 line
2.13.6
#1 lore raw

Thoughts on stable?

Quoted 28 lines · Ronnie Sahlberg

not just if CONFIG_CIFS_DEBUG2 is enabled.

---
 fs/cifs/connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/connect.c +1 -2
index 8c4121da624e..11adca981263 100644
@@ -1221,11 +1221,11 @@ cifs_demultiplex_thread(void *p)
                                         atomic_read(&midCount));
                                cifs_dump_mem("Received Data is: ", bufs[i],
                                              HEADER_SIZE(server));
+                               smb2_add_credits_from_hdr(bufs[i], server);
 #ifdef CONFIG_CIFS_DEBUG2
                                if (server->ops->dump_detail)
                                        server->ops->dump_detail(bufs[i],
                                                                 server);
-                               smb2_add_credits_from_hdr(bufs[i], server);
                                cifs_dump_mids(server);
 #endif /* CIFS_DEBUG2 */
                        }
--

2.13.6

Signature · 3 lines
Thanks,

Steve
#2 lore raw
Quoted 2 lines · Steve French

Thoughts on stable?

Yeah, maybe. It should be very rare that this would trigger but it could and would lead to a hung connection.

Quoted 36 lines · Ronnie Sahlberg
Quoted 26 lines

not just if CONFIG_CIFS_DEBUG2 is enabled.

---
 fs/cifs/connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/connect.c +1 -2
index 8c4121da624e..11adca981263 100644
@@ -1221,11 +1221,11 @@ cifs_demultiplex_thread(void *p)
                                         atomic_read(&midCount));
                                cifs_dump_mem("Received Data is: ", bufs[i],
                                              HEADER_SIZE(server));
+                               smb2_add_credits_from_hdr(bufs[i], server);
 #ifdef CONFIG_CIFS_DEBUG2
                                if (server->ops->dump_detail)
                                        server->ops->dump_detail(bufs[i],
                                                                 server);
-                               smb2_add_credits_from_hdr(bufs[i], server);
                                cifs_dump_mids(server);
 #endif /* CIFS_DEBUG2 */
                        }
--
Quoted 2 lines

2.13.6

--
Thanks,

Steve

#3 lore raw
In reply to Ronnie Sahlberg

Tentatively merged these two patches into cifs-2.6.git for-next pending testing

Quoted 28 lines · Ronnie Sahlberg

not just if CONFIG_CIFS_DEBUG2 is enabled.

---
 fs/cifs/connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/connect.c +1 -2
index 8c4121da624e..11adca981263 100644
@@ -1221,11 +1221,11 @@ cifs_demultiplex_thread(void *p)
                                         atomic_read(&midCount));
                                cifs_dump_mem("Received Data is: ", bufs[i],
                                              HEADER_SIZE(server));
+                               smb2_add_credits_from_hdr(bufs[i], server);
 #ifdef CONFIG_CIFS_DEBUG2
                                if (server->ops->dump_detail)
                                        server->ops->dump_detail(bufs[i],
                                                                 server);
-                               smb2_add_credits_from_hdr(bufs[i], server);
                                cifs_dump_mids(server);
 #endif /* CIFS_DEBUG2 */
                        }
--

2.13.6

Signature · 3 lines
Thanks,

Steve