diff options
author | Amir Shehata <amir.shehata@intel.com> | 2013-12-03 13:58:47 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-06 19:22:16 (GMT) |
commit | 226c54c6f7acb651d1d77635ffce0e9e6fccf7cb (patch) | |
tree | bbacdd61968c806e8594cea2b00e239e0d4ab8c6 /drivers/staging/rtl8712/usb_intf.c | |
parent | 9afc8978c96a9c8b21858e8b950efd492c1011ce (diff) | |
download | linux-fsl-qoriq-226c54c6f7acb651d1d77635ffce0e9e6fccf7cb.tar.xz |
staging/lustre/ptlrpc: Fix a crash when dereferencing NULL pointer
commit 3c92a0bf4d72737035a16c4fe357ccd439c9b7d2 upstream.
When a system runs out of memory and the function
ptlrpc_register_bulk() is called from ptl_send_rpc() the call to
LNetMEAttach() fails due to failure to allocate memory. This forces
the code into an error path, which most probably previously went
untested. The error path:
if (rc != 0) {
CERROR("%s: LNetMEAttach failed x"LPU64"/%d: rc = %dn",
desc->bd_export->exp_obd->obd_name, xid,
posted_md, rc);
break;
}
This print assumes that desc->bd_export is not NULL. However, it is.
In fact it is expected to be NULL. desc->bd_import is the correct
structure to access in this case.
Lustre-change: http://review.whamcloud.com/7121
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3585
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/usb_intf.c')
0 files changed, 0 insertions, 0 deletions