b7b0a17682
If the semaphore is shared, the holder has put its own mmapped address to pholder->sem. This means we must switch to the holder's address environment when going through the held semaphores list. A better option would be to get the kernel mapped address for the semaphore's physical page, but that mechanism is not functional yet. This fixes a full system crash when CONFIG_PRIORITY_INHERITANCE=y and CONFIG_BUILD_KERNEL=y and user makes shared semaphore via: int semfd = shm_open("sem", O_CREAT | O_RDWR, 0666); sem_t *sem = mmap(0, sizeof(sem_t), PROT_READ | PROT_WRITE, MAP_SHARED, semfd, 0); |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Make.defs | ||
sem_clockwait.c | ||
sem_destroy.c | ||
sem_holder.c | ||
sem_initialize.c | ||
sem_post.c | ||
sem_recover.c | ||
sem_reset.c | ||
sem_setprotocol.c | ||
sem_tickwait.c | ||
sem_timedwait.c | ||
sem_timeout.c | ||
sem_trywait.c | ||
sem_wait.c | ||
sem_waitirq.c | ||
semaphore.h | ||
spinlock.c |