lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160302144405.GC22171@pathway.suse.cz>
Date:	Wed, 2 Mar 2016 15:44:05 +0100
From:	Petr Mladek <pmladek@...e.com>
To:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:	Rob Herring <robh+dt@...nel.org>,
	Frank Rowand <frowand.list@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH] of/unittest: fix infinite loop in
 of_unittest_destroy_tracked_overlays()

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@...il.com>
> Reported-by: kernel test robot <ying.huang@...ux.intel.com>
> Link: lkml.kernel.org/r/87fuwk1c0o.fsf@...ang-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@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ