aboutsummaryrefslogtreecommitdiff
path: root/mm/memfd.c
diff options
context:
space:
mode:
authorVladimir Oltean2021-06-21 19:42:14 +0300
committerDavid S. Miller2021-06-21 12:50:20 -0700
commit8674f8d310215d2bb7469b80e6cfccc044f717b3 (patch)
tree1ba7089074ab8847dcf227b04827e370f6fcef1c /mm/memfd.c
parent41505d3f0f51329c959e92479ed1219a2e85f5c2 (diff)
net: dsa: assert uniqueness of dsa,member properties
The cross-chip notifiers work by comparing each ds->index against the info->sw_index value from the notifier. The ds->index is retrieved from the device tree dsa,member property. If a single tree cross-chip topology does not declare unique switch IDs, this will result in hard-to-debug issues/voodoo effects such as the cross-chip notifier for one switch port also matching the port with the same number from another switch. Check in dsa_switch_parse_member_of() whether the DSA switch tree contains a DSA switch with the index we're preparing to add, before actually adding it. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/memfd.c')
0 files changed, 0 insertions, 0 deletions