flex_proportions: make fprop_new_period() hardirq safe
Description
In the Linux kernel, the following vulnerability has been resolved:
flex_proportions: make fprop_new_period() hardirq safe
Bernd has reported a lockdep splat from flexible proportions code that is essentially complaining about the following race:
run_timer_softirq - we are in softirq context call_timer_fn writeout_period fprop_new_period write_seqcount_begin(&p->sequence);
... blk_mq_end_request() blk_update_request() ext4_end_bio() folio_end_writeback() __wb_writeout_add() __fprop_add_percpu_max() if (unlikely(max_frac < FPROP_FRAC_BASE)) { fprop_fraction_percpu() seq = read_seqcount_begin(&p->sequence); - sees odd sequence so loops indefinitely
Note that a deadlock like this is only possible if the bdi has configured maximum fraction of writeout throughput which is very rare in general but frequent for example for FUSE bdis. To fix this problem we have to make sure write section of the sequence counter is irqsafe.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
2Patches
Vulnerability mechanics
References
5- git.kernel.org/stable/c/0acc9ba7a1b5ba4d998c5753e709be904e179b75mitre
- git.kernel.org/stable/c/78ede9ebd679dadf480dce6f7b798e3603f88348mitre
- git.kernel.org/stable/c/884b2590ffcc7222cbbd6298051f4c243cc36f5dmitre
- git.kernel.org/stable/c/b91a84299d72ae0e05551e851e47cd3008bd025bmitre
- git.kernel.org/stable/c/dd9e2f5b38f1fdd49b1ab6d3a85f81c14369eaccmitre
News mentions
0No linked articles in our index yet.