From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch v2] Fix hash table deletion to prevent lost entries
Date: Tue, 22 Mar 2011 22:45:50 +0100 [thread overview]
Message-ID: <20110322214550.D19AB151F7D@gemini.denx.de> (raw)
In-Reply-To: <4D87D9B0.1080102@logicpd.com>
Dear Peter Barada,
In message <4D87D9B0.1080102@logicpd.com> you wrote:
>
> > Can you please fix these, and resubmit?
> Updated patch attached (Thunderbird munched tabs)...
Thanks.
> > Also, do you happen to have a test case that can be used show the
> > problem in the existing code, and to test the patch?
> No, I don't have a testcase off hand (IIRC hashtable size is dependent on size of u-boot and amount of RAM), from my original email:
I was able to verify both the problem and that your fix fixes it.
Tested on "qong".
Added a Tested-by: Wolfgang Denk <wd@denx.de>
> From: Peter Barada <peter.barada@logicpd.com>
> Date: Mon, 21 Mar 2011 19:01:57 -0500
> Subject: [PATCH] Fix hashtable to properly handle deletion.
>
> Use negative used value to mark deleted entry. Search keeps probing
> past deleted entries. Adding an entry uses first deleted entry when
> it hits end of probe chain.
>
> Initially found that "ramdiskimage" and "preboot" collide modulus 347,
> causing "preboot" to be inserted at idx 190, "ramdiskimage" at idx 191.
> Previous to this fix when "preboot" is deleted, "ramdiskimage" is
> orphaned.
>
> Signed-off-by: Peter Barada <peter.barada@logicpd.com>
> ---
> diff --git a/lib/hashtable.c b/lib/hashtable.c
> index 9f069c0..fcdb53c 100644
> --- a/lib/hashtable.c
> +++ b/lib/hashtable.c
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Just because your doctor has a name for your condition doesn't mean
he knows what it is.
prev parent reply other threads:[~2011-03-22 21:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 22:53 [U-Boot] Hash problem Peter Barada
2011-01-19 8:32 ` Wolfgang Denk
2011-01-19 16:32 ` [U-Boot] [Patch] Fix hash table deletion to prevent lost entries Peter Barada
2011-01-19 20:47 ` Wolfgang Denk
2011-01-20 15:53 ` [U-Boot] [Patch v2] " Peter Barada
2011-03-21 21:48 ` Wolfgang Denk
2011-03-21 23:05 ` Peter Barada
2011-03-22 21:45 ` Wolfgang Denk [this message]
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=20110322214550.D19AB151F7D@gemini.denx.de \
--to=wd@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox