kernel: do not drop RAM caps
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Thu, 6 Aug 2015 14:02:42 +0000 (16:02 +0200)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Thu, 6 Aug 2015 14:05:06 +0000 (16:05 +0200)
commit24f00363e4566c651245bb6e92ae5fe898da7d57
tree8939b1677ca5080640e12e67908543412b820c36
parent914bfd94279d85fb6f6936cb555fb9a293724052
kernel: do not drop RAM caps

When deleting last copy of a RAM-derived cap without going through the monitor
it is possible that the monitor endpoint is already occupied.  If that's the
case we used to just leak the reclaimed RAM cap.  This patch changes the
behaviour in that case to return SYS_ERR_RETRY_THROUGH_MONITOR which then
provides a free slot to put the freshly created RAM cap.

Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>
kernel/cap_delete.c
kernel/dispatch.c
kernel/include/dispatch.h