• Takashi Iwai's avatar
    ALSA: timer: Reject user params with too small ticks · 71321eb3
    Takashi Iwai authored
    When a user sets a too small ticks with a fine-grained timer like
    hrtimer, the kernel tries to fire up the timer irq too frequently.
    This may lead to the condensed locks, eventually the kernel spinlock
    lockup with warnings.
    
    For avoiding such a situation, we define a lower limit of the
    resolution, namely 1ms.  When the user passes a too small tick value
    that results in less than that, the kernel returns -EINVAL now.
    Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    71321eb3
timer.c 53.6 KB