Vasundhara Volam
a60faa60da
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: 3ebf6f0a09 ("bnxt_en: Add installed-package firmware version reporting via Ethtool GDRVINFO")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com >
Signed-off-by: Michael Chan <michael.chan@broadcom.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2018-04-19 16:35:09 -04:00
..
2018-01-03 13:44:14 -05:00
2018-04-03 14:04:18 -07:00
2017-01-29 19:04:11 -05:00
2017-11-02 11:10:55 +01:00
2017-11-21 15:57:07 -08:00
2017-11-04 09:26:51 +09:00
2017-06-16 11:48:39 -04:00
2017-12-15 13:28:30 -05:00
2018-03-26 12:07:49 -04:00
2018-03-26 12:47:56 -04:00
2018-03-26 12:07:49 -04:00
2017-09-05 14:58:25 -07:00
2018-02-28 12:00:27 -05:00
2018-04-11 10:41:36 -04:00
2018-03-20 12:06:23 -04:00
2017-11-21 15:57:07 -08:00
2017-11-02 11:10:55 +01:00
2018-04-19 16:35:09 -04:00
2018-03-26 12:07:49 -04:00
2018-04-07 13:31:23 -07:00
2017-01-30 15:10:42 -05:00
2018-04-09 10:59:38 -04:00
2018-03-31 23:37:32 -04:00
2018-03-01 21:21:36 -05:00
2018-03-16 09:50:40 -04:00
2018-03-20 12:08:45 -04:00
2018-03-26 15:55:57 +02:00
2017-11-04 09:26:51 +09:00
2017-11-02 15:52:19 +09:00
2018-03-26 12:07:49 -04:00
2017-04-06 08:24:51 -07:00
2018-02-22 10:44:36 +08:00
2018-04-08 12:44:49 -04:00
2018-04-19 16:30:26 -04:00
2017-08-19 17:13:41 -07:00
2018-01-02 16:14:49 -06:00
2017-11-02 11:10:55 +01:00
2018-04-16 11:26:14 -04:00
2018-04-09 17:04:10 -07:00
2018-04-19 13:12:14 -04:00
2018-02-05 09:41:54 -08:00
2018-04-09 17:04:10 -07:00
2017-12-19 13:52:39 -05:00
2018-03-12 11:12:38 -04:00
2017-07-29 14:02:07 -07:00
2018-03-26 12:07:49 -04:00
2018-03-23 11:31:58 -04:00
2017-11-20 11:36:30 +09:00
2018-04-12 21:57:28 -04:00
2018-03-29 11:51:00 -04:00
2017-10-27 12:09:15 +09:00
2018-01-23 11:11:41 -05:00
2017-06-20 13:30:15 -04:00
2018-01-17 08:16:46 -06:00
2017-10-28 19:09:49 +09:00
2017-12-20 12:47:46 -05:00
2018-04-05 11:56:35 -07:00
2018-04-18 21:23:06 -04:00
2018-04-01 19:49:34 -04:00
2018-04-01 14:09:53 -04:00
2018-02-01 09:50:52 -05:00
2018-03-26 12:07:49 -04:00
2017-11-04 09:26:51 +09:00
2018-04-17 15:07:21 -04:00
2017-10-18 12:40:26 +01:00
2017-06-16 11:48:37 -04:00
2017-11-04 09:26:51 +09:00
2018-04-02 20:20:12 -07:00
2018-03-26 11:29:10 -04:00
2018-04-19 13:33:44 -04:00
2018-03-26 12:07:49 -04:00
2017-12-21 15:05:33 -05:00
2017-07-19 22:48:02 -07:00
2018-04-06 14:19:26 -07:00
2017-11-21 15:57:07 -08:00
2018-01-17 18:04:43 -06:00
2017-11-29 09:45:24 -05:00
2017-04-06 13:38:11 -07:00
2017-11-29 09:43:24 -05:00
2017-08-22 10:30:00 -07:00
2017-06-16 11:48:39 -04:00
2018-03-26 12:07:49 -04:00
2017-06-06 16:22:51 -04:00
2017-11-16 22:58:12 +09:00
2018-02-01 14:54:28 -05:00
2018-04-03 14:04:18 -07:00
2017-10-28 19:09:49 +09:00
2017-01-30 15:10:42 -05:00
2018-04-03 14:04:18 -07:00