Re: [PATCH][next] mm/vmalloc: Fix read of pointer area after it has been free'd

2021-03-30 Thread Dan Carpenter
On Mon, Mar 29, 2021 at 06:14:34PM +0100, Matthew Wilcox wrote: > On Mon, Mar 29, 2021 at 06:07:30PM +0100, Colin King wrote: > > From: Colin Ian King > > > > Currently the memory pointed to by area is being freed by the > > free_vm_area call and then area->nr_pages is referencing the > > free'd

Re: [PATCH][next] mm/vmalloc: Fix read of pointer area after it has been free'd

2021-03-29 Thread Uladzislau Rezki
> On Mon, Mar 29, 2021 at 08:14:53PM +0200, Uladzislau Rezki wrote: > > On Mon, Mar 29, 2021 at 07:40:29PM +0200, Uladzislau Rezki wrote: > > > On Mon, Mar 29, 2021 at 06:14:34PM +0100, Matthew Wilcox wrote: > > > > On Mon, Mar 29, 2021 at 06:07:30PM +0100, Colin King wrote: > > > > > From: Colin

Re: [PATCH][next] mm/vmalloc: Fix read of pointer area after it has been free'd

2021-03-29 Thread Uladzislau Rezki
On Mon, Mar 29, 2021 at 08:14:53PM +0200, Uladzislau Rezki wrote: > On Mon, Mar 29, 2021 at 07:40:29PM +0200, Uladzislau Rezki wrote: > > On Mon, Mar 29, 2021 at 06:14:34PM +0100, Matthew Wilcox wrote: > > > On Mon, Mar 29, 2021 at 06:07:30PM +0100, Colin King wrote: > > > > From: Colin Ian King

Re: [PATCH][next] mm/vmalloc: Fix read of pointer area after it has been free'd

2021-03-29 Thread Uladzislau Rezki
On Mon, Mar 29, 2021 at 07:40:29PM +0200, Uladzislau Rezki wrote: > On Mon, Mar 29, 2021 at 06:14:34PM +0100, Matthew Wilcox wrote: > > On Mon, Mar 29, 2021 at 06:07:30PM +0100, Colin King wrote: > > > From: Colin Ian King > > > > > > Currently the memory pointed to by area is being freed by the

Re: [PATCH][next] mm/vmalloc: Fix read of pointer area after it has been free'd

2021-03-29 Thread Uladzislau Rezki
On Mon, Mar 29, 2021 at 06:14:34PM +0100, Matthew Wilcox wrote: > On Mon, Mar 29, 2021 at 06:07:30PM +0100, Colin King wrote: > > From: Colin Ian King > > > > Currently the memory pointed to by area is being freed by the > > free_vm_area call and then area->nr_pages is referencing the > > free'd

Re: [PATCH][next] mm/vmalloc: Fix read of pointer area after it has been free'd

2021-03-29 Thread Matthew Wilcox
On Mon, Mar 29, 2021 at 06:07:30PM +0100, Colin King wrote: > From: Colin Ian King > > Currently the memory pointed to by area is being freed by the > free_vm_area call and then area->nr_pages is referencing the > free'd object. Fix this swapping the order of the warn_alloc > message and the

[PATCH][next] mm/vmalloc: Fix read of pointer area after it has been free'd

2021-03-29 Thread Colin King
From: Colin Ian King Currently the memory pointed to by area is being freed by the free_vm_area call and then area->nr_pages is referencing the free'd object. Fix this swapping the order of the warn_alloc message and the free. Addresses-Coverity: ("Read from pointer after free") Fixes: