On Wed, Nov 24, 2010 at 02:56, Hari Kanigeri <[email protected]> wrote:
> In the current mailbox driver, the mailbox internal pointer for
> callback can be directly manipulated by the Users, so a second
> User can easily corrupt the first user's callback pointer.
> The initial effort to correct this issue can be referred here:
> https://patchwork.kernel.org/patch/107520/
>
> Along with fixing the above stated issue, this patch  adds the
> flexibility option to register notifications from
> multiple readers to the events received on a mailbox instance.
> The discussion regarding this can be referred here.
> http://www.mail-archive.com/[email protected]/msg30671.html
>
> Signed-off-by: Hari Kanigeri <[email protected]>
> Signed-off-by: Fernando Guzman Lugo <[email protected]>
> ---
>  arch/arm/plat-omap/include/plat/mailbox.h |    7 +-
>  arch/arm/plat-omap/mailbox.c              |  104 
> ++++++++++++++++-------------
>  2 files changed, 62 insertions(+), 49 deletions(-)
>

<<snip>>

> @@ -363,10 +372,13 @@ int omap_mbox_register(struct device *parent, struct 
> omap_mbox **list)
>                        ret = PTR_ERR(mbox->dev);
>                        goto err_out;
>                }
> +

Do this change in the patch where the below code was added.

>                if (cpu_is_omap44xx())
>                        mbox->rev = OMAP_MBOX_IP_VERSION_2;
>                else
>                        mbox->rev = OMAP_MBOX_IP_LEGACY;
> +
> +               BLOCKING_INIT_NOTIFIER_HEAD(&mbox->notifier);
>        }
>        return 0;
>
> --
> 1.7.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to