avf: fix race between avf process node and avf_delete_if(...) 12/28812/3
authorDamjan Marion <damarion@cisco.com>
Thu, 20 Aug 2020 15:28:20 +0000 (17:28 +0200)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 16 Sep 2020 10:15:52 +0000 (10:15 +0000)
commit2ee0098dee4e4130ae350ccfe526d88a826160c5
treecd638ea93ec1ed2be8b69bdfc3a8240de6a39035
parent95a77a2360c4315ab8a1178202d71d59e3b8c21f
avf: fix race between avf process node and avf_delete_if(...)

It may happen that process node is suspended while it waits for response
from adminq and during that time CLI or API process can call
avf_delete_if. When avf process node resumes, it may happen that device
is not there anymeore.

This patch delegates interface deletion to process node, so CLI/API
process just sends signal instead of deleting device instance itself.

Type: fix

Change-Id: I7f12e12df3071650f6e60ad7eb5af23b7acfe335
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 66bb7dd64ee2377103e18b96f1e6bf6405de44b5)
src/plugins/avf/avf.h
src/plugins/avf/avf_api.c
src/plugins/avf/cli.c
src/plugins/avf/device.c