lkml.org 
[lkml]   [2016]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v5 2/4] printk/nmi: warn when some message has been lost in NMI context
    On Thu, Apr 21, 2016 at 01:48:43PM +0200, Petr Mladek wrote:
    > @@ -64,8 +65,10 @@ static int vprintk_nmi(const char *fmt, va_list args)
    > again:
    > len = atomic_read(&s->len);
    >
    > - if (len >= sizeof(s->buffer))
    > + if (len >= sizeof(s->buffer)) {
    > + atomic_inc(&nmi_message_lost);

    This should be fine - I think its reasonable to expect that no one is
    using a spinlock implementation for their atomic ops for this...

    --
    RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
    FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
    according to speedtest.net.

    \
     
     \ /
      Last update: 2016-04-27 12:01    [W:4.685 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site