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]
Message-ID: <bba3acc1-cfa1-0c53-75de-f4ffa0a2bc9e@linaro.org>
Date:   Mon, 25 Oct 2021 08:30:06 -0700
From:   Tadeusz Struk <tadeusz.struk@...aro.org>
To:     Bryan O'Donoghue <pure.logic@...us-software.ie>,
        Stanimir Varbanov <stanimir.varbanov@...aro.org>,
        Andy Gross <agross@...nel.org>
Cc:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Lee Jones <lee.jones@...aro.org>,
        Amit Pundir <amit.pundir@...aro.org>,
        John Stultz <john.stultz@...aro.org>,
        linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: venus: Synchronize probe() between venus_core and
 enc/dec

Hi Bryan,
On 10/25/21 08:24, Bryan O'Donoghue wrote:
> 
>> +    struct mutex sync_lock;
> 
> Why have an additional mutex, will the existing core::lock not do ?

I wanted to reuse it, but the core::lock in used internally in hfi and
it will deadlock there if we use that one here.

> shouldn't this be an -EPROBE_DEFER i.e. CORE_INIT hasn't completed/run yet so defer until 
> it does.
> 
> This fragment here looks racy to me without a DEFER above ?
> 
> drivers/media/platform/qcom/venus/core.c::venus_probe()

No, we want a hard stop here. At this point the venus_core probe()
has finished and it failed. Returning -EPROBE_DEFER here will just
cause it to loop infinitely.

-- 
Thanks,
Tadeusz

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ