summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 7ef30ef..c881a1a 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -904,8 +904,10 @@ static ssize_t cifs_write(struct file *file, const char *write_data,
if (rc != 0)
break;
}
- if(experimEnabled || (pTcon->ses->server->secMode &
- (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) == 0) {
+ if(experimEnabled || (pTcon->ses->server &&
+ (pTcon->ses->server->secMode &
+ (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)
+ == 0))) {
struct kvec iov[2];
unsigned int len;
OpenPOWER on IntegriCloud