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: 3+ 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 14:44 ` Petr Mladek [this message]
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@suse.com \
--cc=akpm@linux-foundation.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox