Re: [PATCH net] s390/ism: add release function for struct device

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

 



On Fri, Feb 14, 2025 at 01:01:37PM +0100, Alexandra Winter wrote:
> From: Julian Ruess <julianr@xxxxxxxxxxxxx>
> 
> According to device_release() in /drivers/base/core.c,
> a device without a release function is a broken device
> and must be fixed.
> 
> The current code directly frees the device after calling device_add()
> without waiting for other kernel parts to release their references.
> Thus, a reference could still be held to a struct device,
> e.g., by sysfs, leading to potential use-after-free
> issues if a proper release function is not set.
> 
> Fixes: 8c81ba20349d ("net/smc: De-tangle ism and smc device initialization")
> Reviewed-by: Alexandra Winter <wintera@xxxxxxxxxxxxx>
> Reviewed-by: Wenjia Zhang <wenjia@xxxxxxxxxxxxx>
> Signed-off-by: Julian Ruess <julianr@xxxxxxxxxxxxx>
> Signed-off-by: Alexandra Winter <wintera@xxxxxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux