[lkml]   [2005]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 6/11] s390: in_interrupt vs. in_atomic.
    > > The condition for no context in do_exception checks for hard and
    > > soft interrupts by using in_interrupt() but not for preemption.
    > > This is bad for the users of __copy_from/to_user_inatomic because
    > > the fault handler might call schedule although the preemption
    > > count is != 0. Use in_atomic() instead in_interrupt().
    > >
    > hm. Under what circumstances do you expect this test to trigger?

    e.g. by the following:

    static inline int get_futex_value_locked(int *dest, int __user *from)
    int ret;

    ret = __copy_from_user_inatomic(dest, from, sizeof(int));

    return ret ? -EFAULT : 0;

    in_interrupt only checks for HARDIRQ_MASK and SOFTIRQ_MASK but not
    for the preemption counter. This is not a theory, we had a bug report
    concerning a "bad: scheduling while atomic!" warning.

    blue skies,

    Martin Schwidefsky
    Linux for zSeries Development & Services
    IBM Deutschland Entwicklung GmbH

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-06-03 09:59    [W:0.020 / U:63.424 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site