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: <ZO3+sVKQrQT+Sefj@smile.fi.intel.com>
Date:   Tue, 29 Aug 2023 17:20:33 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Jaroslav Kysela <perex@...ex.cz>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        Takashi Iwai <tiwai@...e.com>
Subject: Re: [PATCH v1 1/1] ALSA: control: Use list_for_each_entry_safe()

On Tue, Aug 29, 2023 at 04:10:24PM +0200, Jaroslav Kysela wrote:
> On 29. 08. 23 15:52, Andy Shevchenko wrote:

...

> > Takashi, if you have anybody or want yourself to spend some time,
> > I believe you can simplify a lot the parser in this file with
> > the help of lib/cmdline.c APIs.
> 
> You probably mean next_arg() function. Unfortunately, it does not handle all
> cases we need to parse. The control IDs are a bit different than standard
> arguments.

Not only that, but also get_option() / get_options().
It might still make sense to look into and expand next_arg() to do
what you want (like I have done to get_option() which later allows
to have parse_int_array_user() be implemented).

It also have test cases, which can be expanded / amended as well.

...

> > -	list_for_each_entry(lctl, &led->controls, list)
> > +	list_for_each_entry(lctl, _lctl, &led->controls, list)
> 
> The list_for_each_entry_safe() should be used here, too.

Oh, good catch!

> With the fix:
> 
> Reviewed-by: Jaroslav Kysela <perex@...ex.cz>

Thank you, I'll send a v2 soon.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ