Commit b9811b0a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: HvCall_writeLogBuffer called with too large of a buffer

From: Anton Blanchard <anton@samba.org>

HvCall_writeLogBuffer called with too large of a buffer
parent 821e6ef6
...@@ -90,7 +90,7 @@ void HvCall_writeLogBuffer(const void *buffer, u64 bufLen) ...@@ -90,7 +90,7 @@ void HvCall_writeLogBuffer(const void *buffer, u64 bufLen)
struct HvLpBufferList bufList; struct HvLpBufferList bufList;
u64 bytesLeft = bufLen; u64 bytesLeft = bufLen;
u64 leftThisPage; u64 leftThisPage;
u64 curPtr = virt_to_absolute( (unsigned long) buffer ); u64 curPtr = virt_to_absolute((unsigned long) buffer);
while (bytesLeft) { while (bytesLeft) {
bufList.addr = curPtr; bufList.addr = curPtr;
...@@ -105,11 +105,11 @@ void HvCall_writeLogBuffer(const void *buffer, u64 bufLen) ...@@ -105,11 +105,11 @@ void HvCall_writeLogBuffer(const void *buffer, u64 bufLen)
bytesLeft -= leftThisPage; bytesLeft -= leftThisPage;
} }
curPtr = (curPtr & PAGE_MASK) + PAGE_SIZE;
}
HvCall2(HvCallBaseWriteLogBuffer, HvCall2(HvCallBaseWriteLogBuffer,
virt_to_absolute((unsigned long)&bufList), bufLen); virt_to_absolute((unsigned long) &bufList),
bufList.len);
curPtr = (curPtr & PAGE_MASK) + PAGE_SIZE;
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment