All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] malloc: Use malloc simple before malloc is fully initialized in memalign()
Date: Fri, 18 May 2018 10:21:40 +0200	[thread overview]
Message-ID: <de3976da-5923-767c-9d49-36f8a4e34608@gmail.com> (raw)
In-Reply-To: <1526637792-33233-1-git-send-email-ley.foon.tan@intel.com>

On 05/18/2018 12:03 PM, Ley Foon Tan wrote:
> Follow implementation in mALLOc(). Check GD_FLG_FULL_MALLOC_INIT flag and use
> malloc_simple if GD_FLG_FULL_MALLOC_INIT is unset. Adjust the malloc bytes
> to align with the requested alignment.
> 
> The original memalign() function will access mchunkptr struct to adjust the
> alignment if there is misalignment happen, but mchunkptr struct is not being
> initialized before full malloc is initialized. This cause the system crash.
> 
> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>

Reviewed-by: Marek Vasut <marek.vasut@gmail.com>

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2018-05-18  8:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 10:03 [U-Boot] [PATCH] malloc: Use malloc simple before malloc is fully initialized in memalign() Ley Foon Tan
2018-05-18  8:21 ` Marek Vasut [this message]
2018-05-19 14:37 ` Simon Glass
2018-05-23  6:32   ` Ley Foon Tan
2018-05-23 16:33     ` Simon Glass
2018-05-25  3:24       ` Ley Foon Tan
2018-05-25  3:33         ` Simon Glass
2018-05-25  8:50           ` Ley Foon Tan
2018-05-26  2:06             ` Simon Glass
2018-05-29  5:16               ` Masahiro Yamada
2018-05-30 19:18                 ` Simon Glass
2018-05-28 19:13 ` [U-Boot] " Tom Rini

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=de3976da-5923-767c-9d49-36f8a4e34608@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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.