Fri, Apr 27, 2018 at 12:02:21PM CEST, atiainen(a)forcepoint.com wrote:
team_port_str() will crash when trying to print port name that was
just unregistered, if dellink event is handled before port removal
event.
This is regression from Commit 046fb6ba0aec ("libteam: resynchronize
ifinfo after lost RTNLGRP_LINK notifications"), which made it free
all removed interfaces after ifinfo handlers are called.
Put the ifinfo_destroy_removed() back to dellink/newlink handlers as
it was before that commit. Clean up the ifinfo list after change handlers
only if it refreshed the entire ifinfo list after lost events.
There's still a rare possibility that dellink event is missed due to
full socket receive buffer, which would cause ifinfo refresh and clearing
removed interfaces. For this, add NULL check to team_port_str() so it
doesn't try to print port device name in this situation.
Signed-off-by: Antti Tiainen <atiainen(a)forcepoint.com>
This patch is corrupter, probably by your email client.
Could you please send it using "git sent-email"?
Please see file SubmittingPatches for the info how to do so.
Thanks!