riscv: fix race when vmap stack overflow