From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 3C0AA1EFF8D; Tue, 20 Jun 2017 04:21:50 -0400 (EDT) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) by befuddled.reisers.ca (Postfix) with ESMTPS id AF0371EFF77 for ; Tue, 20 Jun 2017 04:21:48 -0400 (EDT) Received: by mail-wm0-x230.google.com with SMTP id u195so12724589wmd.1 for ; Tue, 20 Jun 2017 01:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gPcqutKLQ6dZoJHWYCN1wm5PyhvsEcGKZa3DhjSGZ3A=; b=sWKit3gZ1LRujClC7+aaLerEg2X9VAlH6Dnimw56BX6JKJyLVmc96Ayv9cZQuIXsgl KTR2fntzCTVcqWBSav7UDuY9aoCdcPMpwiUSCqvst2jA3kz/6MmEJj7ek3XdLxYptE/h 5REF+kz2c57yKRdjisbCrOFN9b32EcQGaBP+3u+7vu5BvA1BqMZv7Gr974k0PMn6sIn7 mglOOHNRKSGIOdji7bHrMyA6KAT3SZl/zR1UmHGClhRtwtS1AZhb1brMFb3xRA7P2jrT 010Vt+yiVDabnMum+WStr/oVADJb2W+hsxCCM+N75weQ0UGEu1SlPS9AbDNfiz7EKGon jGTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gPcqutKLQ6dZoJHWYCN1wm5PyhvsEcGKZa3DhjSGZ3A=; b=necmzms6QzRamBbLDfI8n9bCyYSnrzDIfDUEBohh0ERZIzn7eqEqEYuTpuX0xL2rwS JVy1Bu2ES4MjdMXErEomrmhG99mIaNR3nIEAU0hH0iha1tsqr0unJQZ79JpVBYk54ws4 mXMuiiFwZYS9kGslWAvhr7DN1mjxtkT+Cf3tbPeSvyoh34pFJoWNyazwwqeFjLWRQcyB 8mo0JZzzRa1z813O/9gpcv/6t+T7KTEOARb3LiHyASOZBzyde5pgRutAdNhU/MA5i51U lRHxcZC+z8fKkrA+s1POYIySrzjcSVF4c4GuRwi6kNZvUwxDT6QexCUiYh2Hq/uYCVpo Xzsg== X-Gm-Message-State: AKS2vOzy8JHD/f1Tcg8eGaJbn9RdhNnPwCR/RT0QXonrobitGvaeUYht LvL40Ufe0pmdPsnp X-Received: by 10.28.2.67 with SMTP id 64mr1651325wmc.101.1497946907426; Tue, 20 Jun 2017 01:21:47 -0700 (PDT) Received: from ?IPv6:2a00:23c4:7320:5900:e04d:a22e:c8b6:2162? ([2a00:23c4:7320:5900:e04d:a22e:c8b6:2162]) by smtp.gmail.com with ESMTPSA id 3sm14907063wru.50.2017.06.20.01.21.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 01:21:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [patch] staging: speakup: fix synth caching when synth init fails From: Okash Khawaja X-Mailer: iPhone Mail (11A501) In-Reply-To: <20170620081653.nhuqv7gahcj5gqsz@var.youpi.perso.aquilenet.fr> Date: Tue, 20 Jun 2017 09:21:45 +0100 Cc: "Speakup is a screen review system for Linux." Content-Transfer-Encoding: quoted-printable Message-Id: <9944B265-3DAB-4D46-AA39-073956DD6887@gmail.com> References: <20170620073120.GA3843@sanghar> <20170620081653.nhuqv7gahcj5gqsz@var.youpi.perso.aquilenet.fr> To: Samuel Thibault X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 08:21:50 -0000 > On 20 Jun 2017, at 09:16, Samuel Thibault w= rote: >=20 > Okash Khawaja, on mar. 20 juin 2017 08:31:20 +0100, wrote: >> synths[] array caches currently loaded synths. synth_add checks >> synths[] before adding a new one. It however ignores the result of >> do_synth_init. So when do_synth_init fails, the failed synth is still >> cached. Since, as a result module loading fails too, synth_remove - >> which is responsible for removing the cached synth - is never called. >> Next time the failing synth is added again it succeeds because >> synth_add finds it cached inside synths[]. >>=20 >> This patch fixes this by caching a synth only after do_synth_init >> succeeds. >>=20 >> Signed-off-by: Okash Khawaja >=20 > Reviewed-by: Samuel Thibault >=20 > (I guess you have tested it) Yes tested it working after the patch. No obvious regressions :) Thanks!