Re: [PATCH v1 1/1] ACPI: scan: Use unique number for instance_no

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

 



On Fri, Mar 19, 2021 at 7:06 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> On Fri, Mar 19, 2021 at 06:00:38PM +0100, Rafael J. Wysocki wrote:
> > On Fri, Mar 12, 2021 at 5:02 PM Andy Shevchenko
> > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > >
> > > Current mechanism of incrementing and decrementing plain integer
> > > to get a next free instance_no when creating an ACPI device is fragile.
> > >
> > > In case of hot plug event or namespace removal of the device instances
> > > with the low numbers the plain integer counter can't cover the gaps
> > > and become desynchronized with real state of affairs. If during next
> > > hot plug event or namespace injection the new instances of
> > > the devices need to be instantiated, the counter may mistakenly point
> > > to the existing instance_no and kernel will complain:
> > > "sysfs: cannot create duplicate filename '/bus/acpi/devices/XXXX1234:02'"
> >
> > This is a slightly convoluted way of stating that there is a bug in
> > acpi_device_del().
>
> Any suggestion how to massage the above?

Why don't you simply say something like "The decrementation of
acpi_device_bus_id->instance_no in acpi_device_del() is incorrect,
because it may cause a duplicate instance number to be allocated next
time a device with the same acpi_device_bus_id is added."



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux