Re: [PATCH 4/4] speakup: Serialize synth clearing against locked readers
From: Samuel Thibault
Date: Sun Oct 18 2026 - 15:40:32 EST
Hello,
Indeed, the check for the synth pointer should be guarded, so it doesn't
disappear suddenly.
Your patch makes sense, but while at it:
> diff --git a/drivers/accessibility/speakup/devsynth.c b/drivers/accessibility/speakup/devsynth.c
> index e3d909bd04804..19799a362948d 100644
> --- a/drivers/accessibility/speakup/devsynth.c
> +++ b/drivers/accessibility/speakup/devsynth.c
> @@ -29,6 +29,10 @@ static ssize_t speakup_file_write(struct file *fp, const char __user *buffer,
> count -= bytes;
> ptr += bytes;
> spin_lock_irqsave(&speakup_info.spinlock, flags);
> + if (!synth) {
> + spin_unlock_irqrestore(&speakup_info.spinlock, flags);
> + return -ENODEV;
> + }
> synth_write(buf, bytes);
> spin_unlock_irqrestore(&speakup_info.spinlock, flags);
> }
You can as well remove the check above for simplicity, since it becomes duplicate.
That is the same in mostly all other places of the patch.
Thanks,
Samuel