Question re: __mlog_cpu_guess in fs/ocfs2/cluster/masklog.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am puzzled by this code and comment:

/*
 * smp_processor_id() "helpfully" screams when called outside preemptible
 * regions in current kernels.  sles doesn't have the variants that don't
 * scream.  just do this instead of trying to guess which we're building
 * against.. *sigh*.
 */
#define __mlog_cpu_guess ({             \
        unsigned long _cpu = get_cpu(); \
        put_cpu();                      \
        _cpu;                           \
})

First I think you mean "inside preemptible regions".  Second, it screams
because it's a bug to call smp_processor_id() from preemptible code!

Am I missing something?

Lee

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux