[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-sh
Subject: Re: [PATCH -mm 1/1] ptrace: PTRACE_GETFDPIC: fix the unsafe usage
From: Oleg Nesterov <oleg () redhat ! com>
Date: 2010-05-26 12:40:06
Message-ID: 20100526124006.GA28358 () redhat ! com
[Download RAW message or body]
On 05/25, Mike Frysinger wrote:
>
> On Tue, May 25, 2010 at 06:23, Oleg Nesterov wrote:
> > - arch/blackfin/kernel/ptrace.c:is_user_addr_valid()
> > needs mmap_sem around find_vma()
> >
> > The lockless access to mm->context.sram_list doesn't look
> > safe to me.
> >
> > If we add get_task_mm() - this protects us against
> > destroy_context() only. What is the tracee's sub-thread
> > does sys_sram_alloc() or sys_sram_free() in parallel?
>
> i dont believe there are any code paths in UP systems where this would
> be a practical problem because sram_list is only updated by syscalls
> from userspace.
Yes sure, UP && !PREEMPT is safe.
> we probably should add proper locking to this
> structure though.
Agreed. I'll try to make the trivial patch tomorrow. I think we
can just use mm->mmap_sem, is_user_addr_valid() needs this lock
for find_vma() anyway.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic