| 2302b3ab | 29-Oct-2014 |
Rabin Vincent <rabin@rab.in> |
hush: make run_command() return an error on parsing failure
run_command() returns success even if the command had a syntax error; correct this behaviour.
Signed-off-by: Rabin Vincent <rabin@rab.in>
hush: make run_command() return an error on parsing failure
run_command() returns success even if the command had a syntax error; correct this behaviour.
Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org)
show more ...
|
| 128059b9 | 29-Oct-2014 |
Rabin Vincent <rabin@rab.in> |
hush: fix segfault on syntax error
Hush segfaults if it sees a syntax error while attempting to parse a command:
$ ./u-boot -c "'" ... syntax error Segmentation fault (core dumped)
This is due
hush: fix segfault on syntax error
Hush segfaults if it sees a syntax error while attempting to parse a command:
$ ./u-boot -c "'" ... syntax error Segmentation fault (core dumped)
This is due to a NULL pointer dereference of in_str->p in static_peek(). The problem is that the exit condition for the loop in parse_stream_outer() checks for rcode not being -1, but rcode is only ever 0 or 1.
Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org) Tested-by: Simon Glass <sjg@chromium.org)
show more ...
|
| 484408fb | 29-Oct-2014 |
Rabin Vincent <rabin@rab.in> |
hush: return consistent codes from run_command()
Attempting to run: - an empty string - a string with just spaces
returns different error codes, 1 for the empty string and 0 for the string with j
hush: return consistent codes from run_command()
Attempting to run: - an empty string - a string with just spaces
returns different error codes, 1 for the empty string and 0 for the string with just spaces. Make both of them return 0 for consistency.
Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org)
show more ...
|
| 854d2b97 | 29-Oct-2014 |
Rabin Vincent <rabin@rab.in> |
dlmalloc: ensure gd is set for early alloc
Attempting to run the sandbox leads to a segfault, because some dynamic libraries (outside of u-boot) attempt to use malloc() to allocate memory before u-b
dlmalloc: ensure gd is set for early alloc
Attempting to run the sandbox leads to a segfault, because some dynamic libraries (outside of u-boot) attempt to use malloc() to allocate memory before u-boot's gd variable is initialized.
Check for gd not being NULL in the SYS_MALLOC_F_LEN handling, so that malloc() doesn't crash when called at this point.
$ gdb -q --args ./u-boot (gdb) r Program received signal SIGSEGV, Segmentation fault. 0x0000000000412b9b in malloc (bytes=bytes@entry=37) at common/dlmalloc.c:2184 2184 if (!(gd->flags & GD_FLG_RELOC)) { (gdb) p gd $1 = (gd_t *) 0x0 (gdb) bt #0 0x0000000000412b9b in malloc (bytes=bytes@entry=37) at common/dlmalloc.c:2184 #1 0x00007ffff75bf8e1 in set_binding_values (domainname=0x7ffff11f4f12 "libgpg-error", dirnamep=0x7fffffffe168, codesetp=0x0) at bindtextdom.c:228 #2 0x00007ffff75bfb4c in set_binding_values (codesetp=0x0, dirnamep=0x7fffffffe168, domainname=<optimized out>) at bindtextdom.c:350 #3 __bindtextdomain (domainname=<optimized out>, dirname=0x7ffff11f4f00 "/usr/share/locale") at bindtextdom.c:348 #4 0x00007ffff11eca17 in ?? () from /lib/x86_64-linux-gnu/libgpg-error.so.0 #5 0x00007ffff7dea9fa in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe208, env=env@entry=0x7fffffffe218) at dl-init.c:78 #6 0x00007ffff7deaae3 in call_init (env=0x7fffffffe218, argv=0x7fffffffe208, argc=1, l=<optimized out>) at dl-init.c:36 #7 _dl_init (main_map=0x7ffff7ffe1a8, argc=1, argv=0x7fffffffe208, env=0x7fffffffe218) at dl-init.c:126 #8 0x00007ffff7ddd1ca in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 8e553119 | 24-Sep-2014 |
Hans de Goede <hdegoede@redhat.com> |
usb: kbd: Add (optional) support for using an interrupt queue for polling
Waiting an interrupt packet to complete in usb_kbd_poll_for_event, causes a 40 ms latency for each call to usb_kbd_testc, wh
usb: kbd: Add (optional) support for using an interrupt queue for polling
Waiting an interrupt packet to complete in usb_kbd_poll_for_event, causes a 40 ms latency for each call to usb_kbd_testc, which is undesirable.
Using control messages leads to lower (but still not 0) latency, but some devices do not work well with control messages (e.g. my kvm behaves funny with them).
This commit adds support for using the int_queue mechanism which at least the ehci-hcd driver supports. This allows polling with 0 latency, while using interrupt packets.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
| 88274b6c | 24-Sep-2014 |
Hans de Goede <hdegoede@redhat.com> |
stdio: Fix memleak on stdio_deregister
stdio_register makes a malloc-ed copy of struct stdio_dev through stdio_clone, free the malloc-ed memory on stdio_deregister.
Signed-off-by: Hans de Goede <hd
stdio: Fix memleak on stdio_deregister
stdio_register makes a malloc-ed copy of struct stdio_dev through stdio_clone, free the malloc-ed memory on stdio_deregister.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
| a3a4749d | 23-Oct-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
cmd_mem: call unmap_sysmem() after map_sysmem()
Actually, unmap_sysmem() does nothing. Just in case.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> A
cmd_mem: call unmap_sysmem() after map_sysmem()
Actually, unmap_sysmem() does nothing. Just in case.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 99819458 | 16-Oct-2014 |
Rob Herring <robh@kernel.org> |
aboot: fix block addressing for don't care chunk type
CHUNK_TYPE_DONT_CARE should skip over the specified number of blocks, but currently fails to increment the device block address. This results in
aboot: fix block addressing for don't care chunk type
CHUNK_TYPE_DONT_CARE should skip over the specified number of blocks, but currently fails to increment the device block address. This results in filesystem images getting written incorrectly. Add the missing block address incrementing.
Cc: Steve Rae <srae@broadcom.com> Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Steve Rae <srae@broadcom.com>
show more ...
|