ソースを参照

msm: synx: Fixes null pointer dereference in handle import

Fixes null pointer access during global handle allocation failure
while importing local handle as global.

Change-Id: I4f644af86151d8599e3ad51d82fbf6e7db4aca41
Signed-off-by: Priyanko Sarkar <[email protected]>
Priyanko Sarkar 7 ヶ月 前
コミット
014456b1ed
1 ファイル変更2 行追加2 行削除
  1. 2 2
      msm/synx/synx.c

+ 2 - 2
msm/synx/synx.c

@@ -1725,8 +1725,8 @@ static int synx_native_import_handle(struct synx_client *client,
 						old_entry);
 	}
 
-	if (rc != SYNX_SUCCESS)
-		return rc;
+	if (IS_ERR_OR_NULL(map_entry))
+		return -SYNX_INVALID;
 
 	*params->new_h_synx = h_synx;