coreserver/memarea: Set flags on read/write error

Signed-off-by: Michael Buesch <m@bues.ch>