On Monday, 13 August 2018 03:04:43 HKT Sven Eckelmann wrote:
/* adding sysfs can fail but it is now to late to handle it.
* it can also not be in the spinlock section due to the sleeping
* behavior of the sysfs functions and the fs_reclaim lock
*/
batadv_sysfs_add_vlan(bat_priv->soft_iface, vlan);
/* add a new TT local entry. This one will be marked with the
NOPURGE * flag */
Why is it too late to handle the error ? As long as this function returns an error to the caller the kernel will destroy the interface, ultimately allowing batman to free anything related to this interface ?
Having debugged some nasty TT VLAN bugs which were due to missing error handling in the VLAN creation routine make me a little nervous about the proposed approach ...
Cheers, Marek