Skip to content

Commit

Permalink
staging/lustre/ldlm: fix NULL pointer dereference
Browse files Browse the repository at this point in the history
Pointer '*exp' returned from call to function 'class_conn2export'
at line 523 may be NULL and may be dereferenced at line 543.

Signed-off-by: Dmitry Eremin <[email protected]>
Reviewed-on: http://review.whamcloud.com/9323
ntel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-by: John L. Hammond <[email protected]>
Reviewed-by: James Simmons <[email protected]>
Signed-off-by: Oleg Drokin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Dmitry Eremin authored and gregkh committed Apr 27, 2014
1 parent a700f97 commit f85065e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ int client_connect_import(const struct lu_env *env,
LASSERT (imp->imp_state == LUSTRE_IMP_DISCON);
GOTO(out_ldlm, rc);
}
LASSERT((*exp)->exp_connection);
LASSERT(*exp != NULL && (*exp)->exp_connection);

if (data) {
LASSERTF((ocd->ocd_connect_flags & data->ocd_connect_flags) ==
Expand Down

0 comments on commit f85065e

Please sign in to comment.