lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 8 Jun 2022 23:08:30 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Sasha Levin <sashal@...nel.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Zheng Bin <zhengbin13@...wei.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        w.d.hubbs@...il.com, chris@...-brannons.com, kirk@...sers.ca,
        samuel.thibault@...-lyon.org, trix@...hat.com,
        salah.triki@...il.com, speakup@...ux-speakup.org
Subject: Re: [PATCH AUTOSEL 5.10 21/38] accessiblity: speakup: Add missing
 misc_deregister in softsynth_probe

Hi!

> From: Zheng Bin <zhengbin13@...wei.com>
> 
> [ Upstream commit 106101303eda8f93c65158e5d72b2cc6088ed034 ]
> 
> softsynth_probe misses a call misc_deregister() in an error path, this
> patch fixes that.

This seems incorrect. Registration failed, we can't really deregister.

I checked random other caller of misc_register(), and it does not seem
this API is unusual.

Best regards,
								Pavel

> +++ b/drivers/accessibility/speakup/speakup_soft.c
> @@ -390,6 +390,7 @@ static int softsynth_probe(struct spk_synth *synth)
>  	synthu_device.name = "softsynthu";
>  	synthu_device.fops = &softsynthu_fops;
>  	if (misc_register(&synthu_device)) {
> +		misc_deregister(&synth_device);
>  		pr_warn("Couldn't initialize miscdevice /dev/softsynthu.\n");
>  		return -ENODEV;
>  	}


-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ