Commit e6230cd2 authored by Jan Kiszka's avatar Jan Kiszka
Browse files

ipipe: Avoid recursive faults on root work overflow

On some archs, WARN* is implemented by triggering a fault. This can
cause troubles if we are already in a fault and try to submit too much
root work. Convert to open-coded warning and stack dump.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 4b67301b
......@@ -2027,9 +2027,16 @@ void __ipipe_post_work_root(struct ipipe_work_header *work)
cpu = ipipe_processor_id();
tail = per_cpu(work_tail, cpu);
if (WARN_ON_ONCE((unsigned char *)tail + work->size >=
per_cpu(work_buf, cpu) + WORKBUF_SIZE))
if (unlikely((unsigned char *)tail + work->size >=
per_cpu(work_buf, cpu) + WORKBUF_SIZE)) {
static volatile unsigned long once;
if (!test_and_set_bit(0, &once)) {
pr_err("I-pipe root work queue overflow! System may be unstable now.\n");
goto out;
/* Work handling is deferred, so data has to be copied. */
memcpy(tail, work, work->size);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment