zephyr/include/misc
Michael Scott 841a59cb0c slist/dlist: container node can't be NULL in *_PEEK_NEXT_CONTAINER
Using MPU enabled HW it was evident that a NULL access
(with offset) was happening in the TCP stack due to the
following message:
***** MPU FAULT *****
  Executing thread ID (thread): 0x20009b0c
  Faulting instruction address:  0x8034496
  Data Access Violation
  Address: 0x34
Fatal fault in essential thread! Spinning...

Turns out we are referencing a potentially de-referenced
NULL pointer in the SYS_SLIST_PEEK_NEXT_CONTAINER macro.

Let's avoid this by checking the container node for NULL.

Also fix dlist.h SYS_DLIST_PEEK_NEXT_CONTAINER with the same
issue.

Change-Id: I2e765b9af7bcaf8fb13f7c9b7e081f9e6d4928f2
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-04-28 12:36:40 +00:00
..
__assert.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
byteorder.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
dlist.h slist/dlist: container node can't be NULL in *_PEEK_NEXT_CONTAINER 2017-04-28 12:36:40 +00:00
nano_work.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
printk.h printk: add vprintk() 2017-04-22 14:29:33 +00:00
reboot.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
ring_buffer.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
slist.h slist/dlist: container node can't be NULL in *_PEEK_NEXT_CONTAINER 2017-04-28 12:36:40 +00:00
stack.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
util.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00