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: <aXjRS6AoRJtRa1Uq@gmail.com>
Date: Tue, 27 Jan 2026 06:53:26 -0800
From: Breno Leitao <leitao@...ian.org>
To: Corey Minyard <corey@...yard.net>
Cc: Nathan Chancellor <nathan@...nel.org>, 
	Nick Desaulniers <nick.desaulniers+lkml@...il.com>, Bill Wendling <morbo@...gle.com>, 
	Justin Stitt <justinstitt@...gle.com>, openipmi-developer@...ts.sourceforge.net, 
	linux-kernel@...r.kernel.org, llvm@...ts.linux.dev, kernel-team@...a.com
Subject: Re: [PATCH 2/2] ipmi: Consolidate the run to completion checking for
 xmit msgs lock

On Tue, Jan 27, 2026 at 08:46:06AM -0600, Corey Minyard wrote:
> On Tue, Jan 27, 2026 at 06:41:48AM -0800, Breno Leitao wrote:
> > On Tue, Jan 27, 2026 at 07:54:40AM -0600, Corey Minyard wrote:
> > > It made things hard to read, move the check to a function.
> > > 
> > > Signed-off-by: Corey Minyard <corey@...yard.net>
> > > ---
> > >  drivers/char/ipmi/ipmi_msghandler.c | 40 ++++++++++++++++-------------
> > >  1 file changed, 22 insertions(+), 18 deletions(-)
> > > 
> > > diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
> > > index a590a67294e2..030828cdb778 100644
> > > --- a/drivers/char/ipmi/ipmi_msghandler.c
> > > +++ b/drivers/char/ipmi/ipmi_msghandler.c
> > > @@ -602,6 +602,20 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf,
> > >  static int __scan_channels(struct ipmi_smi *intf,
> > >  				struct ipmi_device_id *id, bool rescan);
> > >  
> > > +static void ipmi_lock_xmit_msgs(struct ipmi_smi *intf, int run_to_completion,
> > > +				unsigned long *flags)
> > > +{
> > > +	if (!run_to_completion)
> > > +		spin_lock_irqsave(&intf->xmit_msgs_lock, *flags);
> > > +}
> > 
> > I usually see the opposite construction in most cases. Something like:
> > 
> > 	static void ipmi_lock_xmit_msgs(struct ipmi_smi *intf, int run_to_completion,
> > 					unsigned long *flags)
> > 	{
> > 		if (run_to_completion)
> > 			return;
> > 
> > 		spin_lock_irqsave(&intf->xmit_msgs_lock, *flags);
> > 	}
> 
> Yes, that's better, I've changed it.

Thanks. feel free to add:

Reviewed-by: Breno Leitao <leitao@...ian.org>

Thanks for the quick replies,
--breno

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ