15 May, 2020

1 commit

  • create_cpu_loop() calls smu_sat_get_sdb_partition() which does
    kmalloc() and returns the allocated buffer. In fact it's called twice,
    and neither buffer is freed.

    This results in a memory leak as reported by Erhard:
    unreferenced object 0xc00000047081f840 (size 32):
    comm "kwindfarm", pid 203, jiffies 4294880630 (age 5552.877s)
    hex dump (first 32 bytes):
    c8 06 02 7f ff 02 ff 01 fb bf 00 41 00 20 00 00 ...........A. ..
    00 07 89 37 00 a0 00 00 00 00 00 00 00 00 00 00 ...7............
    backtrace:
    [] .smu_sat_get_sdb_partition+0xc4/0x2d0 [windfarm_smu_sat]
    [] .pm112_wf_notify+0x104c/0x13bc [windfarm_pm112]
    [] .notifier_call_chain+0xa8/0x180
    [] .blocking_notifier_call_chain+0x64/0x90
    [] .wf_thread_func+0x114/0x1a0
    [] .kthread+0x13c/0x190
    [] .ret_from_kernel_thread+0x58/0x64
    unreferenced object 0xc0000004737089f0 (size 16):
    comm "kwindfarm", pid 203, jiffies 4294880879 (age 5552.050s)
    hex dump (first 16 bytes):
    c4 04 01 7f 22 11 e0 e6 ff 55 7b 12 ec 11 00 00 ...."....U{.....
    backtrace:
    [] .smu_sat_get_sdb_partition+0xc4/0x2d0 [windfarm_smu_sat]
    [] .pm112_wf_notify+0x1294/0x13bc [windfarm_pm112]
    [] .notifier_call_chain+0xa8/0x180
    [] .blocking_notifier_call_chain+0x64/0x90
    [] .wf_thread_func+0x114/0x1a0
    [] .kthread+0x13c/0x190
    [] .ret_from_kernel_thread+0x58/0x64

    Fix it by rearranging the logic so we deal with each buffer
    separately, which then makes it easy to free the buffer once we're
    done with it.

    Fixes: ac171c46667c ("[PATCH] powerpc: Thermal control for dual core G5s")
    Cc: stable@vger.kernel.org # v2.6.16+
    Reported-by: Erhard F.
    Signed-off-by: Michael Ellerman
    Tested-by: Erhard F.
    Link: https://lore.kernel.org/r/20200423060038.3308530-1-mpe@ellerman.id.au

    Michael Ellerman
     

19 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    gnu gpl v2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 5 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Reviewed-by: Enrico Weigelt
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190602204655.013483115@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

28 Jan, 2018

1 commit


22 Aug, 2016

1 commit


10 Jan, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitconst,
    and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

09 Feb, 2010

1 commit


24 Apr, 2008

1 commit

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias
    is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable
    "macintosh" platform drivers, to re-enable auto loading.

    [dbrownell@users.sourceforge.net: registration fixes]
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Kay Sievers
     

16 Nov, 2006

1 commit

  • The windfarm code, in it's current incarnation, uses request_module() to
    load the various submodules it needs for a given platform so that only
    the main platform control module needs to be modprobed. However, it was
    missing various bits. This fixes it. In the future, we'll use some
    hotplug mecanisms to try to get all of this auto-loaded on the platforms
    where it matters but that isn't ready yet.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

10 Oct, 2006

1 commit


03 Mar, 2006

2 commits

  • This adds a couple of printk's to windfarm_pm112 to display which
    control loops are actually starting and fixes a bug where it would not
    start all loops.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • Some of the windfarm sensor modules can initialize on old machines that
    don't have full windfarm support like non-dual core desktop G5s.
    Unfortunately, by doing so, they would trigger a bug in their matching
    algorithm causing them to attach to the wrong bus, thus triggering
    issues with the i2c core and breaking the thermal driver.

    This patch fixes the probing issue (so that they will work when a
    windfarm port is done to these machines) and also prevents for now
    windfarm to load at all on these machines that still use therm_pm72 to
    avoid wasting resources.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

08 Feb, 2006

1 commit

  • This patch adds a windfarm module, windfarm_pm112, for the dual core G5s
    (both 2 and 4 core models), keeping the machine from getting into
    vacuum-cleaner mode ;) For proper credits, the patch was initially
    written by Paul Mackerras, and slightly reworked by me to add overtemp
    handling among others. The patch also removes the sysfs attributes from
    windfarm_pm81 and windfarm_pm91 and instead adds code to the windfarm
    core to automagically expose attributes for sensor & controls.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt