Re: [PATCH] net: hns: dereference ppe_cb->ppe_common_cb if it is non-null

2016-08-26 Thread David Miller
From: Colin King 
Date: Thu, 25 Aug 2016 07:51:10 +0100

> From: Colin Ian King 
> 
> ppe_cb->ppe_common_cb is being dereferenced before a null check is
> being made on it.  If ppe_cb->ppe_common_cb is null then we end up
> with a null pointer dereference when assigning dsaf_dev.  Fix this
> by moving the initialisation of dsaf_dev once we know
> ppe_cb->ppe_common_cb is OK to dereference.
> 
> Signed-off-by: Colin Ian King 

Applied.


Re: [PATCH] net: hns: dereference ppe_cb->ppe_common_cb if it is non-null

2016-08-25 Thread Yisen Zhuang


在 2016/8/25 14:51, Colin King 写道:
> From: Colin Ian King 
> 
> ppe_cb->ppe_common_cb is being dereferenced before a null check is
> being made on it.  If ppe_cb->ppe_common_cb is null then we end up
> with a null pointer dereference when assigning dsaf_dev.  Fix this
> by moving the initialisation of dsaf_dev once we know
> ppe_cb->ppe_common_cb is OK to dereference.
> 
> Signed-off-by: Colin Ian King 

Acked-by: Yisen Zhuang