You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/09 11:36:21 UTC
[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request, #7062: sched: fix kasan report error when open CONFIG_DEBUG_MM
GUIDINGLI opened a new pull request, #7062:
URL: https://github.com/apache/incubator-nuttx/pull/7062
## Summary
sched: fix kasan report error when open CONFIG_DEBUG_MM
reason:
1. g_running_tasks = thread A
2. thread A exit (free thread A's tcb) -> thread B
3. thread B interrupt by irq
4. check g_running_tasks->flags -> kasan report used after free
rootcause:
g_running_tasks has't set completely when syscall hanppened
Resolve:
Use rtcb (get at ISR begining) instead
Signed-off-by: ligd <li...@xiaomi.com>
## Impact
DEBUG_MM
## Testing
VELA
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] pkarashchenko merged pull request #7062: sched: fix kasan report error when open CONFIG_DEBUG_MM
Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #7062:
URL: https://github.com/apache/incubator-nuttx/pull/7062
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7062: sched: fix kasan report error when open CONFIG_DEBUG_MM
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7062:
URL: https://github.com/apache/incubator-nuttx/pull/7062#discussion_r967217019
##########
sched/irq/irq_dispatch.c:
##########
@@ -124,6 +124,9 @@
void irq_dispatch(int irq, FAR void *context)
{
+#ifdef CONFIG_DEBUG_MM
+ struct tcb_s *rtcb = this_task();
Review Comment:
```suggestion
FAR struct tcb_s *rtcb = this_task();
```
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7062: sched: fix kasan report error when open CONFIG_DEBUG_MM
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7062:
URL: https://github.com/apache/incubator-nuttx/pull/7062#issuecomment-1242153817
@pkarashchenko as the summary said that some code path(e.g. syscall) doesn't set g_running_tasks correctly.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org