Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1349669

Re: [PATCH] of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays()

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays()
Date 2016-03-04 00:00 +0100
Message-ID <r8KnU-5IL-11@gated-at.bofh.it> (permalink)
References <r8d8D-6UP-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 02, 2016 at 08:24:49PM +0900, 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
> ---
>  drivers/of/unittest.c | 5 +++++
>  1 file changed, 5 insertions(+)

Applied, thanks.

Rob

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-02 12:30 +0100
  Re: [PATCH] of/unittest: fix infinite loop in  of_unittest_destroy_tracked_overlays() Petr Mladek <pmladek@suse.com> - 2016-03-02 15:50 +0100
  Re: [PATCH] of/unittest: fix infinite loop in  of_unittest_destroy_tracked_overlays() Rob Herring <robh@kernel.org> - 2016-03-04 00:00 +0100

csiph-web