aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDan Carpenter2021-09-21 23:33:35 +0300
committerSteve French2021-09-21 20:51:50 -0500
commite946d3c887a9dc33aa82a349c6284f4a084163f4 (patch)
tree733ed2ab3f3d856302b7aef5b1ff0557b0e5b2b3 /Makefile
parentfdf5078458793fca9e9c0fb5e58a1a970ca0fdef (diff)
cifs: fix a sign extension bug
The problem is the mismatched types between "ctx->total_len" which is an unsigned int, "rc" which is an int, and "ctx->rc" which is a ssize_t. The code does: ctx->rc = (rc == 0) ? ctx->total_len : rc; We want "ctx->rc" to store the negative "rc" error code. But what happens is that "rc" is type promoted to a high unsigned int and 'ctx->rc" will store the high positive value instead of a negative value. The fix is to change "rc" from an int to a ssize_t. Fixes: c610c4b619e5 ("CIFS: Add asynchronous write support through kernel AIO") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions