Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633656

Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead of module-wide globals

From Jonathan Woithe <jwoithe@just42.net>
Newsgroups linux.kernel
Subject Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead of module-wide globals
Date 2017-05-01 15:10 +0200
Message-ID <tCjfs-18R-3@gated-at.bofh.it> (permalink)
References <tzMnD-7Bg-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Michael

On Mon, Apr 24, 2017 at 03:33:24PM +0200, Micha?? K??pie?? wrote:
> fujitsu-laptop registers two ACPI drivers.  Whenever an ACPI device with
> a matching identifier is found by the ACPI bus, a new instance of the
> relevant driver is bound to that ACPI device.  However, both ACPI
> drivers registered by fujitsu-laptop access module-wide global data
> structures, assuming neither ACPI driver will ever be instantiated more
> than once.  While there are currently no indications of such issues
> happening in the wild, it is theoretically possible for multiple
> FUJ02B1/FUJ02E3 ACPI devices to be present in the firmware, which would
> cause two instances of the relevant driver to simultaneously access
> module-wide globals without any locking in place.  Also, modern Fujitsu
> laptops ship without the FUJ02B1 ACPI device present in firmware,
> causing memory to be needlessly allocated inside fujitsu_init().
> 
> To future-proof the module and lay the groundwork for separating the two
> aforementioned ACPI drivers into separate modules, move away from
> module-wide global data structures by using device-specific data
> instead.

Apologies for the delay in getting this first set of feedback to you.  It's
a combination of the extent of the patch set and a very busy week.

This patch set represents another worthwhile clean up of the fujitsu-laptop
driver.  While I sincerely doubt any laptop vendor will place more than one
FUJ02B1 (or FUJ02E3) in a single machine, removing the dependency on global
variables makes the driver self contained and more consistent.  I have some
points of clarification which I will post as follow ups to the respective
patchs.

Regards
  jonathan

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Jonathan Woithe <jwoithe@just42.net> - 2017-05-01 15:10 +0200
  Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Michał Kępień <kernel@kempniu.pl> - 2017-05-02 15:30 +0200
    Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Jonathan Woithe <jwoithe@just42.net> - 2017-05-05 01:50 +0200
      Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Darren Hart <dvhart@infradead.org> - 2017-05-05 18:20 +0200
        Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Michał Kępień <kernel@kempniu.pl> - 2017-05-06 14:40 +0200
          Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Michał Kępień <kernel@kempniu.pl> - 2017-05-06 14:50 +0200
            Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead of  module-wide globals Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-06 16:30 +0200
            Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead of  module-wide globals Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-06 16:30 +0200
            Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Darren Hart <dvhart@infradead.org> - 2017-05-08 18:10 +0200
              Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Michał Kępień <kernel@kempniu.pl> - 2017-05-09 11:40 +0200
                Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Jonathan Woithe <jwoithe@just42.net> - 2017-05-09 14:20 +0200
                Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Darren Hart <dvhart@infradead.org> - 2017-05-09 18:50 +0200
                Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead of module-wide globals "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-05-09 23:40 +0200
                Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Michał Kępień <kernel@kempniu.pl> - 2017-05-11 16:00 +0200
                Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead of module-wide globals "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-05-11 16:50 +0200
                Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Darren Hart <dvhart@infradead.org> - 2017-05-11 17:40 +0200
                Re: [PATCH 00/10] fujitsu-laptop: use device-specific data instead  of module-wide globals Michał Kępień <kernel@kempniu.pl> - 2017-05-11 15:50 +0200

csiph-web