CVE-2026-72440: md/raid1: fix writes_pending and barrier reference leaks on write failures
In the Linux kernel, the following vulnerability has been resolved:
md/raid1: fix writespending and barrier reference leaks on write failures
raid1makerequest() acquires a writespending reference with mdwritestart() before calling raid1writerequest(). Several failure paths in raid1writerequest() complete the bio and return without reaching the normal write completion path, causing the corresponding mdwriteend() to be skipped.
Make raid1writerequest() return a status indicating whether the write request was successfully queued. This allows raid1makerequest() to call mdwriteend() when raid1writerequest() fails.
Additionally, if waitblockedrdev() fails after waitbarrier() succeeds, the associated barrier reference is not released.
Call allowbarrier() before returning from that path to keep the barrier accounting balanced.