Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-23 Thread Takashi Iwai
Takashi Iwai > Sent: Thursday, July 19, 2018 5:11 PM > To: Zhang, Jun > Cc: He, Bo ; alsa-de...@alsa-project.org; pe...@perex.cz; > linux-kernel@vger.kernel.org; Zhang, Yanmin > Subject: Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred > > On Thu, 19 Jul

Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-23 Thread Takashi Iwai
Takashi Iwai > Sent: Thursday, July 19, 2018 5:11 PM > To: Zhang, Jun > Cc: He, Bo ; alsa-de...@alsa-project.org; pe...@perex.cz; > linux-kernel@vger.kernel.org; Zhang, Yanmin > Subject: Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred > > On Thu, 19 Jul

RE: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-22 Thread He, Bo
@vger.kernel.org; Zhang, Yanmin Subject: Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred On Thu, 19 Jul 2018 08:42:14 +0200, Takashi Iwai wrote: > > On Thu, 19 Jul 2018 08:08:06 +0200, > Zhang, Jun wrote: > > > > Hello, Takashi > > >

RE: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-22 Thread He, Bo
@vger.kernel.org; Zhang, Yanmin Subject: Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred On Thu, 19 Jul 2018 08:42:14 +0200, Takashi Iwai wrote: > > On Thu, 19 Jul 2018 08:08:06 +0200, > Zhang, Jun wrote: > > > > Hello, Takashi > > >

Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-19 Thread Takashi Iwai
On Thu, 19 Jul 2018 08:42:14 +0200, Takashi Iwai wrote: > > On Thu, 19 Jul 2018 08:08:06 +0200, > Zhang, Jun wrote: > > > > Hello, Takashi > > > > I think use our patch, it's NOT possible that the returned size is over > > sgbuf->tblsize. > > > > In function snd_malloc_sgbuf_pages, > > > >

Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-19 Thread Takashi Iwai
On Thu, 19 Jul 2018 08:42:14 +0200, Takashi Iwai wrote: > > On Thu, 19 Jul 2018 08:08:06 +0200, > Zhang, Jun wrote: > > > > Hello, Takashi > > > > I think use our patch, it's NOT possible that the returned size is over > > sgbuf->tblsize. > > > > In function snd_malloc_sgbuf_pages, > > > >

Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-19 Thread Takashi Iwai
On Thu, 19 Jul 2018 08:08:06 +0200, Zhang, Jun wrote: > > Hello, Takashi > > I think use our patch, it's NOT possible that the returned size is over > sgbuf->tblsize. > > In function snd_malloc_sgbuf_pages, > > Pages is align page, > sgbuf->tblsize is align 32*page, > chunk is align

Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-19 Thread Takashi Iwai
On Thu, 19 Jul 2018 08:08:06 +0200, Zhang, Jun wrote: > > Hello, Takashi > > I think use our patch, it's NOT possible that the returned size is over > sgbuf->tblsize. > > In function snd_malloc_sgbuf_pages, > > Pages is align page, > sgbuf->tblsize is align 32*page, > chunk is align

RE: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-19 Thread Zhang, Jun
.@suse.de] Sent: Wednesday, July 18, 2018 20:34 To: He, Bo Cc: alsa-de...@alsa-project.org; pe...@perex.cz; linux-kernel@vger.kernel.org; Zhang, Jun ; Zhang, Yanmin Subject: Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred On Wed, 18 Jul 2018 13:52:45 +0200, He, Bo wrote: &g

RE: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-19 Thread Zhang, Jun
.@suse.de] Sent: Wednesday, July 18, 2018 20:34 To: He, Bo Cc: alsa-de...@alsa-project.org; pe...@perex.cz; linux-kernel@vger.kernel.org; Zhang, Jun ; Zhang, Yanmin Subject: Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred On Wed, 18 Jul 2018 13:52:45 +0200, He, Bo wrote: &g

RE: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-18 Thread He, Bo
: Wednesday, July 18, 2018 8:34 PM To: He, Bo Cc: alsa-de...@alsa-project.org; pe...@perex.cz; linux-kernel@vger.kernel.org; Zhang, Jun ; Zhang, Yanmin Subject: Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred On Wed, 18 Jul 2018 13:52:45 +0200, He, Bo wrote: > > we see the

RE: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-18 Thread He, Bo
: Wednesday, July 18, 2018 8:34 PM To: He, Bo Cc: alsa-de...@alsa-project.org; pe...@perex.cz; linux-kernel@vger.kernel.org; Zhang, Jun ; Zhang, Yanmin Subject: Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred On Wed, 18 Jul 2018 13:52:45 +0200, He, Bo wrote: > > we see the

Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-18 Thread Takashi Iwai
On Wed, 18 Jul 2018 13:52:45 +0200, He, Bo wrote: > > we see the below kernel panic on stress suspend resume test in > snd_malloc_sgbuf_pages(), snd_dma_alloc_pages_fallback() alloc > chunk maybe larger than the left pages due to the pages alignment, > which will cause the pages overflow. > >

Re: [PATCH] ALSA: core: fix unsigned int pages overflow when comapred

2018-07-18 Thread Takashi Iwai
On Wed, 18 Jul 2018 13:52:45 +0200, He, Bo wrote: > > we see the below kernel panic on stress suspend resume test in > snd_malloc_sgbuf_pages(), snd_dma_alloc_pages_fallback() alloc > chunk maybe larger than the left pages due to the pages alignment, > which will cause the pages overflow. > >