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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250919170824.63df1d6e@booty>
Date: Fri, 19 Sep 2025 17:08:24 +0200
From: Luca Ceresoli <luca.ceresoli@...tlin.com>
To: Shengjiu Wang <shengjiu.wang@...il.com>
Cc: Maxime Ripard <mripard@...nel.org>, Shengjiu Wang
 <shengjiu.wang@....com>, andrzej.hajda@...el.com,
 neil.armstrong@...aro.org, rfoss@...nel.org,
 Laurent.pinchart@...asonboard.com, jonas@...boo.se,
 jernej.skrabec@...il.com, maarten.lankhorst@...ux.intel.com,
 tzimmermann@...e.de, airlied@...il.com, simona@...ll.ch, lumag@...nel.org,
 dianders@...omium.org, cristian.ciocaltea@...labora.com,
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
 victor.liu@....com, shawnguo@...nel.org, s.hauer@...gutronix.de,
 kernel@...gutronix.de, festevam@...il.com, imx@...ts.linux.dev,
 linux-arm-kernel@...ts.infradead.org, robh@...nel.org, krzk+dt@...nel.org,
 conor+dt@...nel.org, p.zabel@...gutronix.de, devicetree@...r.kernel.org,
 l.stach@...gutronix.de, perex@...ex.cz, tiwai@...e.com,
 linux-sound@...r.kernel.org
Subject: Re: [PATCH v5 4/7] drm/bridge: dw-hdmi: Add API
 dw_hdmi_set_sample_iec958() for iec958 format

Hello Shengjiu,

On Fri, 19 Sep 2025 11:43:05 +0800
Shengjiu Wang <shengjiu.wang@...il.com> wrote:

> Hi Luca
> 
> On Wed, Sep 10, 2025 at 6:29 PM Shengjiu Wang <shengjiu.wang@...il.com> wrote:
> >
> > Hi
> >
> > On Tue, Sep 9, 2025 at 2:39 PM Maxime Ripard <mripard@...nel.org> wrote:  
> > >
> > > Hi,
> > >
> > > On Wed, Sep 03, 2025 at 06:41:05PM +0800, Shengjiu Wang wrote:  
> > > > On Tue, Sep 2, 2025 at 12:52 AM Luca Ceresoli <luca.ceresoli@...tlin.com> wrote:  
> > > > >
> > > > > Hello Shengjiu,
> > > > >
> > > > > On Thu, 21 Aug 2025 15:31:28 +0800
> > > > > Shengjiu Wang <shengjiu.wang@....com> wrote:
> > > > >  
> > > > > > Add API dw_hdmi_set_sample_iec958() for IEC958 format because audio device
> > > > > > driver needs IEC958 information to configure this specific setting.
> > > > > >
> > > > > > Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> > > > > > Acked-by: Liu Ying <victor.liu@....com>  
> > > > >
> > > > > [...]
> > > > >  
> > > > > > +void dw_hdmi_set_sample_iec958(struct dw_hdmi *hdmi, unsigned int iec958)
> > > > > > +{
> > > > > > +     mutex_lock(&hdmi->audio_mutex);
> > > > > > +     hdmi->sample_iec958 = iec958;
> > > > > > +     mutex_unlock(&hdmi->audio_mutex);
> > > > > > +}  
> > > > >
> > > > > Apologies for jumping in the discussion as late as in v5, but I noticed
> > > > > this patch and I was wondering whether this mutex_lock/unlock() is
> > > > > really needed, as you're copying an int.  
> > > >
> > > > Thanks for your comments.
> > > >
> > > > Seems it is not necessary to add mutex here. I just follow the code as
> > > > other similar functions.  I will send a new version to update it.  
> > >
> > > Let's not be smart about it. Next thing you know, someone will add
> > > another field in there that would absolutely require a mutex and now
> > > you're not race free anymore.
> > >
> > > Unless there's a real concern, the mutex must stay.
> > >  
> >
> > Ok, thanks for comments.  Then Patch v6 need to be dropped.
> >
> > Is there any other comments for this Patch v5?
> > If no, can this series be accepted?
> >  
> 
> Can we have a conclusion that keeps the mutex as Maxime's comments?

If Maxime wants the mutex to be kept, it's fine.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ