CIFS: Pass page offset for calculating signature
When calculating signature for the packet, it needs to read into the correct page offset for the data. Signed-off-by: Long Li <longli@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
7cf20bce77
commit
4c0d2a5a64
|
@ -66,11 +66,12 @@ int __cifs_calc_signature(struct smb_rqst *rqst,
|
||||||
|
|
||||||
/* now hash over the rq_pages array */
|
/* now hash over the rq_pages array */
|
||||||
for (i = 0; i < rqst->rq_npages; i++) {
|
for (i = 0; i < rqst->rq_npages; i++) {
|
||||||
void *kaddr = kmap(rqst->rq_pages[i]);
|
void *kaddr;
|
||||||
size_t len = rqst->rq_pagesz;
|
unsigned int len, offset;
|
||||||
|
|
||||||
if (i == rqst->rq_npages - 1)
|
rqst_page_get_length(rqst, i, &len, &offset);
|
||||||
len = rqst->rq_tailsz;
|
|
||||||
|
kaddr = (char *) kmap(rqst->rq_pages[i]) + offset;
|
||||||
|
|
||||||
crypto_shash_update(shash, kaddr, len);
|
crypto_shash_update(shash, kaddr, len);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue