Skip to contentSkip to conversation

Drivers: hv: balloon: don't crash when memory is added in non-sorted order

PATCH Greg KH 2 participants 2 messages Apr 30, 2016 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Greg KH

author
#2 lore raw
Quoted 11 lines · K. Y. Srinivasan

From: Vitaly Kuznetsov <[email protected]>

When we iterate through all HA regions in handle_pg_range() we have an assumption that all these regions are sorted in the list and the 'start_pfn >= has->end_pfn' check is enough to find the proper region. Unfortunately it's not the case with WS2016 where host can hot-add regions in a different order. We end up modifying the wrong HA region and crashing later on pages online. Modify the check to make sure we found the region we were searching for while iterating. Fix the same check in pfn_covered() as well.

Quoted 5 lines
---
 drivers/hv/hv_balloon.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

I only received patch 1/3 here, what happened to the other 2?

Can you resend the whole series?

thanks,

greg k-h

#3 lore raw
Quoted 32 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Saturday, April 30, 2016 2:03 PM
To: KY Srinivasan <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/3] Drivers: hv: balloon: don't crash when memory is added in non-sorted order

Quoted 6 lines · K. Y. Srinivasan

From: Vitaly Kuznetsov <[email protected]>

When we iterate through all HA regions in handle_pg_range() we have an assumption that all these regions are sorted in the list and the 'start_pfn >= has->end_pfn' check is enough to find the proper region. Unfortunately it's not the case with WS2016 where host can hot-add

regions

Quoted 1 line

in a different order. We end up modifying the wrong HA region and

crashing

Quoted 9 lines

later on pages online. Modify the check to make sure we found the region we were searching for while iterating. Fix the same check in pfn_covered() as well.

---
 drivers/hv/hv_balloon.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Quoted 3 lines

I only received patch 1/3 here, what happened to the other 2?

Can you resend the whole series?

Will do.

Thanks,

K. Y

Quoted 4 lines

thanks,

greg k-h