lkml.org 
[lkml]   [2013]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] ipmi: replace call to try_smi_init() with call to add_smi()
    Upstream commit 9e368fa0 added function ipmi_pnp_probe(), which
    calls try_smi_init() directly.

    try_smi_init() allocates resources for IPMI driver. However
    try_smi_init() can be called again, and the allocated resources
    can be unexpectedly released when the same IPMI resource
    information is found on both ACPI namespace and SMBIOS table.
    ipmi_pnp_probe() should call add_smi() instead of try_smi_init()

    For reference, see upstream commit ...
    2407d77a1a013b88ee3b817f2b934e420e5376f5

    Signed-off-by: Tony Camuso <tcamuso@redhat.com>

    ---
    drivers/char/ipmi/ipmi_si_intf.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
    index afb89be..20d13c6 100644
    --- a/drivers/char/ipmi/ipmi_si_intf.c
    +++ b/drivers/char/ipmi/ipmi_si_intf.c
    @@ -2223,7 +2223,7 @@ static int __devinit ipmi_pnp_probe(struct pnp_dev *dev,
    info->dev = &dev->dev;
    pnp_set_drvdata(dev, info);

    - return try_smi_init(info);
    + return add_smi(info);

    err_free:
    kfree(info);
    --
    1.7.1

    \
     
     \ /
      Last update: 2013-01-08 21:41    [W:2.665 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site