stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Patch "ALSA: timer: Set lower bound of start tick time" has been added to the 6.8-stable tree
       [not found] <20240530190237.17492-1-sashal@kernel.org>
@ 2024-05-30 19:30 ` Takashi Iwai
  2024-06-03 12:41   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2024-05-30 19:30 UTC (permalink / raw)
  To: stable

On Thu, 30 May 2024 21:02:36 +0200,
Sasha Levin wrote:
> 
> This is a note to let you know that I've just added the patch titled
> 
>     ALSA: timer: Set lower bound of start tick time
> 
> to the 6.8-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      alsa-timer-set-lower-bound-of-start-tick-time.patch
> and it can be found in the queue-6.8 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.

Please drop this one for 6.8 and older (you posted for 6.6 too).
As already explained in another mail, this commit needs a prerequisite
use of guard().

An alternative patch has been already submitted.  Take it instead:
  https://lore.kernel.org/all/20240527062431.18709-1-tiwai@suse.de/


thanks,

Takashi


> 
> 
> 
> commit d717dbdb94145bee1e9cf9eca387d973564203c4
> Author: Takashi Iwai <tiwai@suse.de>
> Date:   Tue May 14 20:27:36 2024 +0200
> 
>     ALSA: timer: Set lower bound of start tick time
>     
>     [ Upstream commit 4a63bd179fa8d3fcc44a0d9d71d941ddd62f0c4e ]
>     
>     Currently ALSA timer doesn't have the lower limit of the start tick
>     time, and it allows a very small size, e.g. 1 tick with 1ns resolution
>     for hrtimer.  Such a situation may lead to an unexpected RCU stall,
>     where  the callback repeatedly queuing the expire update, as reported
>     by fuzzer.
>     
>     This patch introduces a sanity check of the timer start tick time, so
>     that the system returns an error when a too small start size is set.
>     As of this patch, the lower limit is hard-coded to 100us, which is
>     small enough but can still work somehow.
>     
>     Reported-by: syzbot+43120c2af6ca2938cc38@syzkaller.appspotmail.com
>     Closes: https://lore.kernel.org/r/000000000000fa00a1061740ab6d@google.com
>     Cc: <stable@vger.kernel.org>
>     Link: https://lore.kernel.org/r/20240514182745.4015-1-tiwai@suse.de
>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
>     Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> diff --git a/sound/core/timer.c b/sound/core/timer.c
> index e6e551d4a29e0..42c4c2b029526 100644
> --- a/sound/core/timer.c
> +++ b/sound/core/timer.c
> @@ -553,6 +553,14 @@ static int snd_timer_start1(struct snd_timer_instance *timeri,
>  		goto unlock;
>  	}
>  
> +	/* check the actual time for the start tick;
> +	 * bail out as error if it's way too low (< 100us)
> +	 */
> +	if (start) {
> +		if ((u64)snd_timer_hw_resolution(timer) * ticks < 100000)
> +			return -EINVAL;
> +	}
> +
>  	if (start)
>  		timeri->ticks = timeri->cticks = ticks;
>  	else if (!timeri->cticks)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch "ALSA: timer: Set lower bound of start tick time" has been added to the 6.8-stable tree
  2024-05-30 19:30 ` Patch "ALSA: timer: Set lower bound of start tick time" has been added to the 6.8-stable tree Takashi Iwai
@ 2024-06-03 12:41   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2024-06-03 12:41 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: stable

On Thu, May 30, 2024 at 09:30:41PM +0200, Takashi Iwai wrote:
> On Thu, 30 May 2024 21:02:36 +0200,
> Sasha Levin wrote:
> > 
> > This is a note to let you know that I've just added the patch titled
> > 
> >     ALSA: timer: Set lower bound of start tick time
> > 
> > to the 6.8-stable tree which can be found at:
> >     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> > 
> > The filename of the patch is:
> >      alsa-timer-set-lower-bound-of-start-tick-time.patch
> > and it can be found in the queue-6.8 subdirectory.
> > 
> > If you, or anyone else, feels it should not be added to the stable tree,
> > please let <stable@vger.kernel.org> know about it.
> 
> Please drop this one for 6.8 and older (you posted for 6.6 too).
> As already explained in another mail, this commit needs a prerequisite
> use of guard().
> 
> An alternative patch has been already submitted.  Take it instead:
>   https://lore.kernel.org/all/20240527062431.18709-1-tiwai@suse.de/

I've dropped this again and will take this patch when I catch up on the
my stable queue patches either tomorrow or Wednesday, thanks!

And sorry about the duplicate commit.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-03 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240530190237.17492-1-sashal@kernel.org>
2024-05-30 19:30 ` Patch "ALSA: timer: Set lower bound of start tick time" has been added to the 6.8-stable tree Takashi Iwai
2024-06-03 12:41   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).