14 Dec, 2017

3 commits

  • commit 0631fb8b027f5968c2f5031f0b3ff7be3e4bebcc upstream.

    The driver exit function needs to unregister both platform device and
    driver. Also, during registration, register driver first and perform
    error checks.

    Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver")
    Signed-off-by: Guenter Roeck
    Tested-by: Randy Dunlap
    Reviewed-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     
  • commit e4b28b3c3a405b251fa25db58abe1512814a680a upstream.

    It doesn't make sense to have /sys/firmware/vpd if the device is not
    instantiated, so tie its lifetime to the device.

    Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver")
    Signed-off-by: Guenter Roeck
    Reviewed-by: Dmitry Torokhov
    Tested-by: Randy Dunlap
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     
  • commit 811d7e0215fb738fb9a9f0bcb1276516ad161ed1 upstream.

    vpd sections are initialized during probe and thus should be destroyed
    in the remove function.

    Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver")
    Signed-off-by: Guenter Roeck
    Reviewed-by: Dmitry Torokhov
    Tested-by: Randy Dunlap
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     

28 Aug, 2017

1 commit


12 Jun, 2017

1 commit


27 May, 2017

1 commit


25 May, 2017

7 commits


18 May, 2017

1 commit

  • This patch fixes several issues:
    - if the 1st 'kzalloc' fails, we dereference a NULL pointer
    - if the 2nd 'kzalloc' fails, there is a memory leak
    - if 'sysfs_create_bin_file' fails there is also a memory leak

    Fix it by adding a test after the first memory allocation and some error
    handling paths to correctly free memory if needed.

    Signed-off-by: Christophe JAILLET
    Signed-off-by: Greg Kroah-Hartman

    Christophe JAILLET
     

27 Apr, 2017

1 commit


19 Apr, 2017

1 commit

  • This patch introduces the Google Vital Product Data driver.

    This driver reads Vital Product Data from coreboot tables and then
    creates the corresponding sysfs entries under /sys/firmware/vpd to
    provide easy access for userspace programs (does not require flashrom).

    The sysfs is structured as follow:

    /sys/firmware/vpd
    |-- ro
    | |-- key1
    | `-- key2
    |-- ro_raw
    |-- rw
    | `-- key1
    `-- rw_raw

    Where ro_raw and rw_raw contain the raw VPD partition. The files under
    ro and rw correspond to the key name in the VPD and the the file content
    is the value for the key.

    Signed-off-by: Wei-Ning Huang
    Signed-off-by: Thierry Escande
    Signed-off-by: Greg Kroah-Hartman

    Wei-Ning Huang