Re: [PATCH v4 0/6] bdi: fix use-after-free for bdi device

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

 



On Tue 14-04-20 08:52:28, Christoph Hellwig wrote:
> Looking through this series the whoe approach of using a lock to clear
> the ->dev pointer looks rather odd to me.  What is the reason for now
> simply adding a separately allocated name field to struct
> backing_dev_info that the name is copied to on allocation, and then
> the ->dev field is not relevant for name printing and we don't need
> to copy out the name in the potentionally more fast path callers that
> want to print it?

Yeah, that's what I was suggesting as well [1] - especially since we
already have bdi->name with a dubious value (but looking into it now, we
would need a separate dev_name field since bdi->name is visible in sysfs so
we cannot change that). But Yufen explained to me that this could result in
bogus name being reported when bdi gets re-registered. Not sure if that's
serious enough but it could happen...

								Honza

[1] https://lore.kernel.org/linux-block/20200219125505.GP16121@xxxxxxxxxxxxxx

-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux