summaryrefslogtreecommitdiffstats
path: root/cpukit (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-01-03cpukit/score: avoid NULL and races in priority mutex4.10Gedare Bloom2-1/+9
The PIP modifications from #3359 introduced new data structures to track priority inheritance. Prioritized mutexes without PIP share some of the code paths, and may result in NULL pointer accesses. This patch checks for NULL, and also adds ISR critical sections to an uncovered corner case during thread restarts. Closes #3829.
2019-03-14shell: Correct argument order of `mfill`Jonathan Brandmeyer1-1/+1
Close #3723. (cherry picked from commit 2e8a66d13f04015c0024a084578f720ceb15ea00)
2018-08-10rfs: Remove erroneous call of rtems_disk_release()Sebastian Huber1-1/+0
The function rtems_rfs_buffer_sync() erroneously calls rtems_disk_release(). This screws up the reference counting of the disk. Close #3495.
2018-03-23score: add Inherited_priorities priority queue and functionsGedare Bloom12-19/+272
Adds enqueue, dequeue, requeue, evaluate, and release functions for the thread priority node priority queue of inherited priorities. Add calls to these functions as needed to maintain the priority queue due to blocking, unblocking, and priority changes. Closes #3359.
2018-03-23score: replace current and real priority with priority nodeGedare Bloom25-67/+76
Encapsulate the current_priority and real_priority fields of the thread control block with a Thread_Priority_node struct. Propagate modifications throughout the tree where the two fields are directly accessed. Updates #3359.
2018-01-11dosfs: Fix msdos_format()Ralf Kirchner1-1/+1
For FAT32 msdos_format() used to initialize first FAT entries to non-zero values only if a volume label was given. Absence of these entries made mounting such a FAT32 volume fail.
2018-01-11libnetworking: Disconnect after mbuf shortageSebastian Huber1-1/+4
The missing disconnect left the socket in an unusable state. Each send request resulted in an EISCONN error.
2018-01-11score: Use _Workspace_Allocate_or_fatal_error()Sebastian Huber1-5/+8
Use _Workspace_Allocate_or_fatal_error() consistently in case auto extend is turned off. This helps to avoid undefined behaviour in _API_Mutex_Allocate() in case _API_Mutex_Information() fails.
2018-01-11rtems: PR1844: Fix MP process packet sizeSebastian Huber1-2/+2
2018-01-11librpc: PR2066: Fix for short enumsSebastian Huber7-15/+23
The XDR library has a problem on architectures with short enums like the default ARM EABI. Short enums means that the size of the enum type is variable and the smallest integer type to hold all enum values will be selected. For many enums this is char. The XDR library uses int32_t for enum_t. There are several evil casts from an enum type to enum_t which leads to invalid memory accesses on short enum architectures. A workaround is to add appropriate dummy enum values.
2018-01-11network/bootp: PR2031: Add and use header fileSebastien Bourdeauducq6-37/+50
2018-01-11dosfs: Fix for no space left on device conditionSebastian Huber1-3/+5
The file size was wrong in the no space left on device condition. This resulted in turn in a read of an invalid block which lead to an EIO error status.
2018-01-11network/dhcp: PR1841: Fix DNS processing in DHCPSebastien Bourdeauducq1-3/+45
2018-01-10score/chain: Fix _Chain_Is_first and _Chain_Is_lastGedare Bloom1-2/+2
Updates #1964.
2017-01-26tftpDriver: don't free directory node's path stringMichael Davidsaver1-1/+2
Update #2375.
2017-01-26tftpDriver: backport fixesMichael Davidsaver2-92/+84
ensure that node_access is comparable in unmount() Update #2375.
2017-01-26tftpDriver: apply changes through masterMichael Davidsaver1-215/+161
from 4.10.2-15-g5b21eb6 to eb7753437ff858ebe34a08baef7dfdb45eb0f018 Update #2375.
2016-05-20fat: Fix for invalid cluster sizesSebastian Huber1-1/+3
A cluster size > 32KiB resulted in an infinite loop in fat_init_volume_info() due to an integer overflow. Update #2717.
2016-05-17posix: Fix return states of pthread_kill()Sebastian Huber1-19/+14
POSIX mandates that an error code is returned and not -1 plus errno. Update #2715.
2016-05-17posix: Fix return status of pthread_cancel()Sebastian Huber1-1/+1
POSIX recommends ESRCH in case no thread exists for the specified identifier. Update #2713.
2015-10-21RFS: Fix resource leakSebastian Huber1-0/+2
Update #2433.
2015-07-29tftpDriver: close() false errorMichael Davidsaver1-1/+3
closes #2376.
2015-02-23rpc: misaligned pointer dereference in clnt_udp.c line 363Jeffrey Hill1-3/+3
see #2248
2015-02-23rpc: misaligned address exception in get_myaddress.cJeffrey Hill1-15/+38
updates #2249 see #1401
2015-02-23networking: alignment exception in ioctl(SIOCGIFCONF)Till Straumann1-11/+12
Access memory using a byte stream when copying to avoid unaligned access. update #1401
2014-11-28bdbuf: Fix race condition with sync active flagSebastian Huber1-7/+13
Bug report by Oleg Kravtsov: In rtems_bdbuf_swapout_processing() function there is the following lines: if (bdbuf_cache.sync_active && !transfered_buffers) { rtems_id sync_requester; rtems_bdbuf_lock_cache (); ... } Here access to bdbuf_cache.sync_active is not protected with anything. Imagine the following test case: 1. Task1 releases buffer(s) with bdbuf_release_modified() calls; 2. After a while swapout task starts and flushes all buffers; 3. In the end of that swapout flush we are before that part of code, and assume there is task switching (just before "if (bdbuf_cache.sync_active && !transfered_buffers)"); 4. Some other task (with higher priority) does bdbuf_release_modified and rtems_bdbuf_syncdev(). This task successfully gets both locks sync and pool (in rtems_bdbuf_syncdev() function), sets sync_active to true and starts waiting for RTEMS_BDBUF_TRANSFER_SYNC event with only sync lock got. 5. Task switching happens again and we are again before "if (bdbuf_cache.sync_active && !transfered_buffers)". As the result we check sync_active and we come inside that "if" statement. 6. The result is that we send RTEMS_BDBUF_TRANSFER_SYNC event! Though ALL modified messages of that task are not flushed yet! close #1485
2014-11-24Avoid buffer overflow and misaligned memory accessSebastian Huber1-14/+24
2014-11-22ppp: PR1943: Avoid NULL pointer accessSebastian Huber1-8/+2
Waiting for mbufs at this level is a bad solution. It would be better to try to allocate a new mbuf chain before we hand over the current mbuf chain to the upper layer. In case the allocation fails we should drop the current packet and use its mbuf chain for a new packet.
2014-11-22capture: back-port conversion from task_name to task_id (see #1361)Nickolay Semyonov1-3/+3
2014-08-20score: PR2179: Fix initially locked PI mutexSebastian Huber1-4/+10
2014-06-27ramdisk: Fix device name generationSebastian Huber1-1/+1
2014-05-23score: PR2179: Fix initially locked PCP mutexesSebastian Huber1-2/+3
Elevate the priority of the creating task to the ceiling priority in case a semaphore is created as initially locked.
2014-04-11posix: fix race condition between pthread_create and capture engineTill Strauman1-0/+5
Fix PR 2068: Reproducable crashes occur when using pthreads and the capture engine at the same time. 'pthread_create()' is the culprit. It creates a SCORE thread and then calls Thread_Start( ) without disabling thread-dispatching.
2013-08-26score: PR2140: Fix _Thread_queue_Process_timeout()Sebastian Huber1-8/+37
The _Thread_queue_Process_timeout() operation had several race conditions in the event of nested interrupts. Protect the critical sections via disabled interrupts.
2013-08-26score: PR2140: _Thread_queue_Extract()Sebastian Huber4-11/+14
Return if the executing context performed the extract operation since interrupts may interfere.
2013-08-23libblock: PR2040: Avoid NULL pointer accessSebastian Huber1-6/+16
This partly reverts commit 08b9d534604fbf437743a9925ef28eb1b848510d. Avoid a NULL pointer access and perform the source segment erase if necessary.
2013-01-07score: Fix _Objects_Shrink_information()Sebastian Huber1-20/+16
The chain iteration was wrong. The chain tail is not an object.
2013-01-07rtems: Critical fix for eventsSebastian Huber1-7/+12
Commit 4b45c1393ce4ee3e1c2762ef3145d2bd6b5b38da marked a test in _Event_Timeout() as debug only. This test is required also in non-debug configurations since otherwise state corruption can happen. A revised test sptests/spintrcritical10 checks the relevant sequences.
2012-12-06score: Critical fix for timer serverSebastian Huber1-7/+0
Under certain conditions it is possible that a call to _Watchdog_Adjust_to_chain() happens with a unit parameter value of zero (for example sptests/spintrcritical17). Remove superfluous checks that prevent an adjust to a chain of a watchdog chain which first element has a delta zero value.
2012-12-06tftpfs: PR1624: Fix parsing of hostnames and pathsDylan Maxwell1-8/+11
2012-08-09libblock: Fix purge device tree traversalSebastian Huber1-1/+2
2012-04-16libblock: PR2040: Fix recycle destination updateSebastian Huber1-8/+7
Check the availablity of a recycle destination segment only when it is necessary to avoid missing resycle source segment erasures.
2012-04-16libblock: PR2040: Add starvation thresholdSebastian Huber1-1/+15
Do not use the unavailable block count as the erased blocks starvation threshold. Use instead the block count of the largest segment. This improves the starvation resolution gain of available blocks.
2012-03-14PR2040: libblock: Flash disk starvations statisticSebastian Huber1-2/+10
2012-03-14PR2040: libblock: Flash disk documentationSebastian Huber2-105/+127
2012-03-14PR2040: libblock: Fix return statusSebastian Huber1-3/+3
2012-03-14PR2040: libblock: Avoid erased blocks starvationSebastian Huber1-115/+185
The compaction process needs erased blocks. It is only possible to erase an entire segment. Thus in order to make a progress we always need enough erased blocks to empty a used or available segment which can be erased in turn. A (possibly the worst case) lower bound of erased blocks is the block count of the largest segment. The number of unavailable blocks specified by the configuration will be used to determine the erase blocks starvation situation. The number of unavailable blocks must be greater than or equal to the number of blocks in the largest segment.
2012-03-14PR2040: libblock: Track number of erased blocksSebastian Huber1-1/+8
2012-03-14PR2040: libblock: Use segment control as parameterSebastian Huber1-100/+91
2012-03-14PR2039: Fix NULL pointer accessSebastian Huber1-2/+2
In case rtems_bdbuf_read() returns an error status, the block device buffer pointer will be set to NULL. In RFS the chain node of the block device buffer will be used for RFS purposes. We must not do this after an erroneous read.