Re: [Cocci] [PATCH v1] console: fix an issue about ioremap leak.

2020-04-23 Thread Markus Elfring
> if do_take_over_console() return an error in the newport_probe(),
> due to the io virtual address is not released, it will cause a leak.

How do you think about a wording variant like the following?

   Subject:
   [PATCH v2] console: Complete exception handling in newport_probe()

   Change description:
   A call of the function “do_take_over_console” can fail here.
   The corresponding system resources were not released then.
   Thus add a call of the function “iounmap” together with the check
   of a failure predicate.


I would like to point out that there is a script for the semantic
patch language which would detect other questionable source code.
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/scripts/coccinelle/free/iounmap.cocci

How do you think about to extend presented software analysis approaches?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] console: Complete exception handling in newport_probe()

2020-04-23 Thread Markus Elfring
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/scripts/coccinelle/free/iounmap.cocci
>>
>> How do you think about to extend presented software analysis approaches?
>>
> Sorry, I am not familiar with it, I don't know.

Do you find the comments helpful at the beginning of this SmPL script?

Would you like to let any more source code analysis tools help you
to find remaining update candidates?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] console: Complete exception handling in newport_probe()

2020-04-23 Thread Markus Elfring
> Please note you are responding to someone who many kernel maintainers,
> myself included, have on their blacklist

You configured your communication filters for some reasons in this way.


> as they are totally unhelpful.

The development views can vary also around my software contributions.
It seems to happen often enough that specific suggestions get accepted
from my selection of change possibilities.


> Please feel free to ignore them like the rest of us do.

This is generally also possible.

But I hope still that our discussions can become more constructive again.

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] console: Complete exception handling in newport_probe()

2020-04-23 Thread Markus Elfring
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/scripts/coccinelle/free/iounmap.cocci
…
> Sorry, I do not know how to use the SmPL script.

I proposed to take another look at the header of such a file.
I imagine that provided information can trigger further development ideas
for the continuation of a constructive patch review.


>> Would you like to let any more source code analysis tools help you
>> to find remaining update candidates?
>>
> yes, but I think the source code analysis tools only can found the simple
> repetitive issue.

I suggest to reconsider this view.


> and need spend some time learning to use it.

This approach can be usual.


> at different stages, it should have different methods for me.

I hope so.


> now, I think the best for me may be that read and check the source code.

This can be also usual for a while.

I am curious how much special tools can make your software developments
more convenient and safe over time.

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] console: Complete exception handling in newport_probe()

2020-04-23 Thread Greg Kroah-Hartman
On Fri, Apr 24, 2020 at 01:02:45AM +0800, Dejin Zheng wrote:
> On Thu, Apr 23, 2020 at 05:23:29PM +0200, Markus Elfring wrote:
> > >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/scripts/coccinelle/free/iounmap.cocci
> > >>
> > >> How do you think about to extend presented software analysis approaches?
> > >>
> > > Sorry, I am not familiar with it, I don't know.
> > 
> > Do you find the comments helpful at the beginning of this SmPL script?
> >
> Sorry, I do not know how to use the SmPL script. 



Please note you are responding to someone who many kernel maintainers,
myself included, have on their blacklist as they are totally unhelpful.
Please feel free to ignore them like the rest of us do.

greg k-h
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci