[U-Boot] [PATCH V3] bugfix: image header pointer change.

This patch is to avoid potential issue when we still use the pointer images->legacy_hdr_os after the kernel un-compressed.
in function boot_get_kernel(): we should let the images->legacy_hdr_os point to the new copied image header, not the original image header in uImage which may be over-written in the kernel un-compressed process. This is a potential problem.
Signed-off-by: Baidu Boy liucai.lfn@gmail.com --- changes for V2: - Avoid unrelated syntax changes changes for V3: - Add some description for this patch.
common/cmd_bootm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 1a024f1..8f9e5f1 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -896,7 +896,7 @@ static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char * const memmove (&images->legacy_hdr_os_copy, hdr, sizeof(image_header_t));
/* save pointer to image header */ - images->legacy_hdr_os = hdr; + images->legacy_hdr_os = &images->legacy_hdr_os_copy;
images->legacy_hdr_valid = 1; show_boot_progress (6);

Hi, maintainers:
2010/11/28 Baidu Boy liucai.lfn@gmail.com:
This patch is to avoid potential issue when we still use the pointer images->legacy_hdr_os after the kernel un-compressed.
in function boot_get_kernel(): we should let the images->legacy_hdr_os point to the new copied image header, not the original image header in uImage which may be over-written in the kernel un-compressed process. This is a potential problem.
Signed-off-by: Baidu Boy liucai.lfn@gmail.com
changes for V2: - Avoid unrelated syntax changes changes for V3: - Add some description for this patch.
common/cmd_bootm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 1a024f1..8f9e5f1 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -896,7 +896,7 @@ static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char * const memmove (&images->legacy_hdr_os_copy, hdr, sizeof(image_header_t));
/* save pointer to image header */
- images->legacy_hdr_os = hdr;
- images->legacy_hdr_os = &images->legacy_hdr_os_copy;
images->legacy_hdr_valid = 1; show_boot_progress (6); -- 1.7.3.1.msysgit.0
This patch is still in new state. Please help to check. I think it is really an potential issue without this patch.
Thanks so much!

Dear Baidu Boy,
In message AANLkTikZnB5oX6-wajJvp1g7kuFjyGQ+4isS2ZKrc_6J@mail.gmail.com you wrote:
This patch is still in new state. Please help to check. I think it is really an potential issue without this patch.
All your patches require changes. See previous messages about the use of a real name in the Signed-off-by: line.
Best regards,
Wolfgang Denk
participants (2)
-
Baidu Boy
-
Wolfgang Denk