diff --git a/drivers/wireless/ieee802154/Kconfig b/drivers/wireless/ieee802154/Kconfig index 4a799e4999..df4a1796a0 100644 --- a/drivers/wireless/ieee802154/Kconfig +++ b/drivers/wireless/ieee802154/Kconfig @@ -16,6 +16,7 @@ source drivers/wireless/ieee802154/mrf24j40/Kconfig config IEEE802154_AT86RF233 bool "ATMEL RF233 IEEE 802.15.4 transceiver" default n + depends on EXPERIMENTAL ---help--- This selection enables support for the Atmel RF233 device. diff --git a/include/nuttx/net/sixlowpan.h b/include/nuttx/net/sixlowpan.h index 457044bca1..de272839e8 100644 --- a/include/nuttx/net/sixlowpan.h +++ b/include/nuttx/net/sixlowpan.h @@ -262,7 +262,9 @@ #define SIXLOWPAN_MAC_STDFRAME 127 -/* Space for a two byte FCS must be reserved at the end of the frame */ +/* Space for a two byte FCS must be reserved at the end of the frame. + * REVISIT: True for IEEE 802.15.4, but not for some other packet radios. + */ #define SIXLOWPAN_MAC_FCSSIZE 2 diff --git a/sched/sched/sched_verifytcb.c b/sched/sched/sched_verifytcb.c index 5958b28e0c..6dd93b6a29 100644 --- a/sched/sched/sched_verifytcb.c +++ b/sched/sched/sched_verifytcb.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/ched_verifytcb.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -59,8 +59,29 @@ bool sched_verifytcb(FAR struct tcb_s *tcb) { - /* Return true if the PID hashes to this TCB. */ + /* Return true if the PID hashes to this TCB. This will catch the case + * where the task associated with the TCB has terminated (note that + * sched_releasedtcb() will nullify the TCB field in that case). The + * following logic will also detect the case where the task assocated + * with the TCB has terminated and another task has been started with a + * different TCB but with a PID hashing to the same entry. + * + * NOTE: In the event that the TCB has terminated, the 'tcb' parameter + * will point at either a stale or a re-allocated memory allocation. The + * PID fetched by the use of the bad pointer(tcb->pid) should not cause + * any memory faults (at least in the FLAT or PROTECTED builds) because + * we do at least know that the pointer refers to valid memory and the + * hash macro, PIDHASH(), will return a valid, in-range index into the + * g_pidhash[] table. + * + * REVISIT: This logic will not, however, catch the case where the task + * originally associated with the TCB has terminated, but a new task was + * started reusing the same memory allocation for its TDB that was freed + * by the terminated task. In this case, a false positive value will be + * returned: The TCB is valid but does not refer to the same task as + * before. This case is not detectable with the limited amount of + * information available. + */ return tcb == g_pidhash[PIDHASH(tcb->pid)].tcb; } -