zephyr/kernel
Andy Ross 4c63af8434 mem_pool: Don't check level_empty() before breaking a block
This test was just wrong.  If the current thread did not race with any
others during the allocation process, then the result will be false
because it was detected so earlier in the function.  If we did race,
then sure: it might be true now if someone snuck in and freed a block.
But so what?  We already have the block we want to break.  The
behavior in the code as written was to early-exit from the break loop,
returning a buffer that was larger than the one requested (though
otherwise benign -- we wouldn't leak, just waste memory).  No idea
what I was thinking.

Thanks to Du Quanwen for the diagnosis.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-07-31 09:14:59 -07:00
..
configs
include stack_sentinel: change cooperative check 2017-06-08 13:49:36 -05:00
Kconfig dts: Generate Kinetis adc settings from device tree 2017-07-19 14:28:08 -05:00
Kconfig.event_logger
Kconfig.power_mgmt doc: spelling fixes in Kconfig files 2017-06-12 19:40:51 -04:00
Makefile k_mem_pool: Complete rework 2017-05-13 14:39:41 -04:00
alert.c kernel: make K_.*_INITIALIZER private to kernel 2017-07-10 11:44:56 -07:00
atomic_c.c
compiler_stack_protect.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
device.c
errno.c
idle.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
init.c x86: page-aligned stacks with guard page 2017-07-25 11:32:36 -04:00
int_latency_bench.c
mailbox.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
mem_slab.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
mempool.c mem_pool: Don't check level_empty() before breaking a block 2017-07-31 09:14:59 -07:00
msg_q.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
mutex.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
pipes.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
poll.c
queue.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
sched.c kernel: fix short time-slice reset 2017-06-02 14:47:01 -04:00
sem.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
stack.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
sys_clock.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
system_work_q.c kernel: introduce stack definition macros 2017-06-09 18:53:28 -04:00
thread.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
thread_abort.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
timer.c kernel: make sure that CONFIG_OBJECT_TRACING structs are properly ifdef'ed 2017-05-18 12:41:56 -05:00
version.c
work_q.c kernel: add k_thread_create() API 2017-05-11 20:24:22 -04:00