linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] cifs: fix credits leak for SMB1 oplock breaks
@ 2019-04-26  0:32 Ronnie Sahlberg
  2019-04-26  0:32 ` [PATCH] " Ronnie Sahlberg
  2019-04-26 16:35 ` [PATCH 0/1] " Pavel Shilovsky
  0 siblings, 2 replies; 6+ messages in thread
From: Ronnie Sahlberg @ 2019-04-26  0:32 UTC (permalink / raw)
  To: linux-cifs; +Cc: Steve French, Pavel Shilovsky

Pavel, List

Here is an update after the email discussions.
This is minimal patch that adds a new flag to specifically indicate
that there will not be a response to this PDU and thus we can immediately
add the credits back after sending in compound_send_recv()
This flag is only set for SMB1 oplock breaks so this will not affect anything
else.

Additionally, we no longer need to check the CIFS_ASYNC_OP flag in
compound_send_recv() so we can remove that conditional.

This is the smallest patch which fixes the actual smb1 oplock bug thus we should
be able to get it into an rc, and stable.
But we need more but that should wait until the next merge window.


The next steps we should do is:
Remove CIFSSMBNotify() completely and with that also the check for
CIFS_ASYNC_OP in SendReceive()

When that is done, the only thing that CIFS_ASYNC_OP does is make sure
we do not block in wait_for_credits().
Which means we could rename this flag to CIFS_NON_BLOCKING.

We should also rename CIFS_NO_RSP to CIFS_NO_RSP_BUF to make it more clear that
there will be a response status code but there won't be any or we don't care about any response buffer.


Thus the semantics will become:
* cifs_call_async() : if you want async handling of responses
* CIFS_NO_SRV_RSP: There won't be a response so do not wait for a reply. (only used by SMB1 oplocks)
* CIFS_ASYNC_OP/CIFS_NON_BLOCKING: do not block waiting for available credits.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-29 18:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-26  0:32 [PATCH 0/1] cifs: fix credits leak for SMB1 oplock breaks Ronnie Sahlberg
2019-04-26  0:32 ` [PATCH] " Ronnie Sahlberg
2019-04-26 16:38   ` Pavel Shilovsky
2019-04-27  8:08     ` ronnie sahlberg
2019-04-29 18:58       ` Pavel Shilovsky
2019-04-26 16:35 ` [PATCH 0/1] " Pavel Shilovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).