zephyr/subsys
Michael Scott a4f4f6d6f3 net: net_if: avoid deref of NULL L2
When using offloaded network, an L2 is never assigned to the net_if.
Only certain portions of the net_if code are referenced such as:
net_if_up()
net_if_down()

And these functions make use of several L2 references:
get_flags()
enable()

Let's add checks to make sure we don't deref a NULL when using these
functions.

Fixes the following exception on K64F and other HW which can make
use of offloaded network HW:
FATAL: ***** Reserved Exception ( -16) *****
FATAL: r0/a1:  0x00000010  r1/a2:  0x0000644f  r2/a3:  0x00000000
FATAL: r3/a4:  0x00000000 r12/ip:  0x2000474c r14/lr:  0x0001475b
FATAL:  xpsr:  0x00000000
FATAL: Faulting instruction address (r15/pc): 0x0001b1cd
FATAL: >>> ZEPHYR FATAL ERROR 0: CPU exception
FATAL: Current thread: 0x20004c4c (unknown)

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/18957

Signed-off-by: Michael Scott <mike@foundries.io>
2019-09-08 22:08:02 -04:00
..
bluetooth bluetooth: controller: Added function to support RX link quota update 2019-09-08 12:39:09 +02:00
console subsystem: console: tty init checks and support for polled-only devices 2019-09-08 12:43:49 +02:00
cpp cpp: support for 64-bit constructors 2019-07-30 18:55:34 -07:00
debug subsys/debug/tracing: rearrange for standard use of extern "C" 2019-08-19 23:36:59 +02:00
dfu dfu: fix printf formatting in img_util 2019-08-16 20:40:13 +02:00
disk disk: Fix usdhc driver out-of-bounds array access 2019-08-30 16:57:55 +02:00
fb scripts: gen_cfb_font_header: modify to replicate cfb fonts 2019-07-31 05:43:50 -04:00
fs fcb: start using errno codes 2019-09-08 12:42:53 +02:00
jwt cleanup: include/: move zephyr/jwt.h to data/jwt.h 2019-06-27 22:55:49 -04:00
logging logging: Add basic userspace support 2019-08-27 14:29:21 -04:00
mgmt Bluetooth: GATT: Fix using variable size storage for CCC 2019-08-22 15:14:39 +03:00
net net: net_if: avoid deref of NULL L2 2019-09-08 22:08:02 -04:00
power cleanup: include/: move misc/reboot.h to power/reboot.h 2019-06-27 22:55:49 -04:00
random cleanup: include/: move entropy.h to drivers/entropy.h 2019-06-27 22:55:49 -04:00
settings fcb: start using errno codes 2019-09-08 12:42:53 +02:00
shell subsystem: kernel_shell: extend thread info 2019-09-08 12:39:58 +02:00
stats cleanup: include/: move stats.h to stats/stats.h 2019-06-27 22:55:49 -04:00
storage subsys/storage/flash_map: detect missing flash device 2019-07-24 09:20:56 -04:00
testsuite soc: arm: ke1xf: do not enable stack prot on tests with user mode. 2019-09-03 16:44:22 +02:00
usb usb: fix ZLP handling for Variable-length Data Stage 2019-09-08 22:06:48 -04:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
Kconfig userspace: remove APP_SHARED_MEM Kconfig 2019-02-23 07:43:55 -05:00