mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
XArray: Fix xas_pause for large multi-index entries
Inspired by the recent Coverity report, I looked for other places where
the offset wasn't being converted to an unsigned long before being
shifted, and I found one in xas_pause() when the entry being paused is
of order >32.
Fixes: b803b42823
("xarray: Add XArray iterators")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: stable@vger.kernel.org
This commit is contained in:
parent
bd40b17ca4
commit
c36d451ad3
2 changed files with 38 additions and 1 deletions
|
@ -970,7 +970,7 @@ void xas_pause(struct xa_state *xas)
|
|||
|
||||
xas->xa_node = XAS_RESTART;
|
||||
if (node) {
|
||||
unsigned int offset = xas->xa_offset;
|
||||
unsigned long offset = xas->xa_offset;
|
||||
while (++offset < XA_CHUNK_SIZE) {
|
||||
if (!xa_is_sibling(xa_entry(xas->xa, node, offset)))
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue