13 Jan, 2012

1 commit


25 Nov, 2010

1 commit

  • While running randconfg with ktest.pl I stumbled upon this bug:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000003
    IP: [] strstr+0x39/0x86
    PGD 0
    Oops: 0000 [#1] SMP
    last sysfs file:
    CPU 0
    Modules linked in:

    Pid: 1, comm: swapper Not tainted 2.6.37-rc1-test+ #6 DG965MQ/
    RIP: 0010:[] [] strstr+0x39/0x86
    RSP: 0018:ffff8800797cbd80 EFLAGS: 00010213
    RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffffffffffff
    RDX: 0000000000000000 RSI: ffffffff82eb7ac9 RDI: 0000000000000003
    RBP: ffff8800797cbda0 R08: ffff880000000003 R09: 0000000000030725
    R10: ffff88007d294c00 R11: 0000000000014c00 R12: 0000000000000020
    R13: ffffffff82eb7ac9 R14: ffffffffffffffff R15: ffffffff82eb7b08
    FS: 0000000000000000(0000) GS:ffff88007d200000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000000003 CR3: 0000000002a1d000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process swapper (pid: 1, threadinfo ffff8800797ca000, task ffff8800797d0000)
    Stack:
    00000000000000ba ffffffff82eb7ac9 ffffffff82eb7ab8 00000000000000ba
    ffff8800797cbdf0 ffffffff81e2050f ffff8800797cbdc0 00000000815f913b
    ffff8800797cbe00 ffffffff82eb7ab8 0000000000000000 0000000000000000
    Call Trace:
    [] dmi_matches+0x117/0x154
    [] dmi_check_system+0x3d/0x8d
    [] ? nas_gpio_init+0x0/0x2c8
    [] nas_gpio_init+0x24/0x2c8
    [] ? wm8350_led_init+0x0/0x20
    [] ? nas_gpio_init+0x0/0x2c8
    [] do_one_initcall+0xab/0x1b2
    [] kernel_init+0x248/0x331
    [] kernel_thread_helper+0x4/0x10
    [] ? kernel_init+0x0/0x331

    Found that the nas_led_whitelist dmi_system_id structure array had no
    NULL end delimiter, causing the dmi_check_system() loop to read an
    undefined entry.

    Signed-off-by: Steven Rostedt
    Acked-by: Dave Hansen
    Acked-by: Richard Purdie
    Acked-by: Arjan van de Ven
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     

26 May, 2010

1 commit

  • In current implementation, if device_create_file failed in register_nasgpio_led,
    led_classdev_unregister will be executed twice.
    ( in register_nasgpio_led it calls led_classdev_unregister before return and in nas_gpio_init out_err )

    This patch fixes it by only unregistering those that were successfully registered in out_err.
    ( not including last failed register_nasgpio_led call )

    Signed-off-by: Axel Lin
    Acked-by: Dave Hansen
    Signed-off-by: Richard Purdie

    Axel Lin
     

17 Mar, 2010

1 commit

  • The id_table field of the struct pci_driver is constant in
    so it is worth to make pci_device_id also constant.

    The semantic match that finds this kind of pattern is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    disable decl_init,const_decl_init;
    identifier I1, I2, x;
    @@
    struct I1 {
    ...
    const struct I2 *x;
    ...
    };
    @s@
    identifier r.I1, y;
    identifier r.x, E;
    @@
    struct I1 y = {
    .x = E,
    };
    @c@
    identifier r.I2;
    identifier s.E;
    @@
    const struct I2 E[] = ... ;
    @depends on !c@
    identifier r.I2;
    identifier s.E;
    @@
    + const
    struct I2 E[] = ...;
    //

    Signed-off-by: Márton Németh
    Signed-off-by: Richard Purdie

    Márton Németh
     

17 Dec, 2009

1 commit


16 Dec, 2009

2 commits

  • pci_enable_result is defined using the __must_check macro but
    leds-ss4200 is not checking the return value.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Dave Hansen
    Signed-off-by: Richard Purdie

    Dave Hansen
     
  • This code is based on a driver that came in the "Open-source
    and GPL components" download here:

    http://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProductFamily=Server+Products&ProductLine=Intel%C2%AE+Storage+Systems&ProductProduct=Intel%C2%AE+Entry+Storage+System+SS4200-E&OSVersion=OS+Independent

    It was in a file called nasgpio.c inside of a second zip file
    called SS4200-E_Linux_SIO_Driver-v1.4.zip and is based on this
    updated to use the LED subsystem with the ioctl and hardware
    monitor support removed.

    I don't have any need for brightness
    control, and its code is *completely* separate from the on/off
    controls implemented here. If anyone else wants it, I'd be
    happy to look into adding it, but I don't care enough for now.

    Except for the probe routines, I rewrote most of it. I also
    Note that I don't have any hardware documentation except for
    the original driver.

    Thanks go to Arjan for his help in getting the original source
    for this released and for chasing down some licensing issues.

    Signed-off-by: Dave Hansen
    Signed-off-by: Richard Purdie

    Dave Hansen