From 7eafcb0372c52c873342194570915e2f407277b7 Mon Sep 17 00:00:00 2001 From: Jiacheng Guo Date: Fri, 17 Sep 2021 17:31:20 +0800 Subject: [PATCH] vfs: fix occasional ISR context mismatch in event fd --- components/vfs/vfs_eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/vfs/vfs_eventfd.c b/components/vfs/vfs_eventfd.c index f5f3c49ed5..726a0b13a9 100644 --- a/components/vfs/vfs_eventfd.c +++ b/components/vfs/vfs_eventfd.c @@ -260,7 +260,7 @@ static ssize_t event_write(int fd, const void *data, size_t size) return ret; } - if (xPortInIsrContext()) { + if (!xPortCanYield()) { ret = signal_event_fd_from_isr(fd, data, size); } else { const uint64_t *val = (const uint64_t *)data;