From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch] For bug in UBIFS function ubifs_finddir
Date: Wed, 29 Jun 2011 10:34:02 +0200 [thread overview]
Message-ID: <201106291034.02844.sr@denx.de> (raw)
In-Reply-To: <4DFC750F.7050605@teamboyce.co.uk>
Hi Rod,
On Saturday 18 June 2011 11:51:11 Rod Boyce wrote:
> Free private_data member element before freeing file structure. This
> was causing malloc to crash. Also remove unnecessary variable
> assigments after file structure was free'd.
>
> Signed-off-by: Rod Boyce <uboot@teamboyce.co.uk>
> ------------------------------- fs/ubifs/ubifs.c
> ------------------------------
> diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
> index 5a5c739..61f70b2 100644
> --- a/fs/ubifs/ubifs.c
> +++ b/fs/ubifs/ubifs.c
> @@ -360,6 +360,8 @@
> return err;
> }
>
> + if (file->private_data)
> + kfree(file->private_data);
> if (file)
> free(file);
> if (dentry)
> @@ -367,10 +369,6 @@
> if (dir)
> free(dir);
>
> - if (file->private_data)
> - kfree(file->private_data);
> - file->private_data = NULL;
> - file->f_pos = 2;
> return 0;
This patch does not apply:
Applying: For bug in UBIFS function ubifs_finddir
Using index info to reconstruct a base tree...
error: patch failed: fs/ubifs/ubifs.c:360
error: fs/ubifs/ubifs.c: patch does not apply
Did you hand edit your patch?
How did you create this patch? I recommend to use "git format-patch". And send
it via "git send-email".
Also, please change the patch subject and add "ubifs:":
- For bug in UBIFS function ubifs_finddir
+ ubifs: Fix bug in function ubifs_finddir
Please also take a look at this page for patch submission:
http://www.denx.de/wiki/view/U-Boot/Patches
Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
next prev parent reply other threads:[~2011-06-29 8:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 11:13 [U-Boot] Possible bug in UBIFS function ubifs_finddir Rod Boyce
2011-06-18 9:51 ` [U-Boot] [Patch] For " Rod Boyce
2011-06-29 8:34 ` Stefan Roese [this message]
2011-06-29 11:42 ` Detlev Zundel
2011-06-29 11:35 ` Detlev Zundel
2011-07-25 21:57 ` Wolfgang Denk
2011-07-28 13:27 ` [U-Boot] [PATCH] ubifs: Fix bad free() sequence in ubifs_finddir() Wolfgang Denk
2011-07-28 14:09 ` Rod Boyce
2011-08-19 15:22 ` Stefan Roese
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=201106291034.02844.sr@denx.de \
--to=sr@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