From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E741E4DDB44 for ; Thu, 17 Sep 2026 15:15:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789658112; cv=none; b=e0oK8sDgRX4T64I8s+A284bWOloGYoK/RWbNEKDRs/GDCB3qoe2ocJTaQVQHOcdluXqfPI++Fm1vJrtmFDIoqJmyYrKWiqfM6F6Z5pM48M8Kw7ye4P9N1+3z5R8TSYVnLcGeUuXmAgMi301JgyTNKxLNpDjbFLM+WqH54VqACis= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789658112; c=relaxed/simple; bh=lj1AArdURKntw/KnF8ugndUqAFz8UXcJI2HmidLS8Go=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=peXCvEwL6VN3HRS0gE6R5dSr72WJMdLT7jImOShHLb5EXvaacM80OgH5rEBuFm2OEwjVM3tA4tX9dyxavuO/6zHYKQ8jdd6MGCqkD4dhySMDckgfN3mXbM2C0z/sx5hhkp990vbXqpw2/dkANSlDweAI/nzkjejVGkwY9phynjE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=O6flIGCj; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O6flIGCj" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-398b1e63c49so713627a91.0 for ; Thu, 17 Sep 2026 08:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789658105; x=1790262905; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=UlhivK+zlFu4a3uy9GJIwu4Lv0iGdPKrQsjr7JexLOk=; b=O6flIGCj9rp24USOjCztpgIJePjlgnwlN8C5DvBkzvIBEKVxVT03prxyQXioWoRk6q LHXkmZ/cMLYUhmVJkr/9KxlBGmM9sV2eyyX7pAt8w2GM3KcQ/nJmEImRZxGs4/pRqVzN NmpSv6HmEIRENo2jQ0QdgeSVDJDJtlnFYqz4rW30tFRxP/tSb9tQ1zGnmCnvnLa9IhhC OHorTofhHEC3Szg9AeosrOMiJn6XHTCyqgvWPTvm71U/SUjM28plNuFUvytsrQeMKmJV 9lV+XkiXhRDG3e1J+biR3ZCjqOBdeQwVqzZ+JRA5L0TAPfxp9xum1EEpEaxaw1xUaJ0x 4uzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789658105; x=1790262905; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=UlhivK+zlFu4a3uy9GJIwu4Lv0iGdPKrQsjr7JexLOk=; b=C2RnXYAsmFEx6DQ8rSGVwxhmErASJxqkBofQXxyhbMFMA8QTs3mh/BbgYenZuJrgwp Cfhx6YkR4n/FNLbYcuDB7wtsIZfIeWcpBhV0B8Ia5YaF1g1IjQv52NtFn4R7CJ0LMvyz 2gjREwU1DFkOY4njg2LsDxxZaxkrpZ3TUmRR63L6W6Aanj7sD7DcB0QyJxlSy19Uc1iN ZNUx18VUOynlB9VZokaOqBMHGDfWNFq+IjWygJKvRL4B6RfTF74YRAj/4Qdtvj5Tl76D LvDoVehoWGnqNrX8+XVpTEXKktdgilfL7OIS3AVjXJMBWHlwjZZi/jCfNkL9PX9enlz5 3ZpQ== X-Forwarded-Encrypted: i=1; AKwUvBxq2ubAm7ppypm5hVwdGrPZ0eSGYEEmC4+XdLxA3+F34kOFqIU9kCrtfrVzahCzIX1Girb53BU02QABbMo=@vger.kernel.org X-Gm-Message-State: AFuF++mUiiEFcvGsCUcPKSwnF0e18HgaxgMM2sYiqotMT4Mk0LfaptsG aiYSDfBchRPVLXxHBP13aGh8MIwe198Fna7P2/nEgLkKLjm01OU/fLDT0NLOSQ== X-Gm-Gg: AYBFou3QIbAljtR02xyvUMtFY7j3Qq9yjF7iLnItvBtkeCn+M/0MBNY1C73PeNKCT6q 4b14q+6DUXyHRtGb+eaINAjIrO027ghyooWKcCC9H3MPxAmDqa7+cHV1gq9gdobYG11sphLTV12 +u70zqwc9rILi1fW/QV2iW2gL2rHVFJMxbf+noKTuCwaWzdzaNF3lDnyVQh/JxVFaTr7LdBmj9I 2jaltMEENWSGc1y4uXexZeIb+usxRigCr4JCNtNS6BUzR3b6LQng3c2bVuOgUh3yW+fMzPve9OZ iLZZ8XPLCgywv6lanUNj85bfcUgrSXTrMtamckxAedl66bwofHKnd6+3JvTHKXQNMK21kcuXNm4 Fk7cNojdYZwIOoLEEmiH4yF9KTO6bsVMveN48fNvZekIgqvQ7yDfP3mae/ep+6tggrnoQMRZC7A 7rB+p9OmNigiRfkVKlBM2fkrY/iLhitrG6EyNmvBkAtHa+sg55CAfi2nUHiwcOPXJx0lbvgt1FI TybixQK7Oz4BaArF+raLiYpO1EgY9ktTq0tm0Fp X-Received: by 2002:a17:90b:3f4f:b0:39e:4c97:ce06 with SMTP id 98e67ed59e1d1-39e4c97cf1bmr761796a91.39.1789658105113; Thu, 17 Sep 2026 08:15:05 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:48d2:6852:2cc5:a7b1]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-33bf5af6593sm15799800eec.25.2026.09.17.08.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2026 08:15:04 -0700 (PDT) Date: Thu, 17 Sep 2026 08:15:01 -0700 From: Dmitry Torokhov To: Wentao Liang Cc: dudl@cypress.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] Input: cyapa - fix runtime PM leak in cyapa_update_rt_suspend_scanrate() Message-ID: References: <20260916185015.2093520-1-vulab@iscas.ac.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260916185015.2093520-1-vulab@iscas.ac.cn> Hi Wentao, On Wed, Sep 16, 2026 at 06:50:15PM +0000, Wentao Liang wrote: > pm_runtime_get_sync() unconditionally increments the runtime PM usage > counter. If mutex_lock_interruptible() is interrupted, the function > returns without dropping that reference. Add the missing > pm_runtime_put_sync_autosuspend() call on the error path. > > Fixes: 672865080a8f ("Input: cyapa - add runtime power management support") > Cc: stable@vger.kernel.org > Signed-off-by: Wentao Liang > --- > drivers/input/mouse/cyapa.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c > index 6e0d956617a1..5edf4fdbb373 100644 > --- a/drivers/input/mouse/cyapa.c > +++ b/drivers/input/mouse/cyapa.c > @@ -901,8 +901,10 @@ static ssize_t cyapa_update_rt_suspend_scanrate(struct device *dev, > pm_runtime_get_sync(dev); > > error = mutex_lock_interruptible(&cyapa->state_sync_lock); > - if (error) > + if (error) { > + pm_runtime_put_sync_autosuspend(dev); Why does it have to be "sync" variant? Thanks. -- Dmitry