]> xenbits.xensource.com Git - mini-os.git/commit
mini-os: netfront: fix suspend/resume handling
authorJuergen Gross <jgross@suse.com>
Tue, 22 Sep 2020 10:58:26 +0000 (12:58 +0200)
committerWei Liu <wl@xen.org>
Thu, 1 Oct 2020 09:36:35 +0000 (09:36 +0000)
commit4821876fcd2ff30bdfd77835731e9a0f1eaa33db
tree2b59b0c8151ec277d0476d55d777a3dfcfc6b486
parent30670e2a0a635f22b8236eb7b5c78eade244abff
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>
netfront.c