mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
Merge tag 'nfsd-6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fixes from Chuck Lever: "A set of NFSD fixes that arrived just a bit late for the 6.19 merge window. Regression fixes: - Mark variable __maybe_unused to avoid W=1 build break Stable fixes: - NFSv4 file creation neglects setting ACL - Clear TIME_DELEG in the suppattr_exclcreat bitmap - Clear SECLABEL in the suppattr_exclcreat bitmap - Fix memory leak in nfsd_create_serv error paths - Bound check rq_pages index in inline path - Return 0 on success from svc_rdma_copy_inline_range - Use rc_pageoff for memcpy byte offset - Avoid NULL deref on zero length gss_token in gss_read_proxy_verf" * tag 'nfsd-6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: NFSv4 file creation neglects setting ACL NFSD: Clear TIME_DELEG in the suppattr_exclcreat bitmap NFSD: Clear SECLABEL in the suppattr_exclcreat bitmap nfsd: fix memory leak in nfsd_create_serv error paths nfsd: Mark variable __maybe_unused to avoid W=1 build break svcrdma: bound check rq_pages index in inline path svcrdma: return 0 on success from svc_rdma_copy_inline_range svcrdma: use rc_pageoff for memcpy byte offset SUNRPC: svcauth_gss: avoid NULL deref on zero length gss_token in gss_read_proxy_verf
This commit is contained in:
@@ -1083,7 +1083,8 @@ static int gss_read_proxy_verf(struct svc_rqst *rqstp,
|
||||
}
|
||||
|
||||
length = min_t(unsigned int, inlen, (char *)xdr->end - (char *)xdr->p);
|
||||
memcpy(page_address(in_token->pages[0]), xdr->p, length);
|
||||
if (length)
|
||||
memcpy(page_address(in_token->pages[0]), xdr->p, length);
|
||||
inlen -= length;
|
||||
|
||||
to_offs = length;
|
||||
|
||||
@@ -841,6 +841,9 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp,
|
||||
for (page_no = 0; page_no < numpages; page_no++) {
|
||||
unsigned int page_len;
|
||||
|
||||
if (head->rc_curpage >= rqstp->rq_maxpages)
|
||||
return -EINVAL;
|
||||
|
||||
page_len = min_t(unsigned int, remaining,
|
||||
PAGE_SIZE - head->rc_pageoff);
|
||||
|
||||
@@ -848,7 +851,7 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp,
|
||||
head->rc_page_count++;
|
||||
|
||||
dst = page_address(rqstp->rq_pages[head->rc_curpage]);
|
||||
memcpy(dst + head->rc_curpage, src + offset, page_len);
|
||||
memcpy((unsigned char *)dst + head->rc_pageoff, src + offset, page_len);
|
||||
|
||||
head->rc_readbytes += page_len;
|
||||
head->rc_pageoff += page_len;
|
||||
@@ -860,7 +863,7 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp,
|
||||
offset += page_len;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user