Commit Graph

21341 Commits

Author SHA1 Message Date
Sebastian Huber
fc027be4f9 sptests/spmutex01: refactor and add deadlock test 2018-03-23 11:33:59 -04:00
Sebastian Huber
a5c1b2be0c score: Test thread priority queue disciplines
Add test sptests/spmutex01, since no existing uni-processor test covered
the thread priority queueing discipline for CORE mutexes.
2018-03-23 11:33:59 -04:00
Gedare Bloom
9f011b97d9 sptests/spsem05: another test of prio stepdown on sem release 2018-03-23 11:33:59 -04:00
Gedare Bloom
8e1421f6e3 sptests/spsem04: test prio stepdown on sem release
Closes #3263.
2018-03-23 11:33:59 -04:00
Gedare Bloom
79cf35de9b sptests: back-port spsem01, spsem02, and spsem03 from 4.11 2018-03-23 11:33:59 -04:00
Sebastian Huber
d1d4e0172a bsps: Fix rtems_interrupt_server_handler_remove() 2018-01-11 13:07:35 -05:00
Ralf Kirchner
95f3656ae9 dosfs: Fix msdos_format()
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-11 13:00:15 -05:00
Sebastian Huber
45f9cd01f5 libnetworking: Disconnect after mbuf shortage
The missing disconnect left the socket in an unusable state.  Each send
request resulted in an EISCONN error.
2018-01-11 12:43:25 -05:00
Sebastian Huber
0e75aae563 score: Use _Workspace_Allocate_or_fatal_error()
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-11 12:37:45 -05:00
Sebastian Huber
b6b8cd7fb1 rtems: PR1844: Fix MP process packet size 2018-01-11 12:27:26 -05:00
Sebastian Huber
17fa7d6160 librpc: PR2066: Fix for short enums
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-11 12:13:32 -05:00
Sebastien Bourdeauducq
a078d6f0ab network/bootp: PR2031: Add and use header file 2018-01-11 12:13:21 -05:00
Sebastian Huber
89dd2ec437 dosfs: Fix for no space left on device condition
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-11 12:12:53 -05:00
Sebastien Bourdeauducq
0d653397a9 network/dhcp: PR1841: Fix DNS processing in DHCP 2018-01-11 12:08:24 -05:00
Gedare Bloom
991e1b8594 score/chain: Fix _Chain_Is_first and _Chain_Is_last
Updates #1964.
2018-01-10 09:42:02 -05:00
Michael Davidsaver
aecb508673 tftpDriver: don't free directory node's path string
Update #2375.
2017-01-26 07:41:42 +01:00
Michael Davidsaver
05d84959f7 tftpDriver: backport fixes
ensure that node_access is comparable in unmount()

Update #2375.
2017-01-26 07:41:38 +01:00
Michael Davidsaver
4bcbd8d6f0 tftpDriver: apply changes through master
from 4.10.2-15-g5b21eb6
to eb7753437f

Update #2375.
2017-01-26 07:41:24 +01:00
Joel Sherrill
e2f7059d7e m32csim-testsuite.tcfg: m32csim now completes build 2016-09-06 18:34:52 -05:00
Joel Sherrill
85910040d8 Backport capability to exclude tests from building
Backported build infrastructure and .tcfg files from master.
2016-09-06 10:31:16 +10:00
Joel Sherrill
7dc65fa6a6 Add autotools generated files 2016-09-04 19:48:45 -05:00
Chris Johns
b9d871f9e1 rtems-test-check: Ignore tests which require real ISR based clock tick
BSPs for simulators which do not include a clock tick interrupt source
are incapable of running some tests successfully. This is a common
characteristic of some BSPs and a fixed set of tests. There is no point
in duplicating this list of tests in those BSPs test configuration.

Read testsuites/testdata/require-tick-isr.tcfg for details.

Conflicts:
	testsuites/automake/test-subdirs.am
	tools/build/rtems-test-check
2016-09-04 19:38:15 -05:00
Chris Johns
c1d7c5fa6e Change version to 4.10 to the rtems-bsps. 2016-09-04 12:29:40 +10:00
Chris Johns
f2aef52881 Back port rtems-bsps for use in the release procedure. 2016-09-02 13:37:42 +10:00
Sebastian Huber
6adad1e70a fat: Fix for invalid cluster sizes
A cluster size > 32KiB resulted in an infinite loop in
fat_init_volume_info() due to an integer overflow.

Update #2717.
2016-05-20 08:15:24 +02:00
Sebastian Huber
d346f705e2 posix: Fix return states of pthread_kill()
POSIX mandates that an error code is returned and not -1 plus errno.

Update #2715.
2016-05-17 13:48:08 +02:00
Sebastian Huber
e34b7a8d40 posix: Fix return status of pthread_cancel()
POSIX recommends ESRCH in case no thread exists for the specified
identifier.

Update #2713.
2016-05-17 08:42:10 +02:00
Sebastian Huber
90b51b5a44 RFS: Fix resource leak
Update #2433.
2015-10-21 10:05:47 +02:00
Nick Withers
3699161a36 Fixes breakage on at least FreeBSD.
closes #2379.
2015-08-01 10:15:43 -07:00
Michael Davidsaver
a4e052b53f tftpDriver: close() false error
closes #2376.
2015-07-29 11:04:18 -05:00
Jeffrey Hill
0f3388d1f3 rpc: misaligned pointer dereference in clnt_udp.c line 363
see #2248
2015-02-23 12:27:05 -05:00
Jeffrey Hill
2fc3deae2e rpc: misaligned address exception in get_myaddress.c
updates #2249 see #1401
2015-02-23 12:07:37 -05:00
Till Straumann
70148eef28 networking: alignment exception in ioctl(SIOCGIFCONF)
Access memory using a byte stream when copying to avoid unaligned
access. update #1401
2015-02-23 10:48:56 -05:00
Till Strauman
0863e8e390 pc386: scan all functions of multi-function PCI devices
The current algorithm scans all PCI busses (0..ff)
 and all devices (0..31) on each bus for bridges
 and determines the maximum of all subordinate
 busses encountered.

 However, the algorithm does not scan all functions
 present in multi-function devices -- I have a PCI express
 root complex (82801H) where multiple (non-zero index)
 functions are 'PCI bridges' whose subordinate bus number is
 missed by the original algorithm.

 This commit makes sure that the scan
 is extended to all functions of multi-function
 devices.

 See #2067
2014-12-23 22:29:08 -05:00
Sebastian Huber
f0f2a3dc19 bdbuf: Fix race condition with sync active flag
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-28 11:15:18 +01:00
Pavel Pisa
7d015db0c6 SPI SD-Card: adapt common driver code to block devices core API changes.
close #1558
2014-11-27 11:00:48 +01:00
Sebastian Huber
0444c03180 Avoid buffer overflow and misaligned memory access 2014-11-24 08:58:24 +01:00
Sebastian Huber
d1d31a5f61 ppp: PR1943: Avoid NULL pointer access
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-22 09:33:12 -05:00
Nickolay Semyonov
b47dffc510 capture: back-port conversion from task_name to task_id (see #1361) 2014-11-22 09:05:07 -05:00
Sebastian Huber
a62a3c32b1 score: PR2179: Fix initially locked PI mutex 2014-08-20 07:24:16 +02:00
Sebastian Huber
f8811e4364 ramdisk: Fix device name generation 2014-06-27 16:34:32 +02:00
Sebastian Huber
272a80b776 score: PR2179: Fix initially locked PCP mutexes
Elevate the priority of the creating task to the ceiling priority in
case a semaphore is created as initially locked.
2014-05-23 09:04:17 +02:00
Till Strauman
907cfb1e2f posix: fix race condition between pthread_create and capture engine
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.
2014-04-11 15:40:16 -04:00
Aleksandr Platonov
fc48ad84c7 rtems_cache_invalidate_multiple_instruction_lines
According with comment in
rtems_cache_invalidate_multiple_instruction_lines(), final_address
indicates the last address which needs to be invalidated.  But if in
while loop we got final_address == i_addr condition then loop breaks and
final_address will not be invalidated.
2014-01-14 14:46:07 +01:00
Joel Sherrill
387c90b9a8 sparc.t: Correct for V8/V9 2013-11-20 15:53:27 -06:00
Pavel Pisa
df29cfeb0c SPI SD-Card: setup valid CRC-7 for STOP_TRANSMISSION command.
STOP_TRANSMISSION command is used to finish READ_MULTIPLE_BLOCK
command and its format is regular command format.
It requires valid CRC-7 to have effect at least on
same cards types else it is ignored and attempt
to issue next READ or WRITE commands results in
illegal command condition (0x04) preceded by strange
(0x3f) for tested card.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2013-10-08 11:16:15 +02:00
Pavel Pisa
7c709c05e9 Backport of development SPI SD-card patches to RTEMS 4.10.
Arnout Vandecappelle:

        PR 1569/misc
        * libchip/i2c/spi-sd-card.c: Added CRC checks.

        PR 1576/misc
        * libchip/i2c/spi-sd-card.c: Enable CRC checks.

        PR 1567/misc
        * libchip/i2c/spi-sd-card.h, libchip/i2c/spi-sd-card.c: Fixed
        timeouts.

        PR 1579/misc
        * libchip/i2c/spi-sd-card.c: Gradually increasing sleep times when
        waiting for write to finish.

        PR 1580/misc
        * libchip/i2c/spi-sd-card.c: Use bigger chunks and yield processor
        while waiting for read data.

        PR 1586/misc
        * libchip/i2c/spi-sd-card.h, libchip/i2c/spi-sd-card.c: Add retries to
        SD card accesses.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2013-10-08 11:14:42 +02:00
Sebastian Huber
ab0da63e3c score: PR2140: Fix _Thread_queue_Process_timeout()
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-26 10:22:36 +02:00
Sebastian Huber
2077ae4cc8 score: PR2140: _Thread_queue_Extract()
Return if the executing context performed the extract operation since
interrupts may interfere.
2013-08-26 10:22:18 +02:00
Sebastian Huber
db99ce7ced libblock: PR2040: Avoid NULL pointer access
This partly reverts commit 08b9d53460.

Avoid a NULL pointer access and perform the source segment erase if
necessary.
2013-08-23 09:34:13 +02:00