From a3713ec3d775ff9da2e46f6652b23ff598c3ed36 Mon Sep 17 00:00:00 2001 From: Roberto Bergantinos Corpas Date: Fri, 3 Jul 2020 11:29:32 +0200 Subject: cifs`: handle ERRBaduid for SMB1 If server returns ERRBaduid but does not reset transport connection, we'll keep sending command with a non-valid UID for the server as long as transport is healthy, without actually recovering. This have been observed on the field. This patch adds ERRBaduid handling so that we set CifsNeedReconnect. map_and_check_smb_error() can be modified to extend use cases. Signed-off-by: Roberto Bergantinos Corpas Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg --- fs/cifs/cifsproto.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/cifs/cifsproto.h') diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 7a836ec0438e..ed13be38a265 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -154,6 +154,7 @@ extern int decode_negTokenInit(unsigned char *security_blob, int length, extern int cifs_convert_address(struct sockaddr *dst, const char *src, int len); extern void cifs_set_port(struct sockaddr *addr, const unsigned short int port); extern int map_smb_to_linux_error(char *buf, bool logErr); +extern int map_and_check_smb_error(struct mid_q_entry *mid, bool logErr); extern void header_assemble(struct smb_hdr *, char /* command */ , const struct cifs_tcon *, int /* length of fixed section (word count) in two byte units */); -- cgit v1.2.3