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: <Y2Ysb/TPGS21kDTK@nanopsycho>
Date:   Sat, 5 Nov 2022 10:27:11 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com,
        edumazet@...gle.com
Subject: Re: [patch net-next] net: devlink: convert port_list into xarray

Sat, Nov 05, 2022 at 03:19:10AM CET, kuba@...nel.org wrote:
>On Fri,  4 Nov 2022 16:14:05 +0100 Jiri Pirko wrote:
>> -	list_add_tail(&devlink_port->list, &devlink->port_list);
>> +	err = xa_alloc(&devlink->ports, &id, devlink_port, XA_LIMIT(id, id),
>> +		       GFP_KERNEL);
>> +	if (err) {
>> +		mutex_destroy(&devlink_port->reporters_lock);
>> +		return err;
>> +	}
>
>Odd if there isn't a cleaner API for allocating a specific ID.
>Perhaps xa_insert() is what we need?

Yeah, will change. Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ