Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-02 Thread Shi, Yang
On 6/1/2016 10:00 PM, Minchan Kim wrote: On Wed, Jun 01, 2016 at 01:40:48PM -0700, Shi, Yang wrote: On 5/29/2016 11:11 PM, Minchan Kim wrote: On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: If we goes this way, how to guarantee this race? Thanks for pointing out this. It

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-02 Thread Shi, Yang
On 6/1/2016 10:00 PM, Minchan Kim wrote: On Wed, Jun 01, 2016 at 01:40:48PM -0700, Shi, Yang wrote: On 5/29/2016 11:11 PM, Minchan Kim wrote: On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: If we goes this way, how to guarantee this race? Thanks for pointing out this. It

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-01 Thread Minchan Kim
On Wed, Jun 01, 2016 at 01:40:48PM -0700, Shi, Yang wrote: > On 5/29/2016 11:11 PM, Minchan Kim wrote: > >On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: > > > > > > > >>> > >>>If we goes this way, how to guarantee this race? > >> > >>Thanks for pointing out this. It sounds reasonable.

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-01 Thread Minchan Kim
On Wed, Jun 01, 2016 at 01:40:48PM -0700, Shi, Yang wrote: > On 5/29/2016 11:11 PM, Minchan Kim wrote: > >On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: > > > > > > > >>> > >>>If we goes this way, how to guarantee this race? > >> > >>Thanks for pointing out this. It sounds reasonable.

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-01 Thread Shi, Yang
On 5/29/2016 11:08 PM, Minchan Kim wrote: On Mon, May 30, 2016 at 02:39:06PM +0900, Joonsoo Kim wrote: On Fri, May 27, 2016 at 05:11:08PM +0900, Minchan Kim wrote: On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: On

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-01 Thread Shi, Yang
On 5/29/2016 11:08 PM, Minchan Kim wrote: On Mon, May 30, 2016 at 02:39:06PM +0900, Joonsoo Kim wrote: On Fri, May 27, 2016 at 05:11:08PM +0900, Minchan Kim wrote: On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: On

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-01 Thread Shi, Yang
On 5/29/2016 11:11 PM, Minchan Kim wrote: On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: If we goes this way, how to guarantee this race? Thanks for pointing out this. It sounds reasonable. However, this should be only possible to happen on 32 bit since just 32 bit version

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-01 Thread Shi, Yang
On 5/29/2016 11:11 PM, Minchan Kim wrote: On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: If we goes this way, how to guarantee this race? Thanks for pointing out this. It sounds reasonable. However, this should be only possible to happen on 32 bit since just 32 bit version

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-30 Thread Minchan Kim
On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: > Per the discussion with Joonsoo Kim [1], we need check the return value of > lookup_page_ext() for all call sites since it might return NULL in some cases, > although it is unlikely, i.e. memory hotplug. > > Tested with ltp with

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-30 Thread Minchan Kim
On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: > Per the discussion with Joonsoo Kim [1], we need check the return value of > lookup_page_ext() for all call sites since it might return NULL in some cases, > although it is unlikely, i.e. memory hotplug. > > Tested with ltp with

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-30 Thread Minchan Kim
On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: > > > >If we goes this way, how to guarantee this race? > > Thanks for pointing out this. It sounds reasonable. However, this > should be only possible to happen on 32 bit since just 32 bit > version page_is_idle() calls

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-30 Thread Minchan Kim
On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: > > > >If we goes this way, how to guarantee this race? > > Thanks for pointing out this. It sounds reasonable. However, this > should be only possible to happen on 32 bit since just 32 bit > version page_is_idle() calls

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-30 Thread Minchan Kim
On Mon, May 30, 2016 at 02:39:06PM +0900, Joonsoo Kim wrote: > On Fri, May 27, 2016 at 05:11:08PM +0900, Minchan Kim wrote: > > On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: > > > On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: > > > > On Thu, May 26, 2016 at 04:15:28PM

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-30 Thread Minchan Kim
On Mon, May 30, 2016 at 02:39:06PM +0900, Joonsoo Kim wrote: > On Fri, May 27, 2016 at 05:11:08PM +0900, Minchan Kim wrote: > > On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: > > > On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: > > > > On Thu, May 26, 2016 at 04:15:28PM

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-29 Thread Joonsoo Kim
On Fri, May 27, 2016 at 05:11:08PM +0900, Minchan Kim wrote: > On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: > > On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: > > > On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: > > > > On 5/25/2016 5:37 PM, Minchan Kim

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-29 Thread Joonsoo Kim
On Fri, May 27, 2016 at 05:11:08PM +0900, Minchan Kim wrote: > On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: > > On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: > > > On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: > > > > On 5/25/2016 5:37 PM, Minchan Kim

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Andrew Morton
On Fri, 27 May 2016 13:17:19 -0700 "Shi, Yang" wrote: > >> Actually, I think the #ifdef should be removed if lookup_page_ext() is > >> possible to return NULL. It sounds not make sense returning NULL only > >> when DEBUG_VM is enabled. It should return NULL no matter what

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Andrew Morton
On Fri, 27 May 2016 13:17:19 -0700 "Shi, Yang" wrote: > >> Actually, I think the #ifdef should be removed if lookup_page_ext() is > >> possible to return NULL. It sounds not make sense returning NULL only > >> when DEBUG_VM is enabled. It should return NULL no matter what debug > >> config is

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Shi, Yang
On 5/27/2016 1:02 PM, Andrew Morton wrote: On Thu, 26 May 2016 16:15:28 -0700 "Shi, Yang" wrote: I hope we consider this direction, too. Yang, Could you think about this? Thanks a lot for the suggestion. Sorry for the late reply, I was busy on preparing patches. I do

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Shi, Yang
On 5/27/2016 1:02 PM, Andrew Morton wrote: On Thu, 26 May 2016 16:15:28 -0700 "Shi, Yang" wrote: I hope we consider this direction, too. Yang, Could you think about this? Thanks a lot for the suggestion. Sorry for the late reply, I was busy on preparing patches. I do agree this is a

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Andrew Morton
On Thu, 26 May 2016 16:15:28 -0700 "Shi, Yang" wrote: > >> > >> I hope we consider this direction, too. > > > > Yang, Could you think about this? > > Thanks a lot for the suggestion. Sorry for the late reply, I was busy on > preparing patches. I do agree this is a

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Andrew Morton
On Thu, 26 May 2016 16:15:28 -0700 "Shi, Yang" wrote: > >> > >> I hope we consider this direction, too. > > > > Yang, Could you think about this? > > Thanks a lot for the suggestion. Sorry for the late reply, I was busy on > preparing patches. I do agree this is a direction we should look

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Shi, Yang
On 5/27/2016 1:11 AM, Minchan Kim wrote: On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: On 5/25/2016 5:37 PM, Minchan Kim wrote: On Tue, May 24, 2016 at

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Shi, Yang
On 5/27/2016 1:11 AM, Minchan Kim wrote: On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: On 5/25/2016 5:37 PM, Minchan Kim wrote: On Tue, May 24, 2016 at

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Minchan Kim
On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: > On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: > > On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: > > > On 5/25/2016 5:37 PM, Minchan Kim wrote: > > > >On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Minchan Kim
On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: > On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: > > On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: > > > On 5/25/2016 5:37 PM, Minchan Kim wrote: > > > >On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Joonsoo Kim
On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: > On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: > > On 5/25/2016 5:37 PM, Minchan Kim wrote: > > >On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: > > >>On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: >

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Joonsoo Kim
On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: > On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: > > On 5/25/2016 5:37 PM, Minchan Kim wrote: > > >On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: > > >>On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: >

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-26 Thread Minchan Kim
On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: > On 5/25/2016 5:37 PM, Minchan Kim wrote: > >On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: > >>On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: > >>>Per the discussion with Joonsoo Kim [1], we need check the return

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-26 Thread Minchan Kim
On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: > On 5/25/2016 5:37 PM, Minchan Kim wrote: > >On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: > >>On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: > >>>Per the discussion with Joonsoo Kim [1], we need check the return

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-26 Thread Shi, Yang
On 5/25/2016 5:37 PM, Minchan Kim wrote: On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: Per the discussion with Joonsoo Kim [1], we need check the return value of lookup_page_ext() for all call sites since it might return

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-26 Thread Shi, Yang
On 5/25/2016 5:37 PM, Minchan Kim wrote: On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: Per the discussion with Joonsoo Kim [1], we need check the return value of lookup_page_ext() for all call sites since it might return

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-25 Thread Minchan Kim
On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: > On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: > > Per the discussion with Joonsoo Kim [1], we need check the return value of > > lookup_page_ext() for all call sites since it might return NULL in some > > cases, > >

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-25 Thread Minchan Kim
On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: > On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: > > Per the discussion with Joonsoo Kim [1], we need check the return value of > > lookup_page_ext() for all call sites since it might return NULL in some > > cases, > >

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-25 Thread shakil
On 5/23/2016 10:16 AM, Yang Shi wrote: Per the discussion with Joonsoo Kim [1], we need check the return value of lookup_page_ext() for all call sites since it might return NULL in some cases, although it is unlikely, i.e. memory hotplug. Tested with ltp with "page_owner=0". [1]

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-25 Thread shakil
On 5/23/2016 10:16 AM, Yang Shi wrote: Per the discussion with Joonsoo Kim [1], we need check the return value of lookup_page_ext() for all call sites since it might return NULL in some cases, although it is unlikely, i.e. memory hotplug. Tested with ltp with "page_owner=0". [1]

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-23 Thread Minchan Kim
On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: > Per the discussion with Joonsoo Kim [1], we need check the return value of > lookup_page_ext() for all call sites since it might return NULL in some cases, > although it is unlikely, i.e. memory hotplug. > > Tested with ltp with

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-23 Thread Minchan Kim
On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: > Per the discussion with Joonsoo Kim [1], we need check the return value of > lookup_page_ext() for all call sites since it might return NULL in some cases, > although it is unlikely, i.e. memory hotplug. > > Tested with ltp with

[PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-23 Thread Yang Shi
Per the discussion with Joonsoo Kim [1], we need check the return value of lookup_page_ext() for all call sites since it might return NULL in some cases, although it is unlikely, i.e. memory hotplug. Tested with ltp with "page_owner=0". [1]

[PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-23 Thread Yang Shi
Per the discussion with Joonsoo Kim [1], we need check the return value of lookup_page_ext() for all call sites since it might return NULL in some cases, although it is unlikely, i.e. memory hotplug. Tested with ltp with "page_owner=0". [1]