Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Baolin Wang
On 30 May 2018 at 23:41, Matthew Wilcox wrote: > On Wed, May 30, 2018 at 08:13:27AM -0700, Matthew Wilcox wrote: >> On Wed, May 30, 2018 at 08:14:09PM +0800, Baolin Wang wrote: >> > On 30 May 2018 at 20:01, Matthew Wilcox wrote: >> > > On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote:

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Baolin Wang
On 30 May 2018 at 23:41, Matthew Wilcox wrote: > On Wed, May 30, 2018 at 08:13:27AM -0700, Matthew Wilcox wrote: >> On Wed, May 30, 2018 at 08:14:09PM +0800, Baolin Wang wrote: >> > On 30 May 2018 at 20:01, Matthew Wilcox wrote: >> > > On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote:

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Matthew Wilcox
On Wed, May 30, 2018 at 08:13:27AM -0700, Matthew Wilcox wrote: > On Wed, May 30, 2018 at 08:14:09PM +0800, Baolin Wang wrote: > > On 30 May 2018 at 20:01, Matthew Wilcox wrote: > > > On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote: > > >> It will be crash if we pass one NULL name

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Matthew Wilcox
On Wed, May 30, 2018 at 08:13:27AM -0700, Matthew Wilcox wrote: > On Wed, May 30, 2018 at 08:14:09PM +0800, Baolin Wang wrote: > > On 30 May 2018 at 20:01, Matthew Wilcox wrote: > > > On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote: > > >> It will be crash if we pass one NULL name

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Matthew Wilcox
On Wed, May 30, 2018 at 08:14:09PM +0800, Baolin Wang wrote: > On 30 May 2018 at 20:01, Matthew Wilcox wrote: > > On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote: > >> It will be crash if we pass one NULL name when creating one dma pool, > >> so we should check the passing name when

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Matthew Wilcox
On Wed, May 30, 2018 at 08:14:09PM +0800, Baolin Wang wrote: > On 30 May 2018 at 20:01, Matthew Wilcox wrote: > > On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote: > >> It will be crash if we pass one NULL name when creating one dma pool, > >> so we should check the passing name when

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Baolin Wang
On 30 May 2018 at 20:01, Matthew Wilcox wrote: > On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote: >> It will be crash if we pass one NULL name when creating one dma pool, >> so we should check the passing name when copy it to dma pool. > > NAK. Crashing is the appropriate thing to

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Baolin Wang
On 30 May 2018 at 20:01, Matthew Wilcox wrote: > On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote: >> It will be crash if we pass one NULL name when creating one dma pool, >> so we should check the passing name when copy it to dma pool. > > NAK. Crashing is the appropriate thing to

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Matthew Wilcox
On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote: > It will be crash if we pass one NULL name when creating one dma pool, > so we should check the passing name when copy it to dma pool. NAK. Crashing is the appropriate thing to do. Fix the caller to not pass NULL. If you permit NULL

Re: [PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Matthew Wilcox
On Wed, May 30, 2018 at 07:28:43PM +0800, Baolin Wang wrote: > It will be crash if we pass one NULL name when creating one dma pool, > so we should check the passing name when copy it to dma pool. NAK. Crashing is the appropriate thing to do. Fix the caller to not pass NULL. If you permit NULL

[PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Baolin Wang
It will be crash if we pass one NULL name when creating one dma pool, so we should check the passing name when copy it to dma pool. Moreover this patch replaces kmalloc_node() with kzalloc_node() to make sure the name array of dma pool is initialized in case the passing name is NULL.

[PATCH] mm: dmapool: Check the dma pool name

2018-05-30 Thread Baolin Wang
It will be crash if we pass one NULL name when creating one dma pool, so we should check the passing name when copy it to dma pool. Moreover this patch replaces kmalloc_node() with kzalloc_node() to make sure the name array of dma pool is initialized in case the passing name is NULL.