RE: [PATCH 1/7] irqbypass: Drop pointless and misleading THIS_MODULE get/put

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Sean Christopherson <seanjc@xxxxxxxxxx>
> Sent: Saturday, April 5, 2025 5:15 AM
> 
> Drop irqbypass.ko's superfluous and misleading get/put calls on
> THIS_MODULE.  A module taking a reference to itself is useless; no amount
> of checks will prevent doom and destruction if the caller hasn't already
> guaranteed the liveliness of the module (this goes for any module).  E.g.
> if try_module_get() fails because irqbypass.ko is being unloaded, then the
> kernel has already hit a use-after-free by virtue of executing code whose
> lifecycle is tied to irqbypass.ko.
> 
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux