[patch V2 00/13] USB: Cleanup in_interupt/in_irq/in_atomic() usage
From: Thomas Gleixner
Date: Mon Oct 19 2020 - 06:18:07 EST
Folks,
in the discussion about preempt count consistency accross kernel configurations:
https://lore.kernel.org/r/20200914204209.256266093@xxxxxxxxxxxxx/
Linus clearly requested that code in drivers and libraries which changes
behaviour based on execution context should either be split up so that
e.g. task context invocations and BH invocations have different interfaces
or if that's not possible the context information has to be provided by the
caller which knows in which context it is executing.
This includes conditional locking, allocation mode (GFP_*) decisions and
avoidance of code paths which might sleep.
In the long run, usage of 'preemptible, in_*irq etc.' should be banned from
driver code completely.
The usage of such constructs in USB is rather limited. Most of it is in
debug code and (misleading) comments. But of course there are also a few
few bugs including one unfixable.
That's an update to V1 of this series which can be found here:
https://lore.kernel.org/r/20201014145215.518912759@xxxxxxxxxxxxx
Changes vs. V1:
- Fix the keyspan_pda query buffer properly
- Seperate the static change from the comments changes
- Address review feedback vs. comments
- Fix the typo in isp1362
- Collected acks/reviewed-by tags
Thanks,
tglx