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: <055f2564-551d-4b5f-a6e3-d54ae104d5c9@sirena.org.uk>
Date:   Thu, 20 Jul 2023 15:31:53 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Dan Carpenter <dan.carpenter@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: Traceback with CONFIG_REGMAP_KUNIT=y+CONFIG_DEBUG_ATOMIC_SLEEP=y

On Thu, Jul 20, 2023 at 07:26:54AM -0700, Guenter Roeck wrote:
> On 7/20/23 01:50, Dan Carpenter wrote:

> > +++ b/drivers/base/regmap/regcache-rbtree.c
> > @@ -187,7 +187,7 @@ static int regcache_rbtree_init(struct regmap *map)
> >   	int i;
> >   	int ret;
> > -	map->cache = kmalloc(sizeof *rbtree_ctx, GFP_KERNEL);
> > +	map->cache = kmalloc(sizeof *rbtree_ctx, map->alloc_flags);

> Yes, that might work as well (and after looking more deeply into the code
> I wondered why it wasn't used in the first place).

> Based on Mark's feedback I submitted
> https://lore.kernel.org/lkml/20230720032848.1306349-1-linux@roeck-us.net/
> Sorry, I forgot to copy you on that one.

> Mark, please let me know what you prefer.

They're both independently fine, but I wouldn't expect anything that's
running in atomic context to be actually using dynamic allocations.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ