diff options
author | Vasundhara Volam <[email protected]> | 2018-04-19 03:16:16 -0400 |
---|---|---|
committer | David S. Miller <[email protected]> | 2018-04-19 16:35:09 -0400 |
commit | a60faa60da891e311e19fd3e88d611863f431130 (patch) | |
tree | 2c5c1171a5ef972cb5668b38bbafe038d06a3df6 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 0df8bb01cb38f5b835e2739a7f5ca0e954d79c90 (diff) |
bnxt_en: Fix memory fault in bnxt_ethtool_init()
In some firmware images, the length of BNX_DIR_TYPE_PKG_LOG nvram type
could be greater than the fixed buffer length of 4096 bytes allocated by
the driver. This was causing HWRM_NVM_READ to copy more data to the buffer
than the allocated size, causing general protection fault.
Fix the issue by allocating the exact buffer length returned by
HWRM_NVM_FIND_DIR_ENTRY, instead of 4096. Move the kzalloc() call
into the bnxt_get_pkgver() function.
Fixes: 3ebf6f0a09a2 ("bnxt_en: Add installed-package firmware version reporting via Ethtool GDRVINFO")
Signed-off-by: Vasundhara Volam <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions