lkml.org 
[lkml]   [2005]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH/RFC] Futex mmap_sem deadlock
    On Tue, Feb 22, 2005 at 01:30:27PM -0800, Linus Torvalds wrote:
    >
    > We really have this already, and it's called "current->preempt". It
    > handles any lock at all, and doesn't add yet another special case to all
    > the architectures.
    >
    > Just do
    >
    > repeat:
    > down_read(&current->mm->mmap_sem);
    > get_futex_key(...) etc.
    > queue_me(...) etc.
    > inc_preempt_count();
    > ret = get_user(...);
    > dec_preempt_count();

    Perhaps this should be preempt_disable .... preempt_enable.

    Otherwise, a preempt attempt in get_user would not be seen
    until some future preempt_enable was executed.

    Regards,
    Joe
    --
    "Money can buy bandwidth, but latency is forever" -- John Mashey
    -
    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: 2005-03-22 14:10    [W:0.020 / U:32.832 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site