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] [day] [month] [year] [list]
Message-ID: <CAAObsKBCPMzXV=2F4M2PrsES1M+0OHA2ZJtmYTuQMPPd1u34Vw@mail.gmail.com>
Date: Mon, 1 Sep 2025 17:41:01 +0200
From: Tomeu Vizoso <tomeu@...euvizoso.net>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Oded Gabbay <ogabbay@...nel.org>, Jeff Hugo <jeff.hugo@....qualcomm.com>, 
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] accel/rocket: Fix some error checking in rocket_core_init()

On Thu, Aug 21, 2025 at 2:30 PM Dan Carpenter <dan.carpenter@...aro.org> wrote:
>
> The problem is that pm_runtime_get_sync() can return 1 on success so
> checking for zero doesn't work.  Use the pm_runtime_resume_and_get()
> function instead.  The pm_runtime_resume_and_get() function does
> additional cleanup as well so that's a bonus as well.
>
> Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  drivers/accel/rocket/rocket_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, Dan, I have applied it to drm-misc-next.

Regards,

Tomeu

> diff --git a/drivers/accel/rocket/rocket_core.c b/drivers/accel/rocket/rocket_core.c
> index 72fb5e5798fa..abe7719c1db4 100644
> --- a/drivers/accel/rocket/rocket_core.c
> +++ b/drivers/accel/rocket/rocket_core.c
> @@ -74,7 +74,7 @@ int rocket_core_init(struct rocket_core *core)
>
>         pm_runtime_enable(dev);
>
> -       err = pm_runtime_get_sync(dev);
> +       err = pm_runtime_resume_and_get(dev);
>         if (err) {
>                 rocket_job_fini(core);
>                 return err;
> --
> 2.47.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ