* Re: Re: [PATCH v3] serial: pch_uart: potential dereference of null pointer
@ 2021-12-16 15:05 Jiasheng Jiang
2021-12-16 15:24 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Jiasheng Jiang @ 2021-12-16 15:05 UTC (permalink / raw)
To: gregkh, jirislaby; +Cc: linux-serial, linux-kernel, Jiasheng Jiang
On Thu, Dec 16, 2021 at 10:36:35PM +0800, Greg KH wrote:
>> The return value of dma_alloc_coherent() needs to be checked.
>> To avoid dereference of null pointer in case of the failure of alloc.
>> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
>A blank line is always needed before the signed-off-by line.
>> ---
>> Changelog:
>>
>> v2 -> v3
>>
>> *Change 1. Remove dev_err.
>> *Change 2. Change the return type of pch_request_dma to int.
>> *Change 3. Return -ENOMEM when dma_alloc_coherent() failed and 0 the
>> others.
>> *Change 4. Check return value of dma_alloc_coherent().
>
> I see v3 here, not v4. Where is v4?
>
> And how did you test this change?
>
> thanks,
>
> greg k-h
Sorry, I just have v3, maybe that is my fault. But I don't know why you think there is v4.
And I have no idea about the "test this change"? Please give me more detail.
Sincerely thanks,
jiasheng jiang
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [PATCH v3] serial: pch_uart: potential dereference of null pointer
2021-12-16 15:05 Re: [PATCH v3] serial: pch_uart: potential dereference of null pointer Jiasheng Jiang
@ 2021-12-16 15:24 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2021-12-16 15:24 UTC (permalink / raw)
To: Jiasheng Jiang; +Cc: jirislaby, linux-serial, linux-kernel
On Thu, Dec 16, 2021 at 11:05:39PM +0800, Jiasheng Jiang wrote:
> On Thu, Dec 16, 2021 at 10:36:35PM +0800, Greg KH wrote:
> >> The return value of dma_alloc_coherent() needs to be checked.
> >> To avoid dereference of null pointer in case of the failure of alloc.
> >> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
>
> >A blank line is always needed before the signed-off-by line.
>
> >> ---
> >> Changelog:
> >>
> >> v2 -> v3
> >>
> >> *Change 1. Remove dev_err.
> >> *Change 2. Change the return type of pch_request_dma to int.
> >> *Change 3. Return -ENOMEM when dma_alloc_coherent() failed and 0 the
> >> others.
> >> *Change 4. Check return value of dma_alloc_coherent().
> >
> > I see v3 here, not v4. Where is v4?
> >
> > And how did you test this change?
> >
> > thanks,
> >
> > greg k-h
>
> Sorry, I just have v3, maybe that is my fault. But I don't know why you think there is v4.
You say "change 4". Am I confused?
> And I have no idea about the "test this change"? Please give me more detail.
Did you run the kernel before your change and then after your change to
ensure that the failure you saw before your change is now properly
fixed?
How did you test this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [PATCH v3] serial: pch_uart: potential dereference of null pointer
@ 2021-12-21 3:31 Jiasheng Jiang
0 siblings, 0 replies; 3+ messages in thread
From: Jiasheng Jiang @ 2021-12-21 3:31 UTC (permalink / raw)
To: gregkh, jirislaby; +Cc: linux-serial, linux-kernel, Jiasheng Jiang
On Mon, Dec 20, 2021 at 11:37:58AM +0800, Greg KH wrote:
> This patch is obviously not correct, and will cause problems if it were
> accepted.
>
> Please work on whatever tool you are using to find and make these
> changes, as it is not working properly.
>
> Or, if this was a manual change, please work on your kernel programming
> skills. There are a number of bugs in this proposed change, showing
> that it was not tested at all.
Sorry, I am not so familiar with the kernel and I really change the code manually.
Could you please tell me what's wrong with my patch with more details?
And I just find that I may forget to release the chan.
Is that all?
Or there are other bugs I need to deal with.
Sincerely thanks,
Jiasheng
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-21 3:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-16 15:05 Re: [PATCH v3] serial: pch_uart: potential dereference of null pointer Jiasheng Jiang
2021-12-16 15:24 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2021-12-21 3:31 Jiasheng Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox