Skip to content

Commit

Permalink
afs: unmapping the wrong buffer
Browse files Browse the repository at this point in the history
We switched from kmap_atomic() to kmap() so the kunmap() calls need to
be updated to match.

Fixes: d001648 ('rxrpc: Don't expose skbs to in-kernel users [ver #2]')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David Howells <[email protected]>
  • Loading branch information
Dan Carpenter authored and dhowells committed Oct 13, 2016
1 parent 6d3a4c4 commit 233c9ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/afs/fsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
buffer = kmap(page);
ret = afs_extract_data(call, buffer,
call->count, true);
kunmap(buffer);
kunmap(page);
if (ret < 0)
return ret;
}
Expand Down Expand Up @@ -397,7 +397,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
page = call->reply3;
buffer = kmap(page);
memset(buffer + call->count, 0, PAGE_SIZE - call->count);
kunmap(buffer);
kunmap(page);
}

_leave(" = 0 [done]");
Expand Down

0 comments on commit 233c9ed

Please sign in to comment.