All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	David Airlie <airlied@linux.ie>, Jyri Sarha <jsarha@ti.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 09/12] of: overlay: avoid race condition between applying multiple overlays
Date: Mon, 16 Oct 2017 19:04:28 -0700	[thread overview]
Message-ID: <59E5652C.3020206@gmail.com> (raw)
In-Reply-To: <1508203074-26917-10-git-send-email-frowand.list@gmail.com>

On 10/16/17 18:17, frowand.list@gmail.com wrote:
> From: Frank Rowand <frank.rowand@sony.com>
> 
> The process of applying an overlay consists of:
>   - unflatten an overlay FDT (flattened device tree) into an
>     EDT (expanded device tree)
>   - fixup the phandle values in the overlay EDT to fit in a
>     range above the phandle values in the live device tree
>   - create the overlay changeset to reflect the contents of
>     the overlay EDT
>   - apply the overlay changeset, to modify the live device tree,
>     potentially changing the maximum phandle value in the live
>     device tree
> 
> There is currently no protection against two overlay applies
> concurrently determining what range of phandle values are in use
> in the live device tree, and subsequently changing that range.
> Add a mutex to prevent multiple overlay applies from occurring
> simultaneously.
> 
> Move of_resolve_phandles() into of_overlay_apply() so that it does not
> have to be duplicated by each caller of of_overlay_apply().
> 
> The test in of_resolve_phandles() that the overlay tree is detached is
> temporarily disabled so that old style overlay unittests do not fail.
> 
> Signed-off-by: Frank Rowand <frank.rowand@sony.com>
> ---

Brown paper bag time.

Changes from version 1:

squash "[PATCH] of: overlay: move resolve phandles into of_overlay_apply()"
into "[PATCH 09/12] of: overlay: avoid race condition between applying multiple overlays"


>  drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c |  6 ------
>  drivers/of/of_private.h                      | 12 +++++++++++
>  drivers/of/overlay.c                         | 32 ++++++++++++++++++++++++++++
>  drivers/of/resolver.c                        |  7 ++++++
>  drivers/of/unittest.c                        | 22 +++++++++++++------
>  include/linux/of.h                           |  3 ---
>  6 files changed, 67 insertions(+), 15 deletions(-)
> 

< snip >

  reply	other threads:[~2017-10-17  2:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  1:17 [PATCH v2 00/12] of: overlay: clean up device tree overlay code frowand.list-Re5JQEeQqe8AvxtiuMwx3w
2017-10-17  1:17 ` frowand.list
2017-10-17  1:17 ` [PATCH v2 01/12] of: overlay.c: Remove comments that state the obvious, to reduce clutter frowand.list
2017-10-17  1:17 ` [PATCH v2 02/12] of: overlay.c: Convert comparisons to zero or NULL to logical expressions frowand.list
2017-10-17  1:17 ` [PATCH v2 03/12] of: overlay: rename identifiers to more reflect what they do frowand.list
2017-10-17 14:38   ` Rob Herring
2017-10-17 14:38     ` Rob Herring
     [not found]     ` <CAL_JsqJDZFznVm0TvCePHq_J-FhNyEXoLEue_ZRhOm6LyXC5kQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-17 18:53       ` Frank Rowand
2017-10-17 18:53         ` Frank Rowand
2017-10-17  1:17 ` [PATCH v2 04/12] of: overlay: rename identifiers in dup_and_fixup_symbol_prop() frowand.list
2017-10-17  1:17 ` [PATCH v2 05/12] of: overlay: minor restructuring frowand.list
2017-10-17  1:17 ` [PATCH v2 06/12] of: overlay: detect cases where device tree may become corrupt frowand.list
2017-10-17  1:17 ` [PATCH v2 07/12] of: overlay: expand check of whether overlay changeset can be removed frowand.list
2017-10-17  1:17 ` [PATCH v2 08/12] of: overlay: loosen overly strict phandle clash check frowand.list
2017-10-17  1:17 ` [PATCH v2 09/12] of: overlay: avoid race condition between applying multiple overlays frowand.list
2017-10-17  2:04   ` Frank Rowand [this message]
2017-10-17  1:17 ` [PATCH v2 10/12] of: overlay: simplify applying symbols from an overlay frowand.list
     [not found] ` <1508203074-26917-1-git-send-email-frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-17  1:17   ` [PATCH v2 11/12] of: overlay: remove a dependency on device node full_name frowand.list-Re5JQEeQqe8AvxtiuMwx3w
2017-10-17  1:17     ` frowand.list
2017-10-17  1:17 ` [PATCH v2 12/12] of: overlay: remove unneeded check for NULL kbasename() frowand.list
2017-10-17  2:04 ` [PATCH v2 00/12] of: overlay: clean up device tree overlay code Frank Rowand

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=59E5652C.3020206@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=robh+dt@kernel.org \
    --cc=tomi.valkeinen@ti.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 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.