summaryrefslogtreecommitdiffstats
path: root/common/poller.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-06-15 10:18:51 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-08-19 07:36:15 +0200
commit6583918059a1b0bac0ad776c06eeae4a7887fdab (patch)
treebc514e05b09fdde5c024c0f7db40d021a3daca7e /common/poller.c
parent0dc2fbcea236a1d610f28f7fb17cd6aee49885f7 (diff)
downloadbarebox-6583918059a1b0bac0ad776c06eeae4a7887fdab.tar.gz
barebox-6583918059a1b0bac0ad776c06eeae4a7887fdab.tar.xz
fs: Warn when filesystem operations are called from a poller
Filesystem operations possibly call into arbitrary devices, so shouldn't be used from a poller. This patch sprinkles some WARN_ONCE() when this happens. One exception is when the file which is accessed is on ramfs which doesn't have any dependencies to devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/poller.c')
-rw-r--r--common/poller.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/poller.c b/common/poller.c
index 7b1b92714c..50c518697b 100644
--- a/common/poller.c
+++ b/common/poller.c
@@ -16,7 +16,7 @@
#include <slice.h>
static LIST_HEAD(poller_list);
-static int poller_active;
+int poller_active;
int poller_register(struct poller_struct *poller, const char *name)
{