Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-31 Thread Alistair Popple
On Thursday, 1 April 2021 3:56:05 PM AEDT Muchun Song wrote: > External email: Use caution opening links or attachments > > > On Fri, Mar 26, 2021 at 9:22 AM Alistair Popple wrote: > > > > request_free_mem_region() is used to find an empty range of physical > > addresses for hotplugging

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-31 Thread Muchun Song
On Fri, Mar 26, 2021 at 9:22 AM Alistair Popple wrote: > > request_free_mem_region() is used to find an empty range of physical > addresses for hotplugging ZONE_DEVICE memory. It does this by iterating > over the range of possible addresses using region_intersects() to see if > the range is free.

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-31 Thread David Hildenbrand
On 31.03.21 08:19, Alistair Popple wrote: On Tuesday, 30 March 2021 8:13:32 PM AEDT David Hildenbrand wrote: External email: Use caution opening links or attachments On 29.03.21 03:37, Alistair Popple wrote: On Friday, 26 March 2021 7:57:51 PM AEDT David Hildenbrand wrote: On 26.03.21

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-31 Thread Alistair Popple
On Tuesday, 30 March 2021 8:13:32 PM AEDT David Hildenbrand wrote: > External email: Use caution opening links or attachments > > > On 29.03.21 03:37, Alistair Popple wrote: > > On Friday, 26 March 2021 7:57:51 PM AEDT David Hildenbrand wrote: > >> On 26.03.21 02:20, Alistair Popple wrote: > >>>

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-30 Thread David Hildenbrand
On 29.03.21 03:37, Alistair Popple wrote: On Friday, 26 March 2021 7:57:51 PM AEDT David Hildenbrand wrote: On 26.03.21 02:20, Alistair Popple wrote: request_free_mem_region() is used to find an empty range of physical addresses for hotplugging ZONE_DEVICE memory. It does this by iterating

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-29 Thread David Hildenbrand
On 29.03.21 03:37, Alistair Popple wrote: On Friday, 26 March 2021 7:57:51 PM AEDT David Hildenbrand wrote: On 26.03.21 02:20, Alistair Popple wrote: request_free_mem_region() is used to find an empty range of physical addresses for hotplugging ZONE_DEVICE memory. It does this by iterating

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-28 Thread Balbir Singh
On Mon, Mar 29, 2021 at 12:55:15PM +1100, Alistair Popple wrote: > On Friday, 26 March 2021 4:15:36 PM AEDT Balbir Singh wrote: > > On Fri, Mar 26, 2021 at 12:20:35PM +1100, Alistair Popple wrote: > > > +static int __region_intersects(resource_size_t start, size_t size, > > > +

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-28 Thread Alistair Popple
On Friday, 26 March 2021 4:15:36 PM AEDT Balbir Singh wrote: > On Fri, Mar 26, 2021 at 12:20:35PM +1100, Alistair Popple wrote: > > +static int __region_intersects(resource_size_t start, size_t size, > > +unsigned long flags, unsigned long desc) > > +{ > > + struct

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-28 Thread Alistair Popple
On Friday, 26 March 2021 7:57:51 PM AEDT David Hildenbrand wrote: > On 26.03.21 02:20, Alistair Popple wrote: > > request_free_mem_region() is used to find an empty range of physical > > addresses for hotplugging ZONE_DEVICE memory. It does this by iterating > > over the range of possible

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-26 Thread David Hildenbrand
On 26.03.21 02:20, Alistair Popple wrote: request_free_mem_region() is used to find an empty range of physical addresses for hotplugging ZONE_DEVICE memory. It does this by iterating over the range of possible addresses using region_intersects() to see if the range is free. Just a high-level

Re: [PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-25 Thread Balbir Singh
On Fri, Mar 26, 2021 at 12:20:35PM +1100, Alistair Popple wrote: > request_free_mem_region() is used to find an empty range of physical > addresses for hotplugging ZONE_DEVICE memory. It does this by iterating > over the range of possible addresses using region_intersects() to see if > the range

[PATCH v2] kernel/resource: Fix locking in request_free_mem_region

2021-03-25 Thread Alistair Popple
request_free_mem_region() is used to find an empty range of physical addresses for hotplugging ZONE_DEVICE memory. It does this by iterating over the range of possible addresses using region_intersects() to see if the range is free. region_intersects() obtains a read lock before walking the