mini-os: netfront: fix suspend/resume handling
Suspend/resume handling of netfront is completely broken from the
beginning. Commit
d225f4012d69a1 ("Save/Restore Support: Add
suspend/restore support for netfront") introduced a new structure
netfront_dev_list referencing the real struct netfront_dev elements.
This list is used to setup the devices when resuming again.
Unfortunately the netfront_dev elements are released during suspend,
so at resume time those references will be stale.
Fix this whole mess by dropping struct netfront_dev_list again and
link the netfront_dev elements directly into a list. When suspending
don't free those elements.
The ip-address, netmask and gateway strings can just be released when
suspending and reread from xenstore at resume time.
Fixes: d225f4012d69a1 ("Save/Restore Support: Add suspend/restore support for netfront")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>