diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index cf1856cb25d2..71e917387ec3 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -574,7 +574,8 @@ static unsigned int userfaultfd_poll(struct file *file, poll_table *wait) ret = POLLIN; return ret; default: - BUG(); + WARN_ON_ONCE(1); + return POLLERR; } }