pussuw commented on code in PR #14865: URL: https://github.com/apache/nuttx/pull/14865#discussion_r1849684732
########## arch/arm/src/arm/arm_dataabort.c: ########## @@ -70,15 +70,16 @@ void arm_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr) { struct tcb_s *tcb = this_task(); #ifdef CONFIG_LEGACY_PAGING - uint32_t *savestate; + bool savestate; /* Save the saved processor context in current_regs where it can be * accessed for register dumps and possibly context switching. */ - savestate = up_current_regs(); + savestate = arm_get_irq_flag(); #endif - up_set_current_regs(regs); + tcb->xcp.regs = regs; Review Comment: This will now destroy the saved task context in this case: 1) Task is running in thread mode 2) Task starts serving an interrupt -> save task context to tcb->xcp.regs 3) Task gets a data abort exception in the kernel -> save task context to tcb->xcp.regs overriding the context save in 2) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org