Re: [PATCH 1/1] mdadm/Detail: Can't show container name correctly when unpluging disks

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

 



On Mon, Oct 18, 2021 at 3:15 PM Tkaczyk, Mariusz
<mariusz.tkaczyk@xxxxxxxxxxxxxxx> wrote:
>
> >> +        dv = devid2kname(makedev(disks[d*2].major, disks[d*2].minor));
> >> +        dv_rep = devid2kname(makedev(disks[d*2+1].major, disks[d*2+1].minor));
>
> devid2kname() returns static memory. If both drive and replacement
> are available then dv value will be overwritten. Not sure if it is
> possible.
>

I think it has the possibility. It only wants to check if the disk exists. Maybe
it's better to write a new api or check if the device exists directly
here. I'll try to avoid
the problem you mentioned.

Best Regards
Xiao




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux