cifs: Make sure all data pages are signed correctly

Check if every data page is signed correctly in sigining helper.

Signed-off-by: Paulo Alcantara <palcantara@suse.de>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
Paulo Alcantara 2018-06-23 14:52:25 -03:00 коммит произвёл Steve French
Родитель 256b4c3f03
Коммит a12d0c590c
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -83,7 +83,13 @@ int __cifs_calc_signature(struct smb_rqst *rqst,
kaddr = (char *) kmap(rqst->rq_pages[i]) + offset;
crypto_shash_update(shash, kaddr, len);
rc = crypto_shash_update(shash, kaddr, len);
if (rc) {
cifs_dbg(VFS, "%s: Could not update with payload\n",
__func__);
kunmap(rqst->rq_pages[i]);
return rc;
}
kunmap(rqst->rq_pages[i]);
}