* [PATCHv2] misc: cxl: delete possible null pointer dereference
@ 2018-10-04 2:56 zhong jiang
2018-10-04 4:38 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: zhong jiang @ 2018-10-04 2:56 UTC (permalink / raw)
To: gregkh; +Cc: andrew.donnellan, fbarrat, linux-kernel
It is safe to dereference an object below a NULL test. For the sake
of debugging. Just delete the call of possible null pointer dereference.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
drivers/misc/cxl/guest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
index 3bc0c15..472e8db 100644
--- a/drivers/misc/cxl/guest.c
+++ b/drivers/misc/cxl/guest.c
@@ -1018,7 +1018,7 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
void cxl_guest_remove_afu(struct cxl_afu *afu)
{
- pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
+ pr_devel("in %s\n", __func__);
if (!afu)
return;
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv2] misc: cxl: delete possible null pointer dereference
2018-10-04 2:56 [PATCHv2] misc: cxl: delete possible null pointer dereference zhong jiang
@ 2018-10-04 4:38 ` Greg KH
2018-10-04 4:58 ` zhong jiang
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2018-10-04 4:38 UTC (permalink / raw)
To: zhong jiang; +Cc: andrew.donnellan, fbarrat, linux-kernel
On Thu, Oct 04, 2018 at 10:56:48AM +0800, zhong jiang wrote:
> It is safe to dereference an object below a NULL test. For the sake
> of debugging. Just delete the call of possible null pointer dereference.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
> drivers/misc/cxl/guest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> index 3bc0c15..472e8db 100644
> --- a/drivers/misc/cxl/guest.c
> +++ b/drivers/misc/cxl/guest.c
> @@ -1018,7 +1018,7 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
>
> void cxl_guest_remove_afu(struct cxl_afu *afu)
> {
> - pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
> + pr_devel("in %s\n", __func__);
This call should just be deleted, it's not needed, ftrace can be used
instead.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCHv2] misc: cxl: delete possible null pointer dereference
2018-10-04 4:38 ` Greg KH
@ 2018-10-04 4:58 ` zhong jiang
0 siblings, 0 replies; 3+ messages in thread
From: zhong jiang @ 2018-10-04 4:58 UTC (permalink / raw)
To: Greg KH; +Cc: andrew.donnellan, fbarrat, linux-kernel
On 2018/10/4 12:38, Greg KH wrote:
> On Thu, Oct 04, 2018 at 10:56:48AM +0800, zhong jiang wrote:
>> It is safe to dereference an object below a NULL test. For the sake
>> of debugging. Just delete the call of possible null pointer dereference.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>> drivers/misc/cxl/guest.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
>> index 3bc0c15..472e8db 100644
>> --- a/drivers/misc/cxl/guest.c
>> +++ b/drivers/misc/cxl/guest.c
>> @@ -1018,7 +1018,7 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
>>
>> void cxl_guest_remove_afu(struct cxl_afu *afu)
>> {
>> - pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
>> + pr_devel("in %s\n", __func__);
> This call should just be deleted, it's not needed, ftrace can be used
> instead.
Fine. Will do.
Sincerely,
zhong jiang
> thanks,
>
> greg k-h
>
> .
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-04 4:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 2:56 [PATCHv2] misc: cxl: delete possible null pointer dereference zhong jiang
2018-10-04 4:38 ` Greg KH
2018-10-04 4:58 ` zhong jiang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.