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
| ||
|
Date: Wed, 27 Oct 2021 11:26:23 +0300 From: Ido Schimmel <idosch@...sch.org> To: Vladimir Oltean <vladimir.oltean@....com> Cc: netdev@...r.kernel.org, Ido Schimmel <idosch@...dia.com>, Jakub Kicinski <kuba@...nel.org>, "David S. Miller" <davem@...emloft.net>, Roopa Prabhu <roopa@...dia.com>, Nikolay Aleksandrov <nikolay@...dia.com>, Andrew Lunn <andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>, Vivien Didelot <vivien.didelot@...il.com>, Vladimir Oltean <olteanv@...il.com>, Jiri Pirko <jiri@...dia.com> Subject: Re: [PATCH net-next 7/8] net: bridge: create a common function for populating switchdev FDB entries On Tue, Oct 26, 2021 at 05:27:42PM +0300, Vladimir Oltean wrote: > There are two places where a switchdev FDB entry is constructed, one is > br_switchdev_fdb_notify() and the other is br_fdb_replay(). One uses a > struct initializer, and the other declares the structure as > uninitialized and populates the elements one by one. > > One problem when introducing new members of struct > switchdev_notifier_fdb_info is that there is a risk for one of these > functions to run with an uninitialized value. > > So centralize the logic of populating such structure into a dedicated > function. Being the primary location where these structures are created, > using an uninitialized variable and populating the members one by one > should be fine, since this one function is supposed to assign values to > all its members. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@....com> Reviewed-by: Ido Schimmel <idosch@...dia.com>
Powered by blists - more mailing lists