lkml.org 
[lkml]   [2006]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm] swsusp: support creating bigger images
Hugh Dickins wrote:

>On Tue, 9 May 2006, Rafael J. Wysocki wrote:
>
>>On Tuesday 09 May 2006 09:33, Andrew Morton wrote:
>>
>>
>>>task_struct.mm can sometimes be NULL. This function assumes that it will
>>>never be NULL. That makes it a somewhat risky interface. Are we sure it
>>>can never be NULL?
>>>
>>Well, now it's only called for task == current, but I can add a check.
>>
>
>Better fold it into the (renamed and recommented) page_to_copy,
>applying only to current.
>
>The "use" of page_table_lock there is totally bogus. Normally you
>need down_read(&current->mm->mmap_sem) to walk that vma chain; but
>I'm guessing you have everything sufficiently frozen here that you
>don't need that.
>

I have to admit that I suggested making this change, because the
function was sufficently generic looking. I guess the mm == NULL
case should logically return 0... unless you did that, making
page_mapped_by_task use current still leaves the burden of ensuring
->mm != NULL on the caller.

But I don't much mind which way the consensus goes.

---

Send instant messages to your online friends http://au.messenger.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-10 05:53    [W:0.178 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site