kernel: fix a race condition leading to a crash in hw flow offloading