LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-01-2022, 08:10 AM   #1
efagerho
LQ Newbie
 
Registered: Dec 2022
Posts: 1

Rep: Reputation: 0
Understanding irq_exit() and non-interrupt context


Kernel newbie here. Started reading the kernel source a few days back and noticed that irq_exit() has code wrapped in an !in_interrupt() check:

https://elixir.bootlin.com/linux/v5....softirq.c#L413

When would we end up calling irq_exit() in a context where in_interrupt() would return false?
 
Old 12-03-2022, 08:58 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Ok, since you got no answer:
I suppose it's just a safety measure to catch the truly unexpected and unplanned event where something "out there" has already gone wrong. But I'm not a kernel developer, so probably they know it better.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can I call kill_fasync( ) from interrupt context nickolais Linux - Software 2 06-04-2009 08:47 AM
Thread context switch causes lost interrupt EmbeddedSteve Linux - Kernel 1 09-01-2006 03:45 PM
control is not going to interrupt handler when interrupt comes in serial driver sateeshalla Linux - Kernel 1 05-04-2006 09:43 AM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM
** WLAN busy-sleeping in interrupt context! adelaideyip Linux - Wireless Networking 0 08-20-2004 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration