Skip to content

Commit 94a1f56

Browse files
committed
Merge tag '6.2-rc8-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6
Pull cifx fix from Steve French: "Small fix for use after free" * tag '6.2-rc8-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix use-after-free in rdata->read_into_pages()
2 parents 0983f6b + aa5465a commit 94a1f56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/cifs/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3889,7 +3889,7 @@ uncached_fill_pages(struct TCP_Server_Info *server,
38893889
rdata->got_bytes += result;
38903890
}
38913891

3892-
return rdata->got_bytes > 0 && result != -ECONNABORTED ?
3892+
return result != -ECONNABORTED && rdata->got_bytes > 0 ?
38933893
rdata->got_bytes : result;
38943894
}
38953895

@@ -4665,7 +4665,7 @@ readpages_fill_pages(struct TCP_Server_Info *server,
46654665
rdata->got_bytes += result;
46664666
}
46674667

4668-
return rdata->got_bytes > 0 && result != -ECONNABORTED ?
4668+
return result != -ECONNABORTED && rdata->got_bytes > 0 ?
46694669
rdata->got_bytes : result;
46704670
}
46714671

0 commit comments

Comments
 (0)