From: Petr Mladek <pmladek-IBi9RG/b67k@public.gmane.org>
To: Sergey Senozhatsky
<sergey.senozhatsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Sergey Senozhatsky
<sergey.senozhatsky.work-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays()
Date: Wed, 2 Mar 2016 15:44:05 +0100 [thread overview]
Message-ID: <20160302144405.GC22171@pathway.suse.cz> (raw)
In-Reply-To: <1456917889-4416-1-git-send-email-sergey.senozhatsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Wed 2016-03-02 20:24:49, Sergey Senozhatsky wrote:
> of_overlay_destroy() can return `-ENODEV' error code once it
> failed to find the requested overlay in `ov_idr'. However,
> of_unittest_destroy_tracked_overlays() does not handle this
> error code correctly and continues to call of_overlay_destroy()
> on the 'missing' overlay over and over again. This results in
> a printk flood
>
> [..]
> [ 33.497583] of_overlay_destroy: Could not find overlay #6
> [ 33.497583] of_overlay_destroy: Could not find overlay #6
> [ 33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
> [ 33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
> [ 33.497586] of_overlay_destroy: Could not find overlay #6
> [ 33.497586] of_overlay_destroy: Could not find overlay #6
> [ 33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
> [ 33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
> [..]
>
> which is not really good due to printk design, and can lead to soft
> lockups, hard lockups, etc. (depending on the context console_unlock()
> is being called from). The problem has bee observed in real life
> and reported by Ying Huang.
>
> This patch does not address the root cause of missing overlay in
> `ov_idr', it fixes the endless loop only.
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Reported-by: kernel test robot <ying.huang-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> Link: lkml.kernel.org/r/87fuwk1c0o.fsf-5/hDr2MS57EDqwDYnZuMFFaTQe2KTcn/@public.gmane.org
I am not sure why the overlay did not exist but this patch avoids
a possible infinite loop and makes sense on its own.
Reviewed-by: Petr Mladek <pmladek-IBi9RG/b67k@public.gmane.org>
Best Regards,
Petr
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Petr Mladek <pmladek@suse.com>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Grant Likely <grant.likely@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH] of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays()
Date: Wed, 2 Mar 2016 15:44:05 +0100 [thread overview]
Message-ID: <20160302144405.GC22171@pathway.suse.cz> (raw)
In-Reply-To: <1456917889-4416-1-git-send-email-sergey.senozhatsky@gmail.com>
On Wed 2016-03-02 20:24:49, Sergey Senozhatsky wrote:
> of_overlay_destroy() can return `-ENODEV' error code once it
> failed to find the requested overlay in `ov_idr'. However,
> of_unittest_destroy_tracked_overlays() does not handle this
> error code correctly and continues to call of_overlay_destroy()
> on the 'missing' overlay over and over again. This results in
> a printk flood
>
> [..]
> [ 33.497583] of_overlay_destroy: Could not find overlay #6
> [ 33.497583] of_overlay_destroy: Could not find overlay #6
> [ 33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
> [ 33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
> [ 33.497586] of_overlay_destroy: Could not find overlay #6
> [ 33.497586] of_overlay_destroy: Could not find overlay #6
> [ 33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
> [ 33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
> [..]
>
> which is not really good due to printk design, and can lead to soft
> lockups, hard lockups, etc. (depending on the context console_unlock()
> is being called from). The problem has bee observed in real life
> and reported by Ying Huang.
>
> This patch does not address the root cause of missing overlay in
> `ov_idr', it fixes the endless loop only.
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Reported-by: kernel test robot <ying.huang@linux.intel.com>
> Link: lkml.kernel.org/r/87fuwk1c0o.fsf@yhuang-dev.intel.com
I am not sure why the overlay did not exist but this patch avoids
a possible infinite loop and makes sense on its own.
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
next prev parent reply other threads:[~2016-03-02 14:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 11:24 [PATCH] of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays() Sergey Senozhatsky
2016-03-02 11:24 ` Sergey Senozhatsky
[not found] ` <1456917889-4416-1-git-send-email-sergey.senozhatsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-02 14:44 ` Petr Mladek [this message]
2016-03-02 14:44 ` Petr Mladek
2016-03-03 22:53 ` Rob Herring
2016-03-03 22:53 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160302144405.GC22171@pathway.suse.cz \
--to=pmladek-ibi9rg/b67k@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sergey.senozhatsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=sergey.senozhatsky.work-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.