summaryrefslogtreecommitdiff
path: root/scripts/bpf_helpers_doc.py
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2021-07-23 18:35:15 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-04 12:47:56 +0200
commit52e9158959d287b68e8fed9fd2f03d6c850263d4 (patch)
tree93b2900c165be9e6afbdcd273b462831bb80f54f /scripts/bpf_helpers_doc.py
parent19f60bf08ee3734f78b3cd5eb0b4b53acb553d6b (diff)
SMB3: fix readpage for large swap cache
commit f2a26a3cff27dfa456fef386fe5df56dcb4b47b6 upstream. readpage was calculating the offset of the page incorrectly for the case of large swapcaches. loff_t offset = (loff_t)page->index << PAGE_SHIFT; As pointed out by Matthew Wilcox, this needs to use page_file_offset() to calculate the offset instead. Pages coming from the swap cache have page->index set to their index within the swapcache, not within the backing file. For a sufficiently large swapcache, we could have overlapping values of page->index within the same backing file. Suggested by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: <stable@vger.kernel.org> # v5.7+ Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions