Re: [Cocci] [PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()

2020-06-15 Thread Dan Carpenter
le kernels. > kfree(mem); > } > -EXPORT_SYMBOL(kzfree); > +EXPORT_SYMBOL(kfree_sensitive); > > /** > * ksize - get the actual amount of memory allocated for a given object regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH] coccinelle: api: add kzfree script

2020-06-15 Thread Dan Carpenter
er. Also I thought I saw somewhere that Linus doesn't like the name and so that's why we have the _sensitive() name? regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH] net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2019-11-21 Thread Dan Carpenter
nce > > for optimizations. > > Not in general. The (potential) problem here is that the structure has > padding and it is as a whole (i.e. including the padding) copied to > userspace. While I'm not aware of a compiler that wouldn't actually >

Re: drivers: Inline code in devm_platform_ioremap_resource() from two functions

2019-06-18 Thread Dan Carpenter
Greg already commented on this thread. No need to discuss it further. regards, dan carpenter

Re: [Cocci] [PATCH] coccinelle: put_device: reduce false positives

2019-03-26 Thread Dan Carpenter
On Tue, Mar 26, 2019 at 10:38:43AM +0100, Julia Lawall wrote: > > > On Tue, 26 Mar 2019, Dan Carpenter wrote: > > > On Sat, Mar 23, 2019 at 09:06:54PM +0100, Julia Lawall wrote: > > > > > > > > > On Sat, 23 Mar 2019, Markus Elfring wrote: >

Re: [Cocci] [PATCH] coccinelle: put_device: reduce false positives

2019-03-26 Thread Dan Carpenter
their behavior, not the bug finding > rules that they contain. The Fixes tag is not just about stable... For example, we use them for statistics to see how quickly bugs get fixed etc. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH] staging: rtl8723bs: Fix two possible sleep-in-atomic-context bugs in translate_scan()

2018-06-20 Thread Dan Carpenter
tatic checker warning which warns about using GFP_ATOMIC when it's supposed to be GFP_KERNEL. #milestone regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH] staging: rtl8723bs: Fix two possible sleep-in-atomic-context bugs in translate_scan()

2018-06-20 Thread Dan Carpenter
return start; Thanks! It occurs to me that another way to detect this bug is that one of the allocations in this function already uses GFP_ATOMIC. It doesn't normally make sense to mix GFP_ATOMIC and GFP_KERNEL when there isn't any locking in the function. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH] lib/test_kmod: Fix an integer overflow test

2018-02-24 Thread Dan Carpenter
On Sat, Feb 24, 2018 at 02:59:41AM +, Luis R. Rodriguez wrote: > On Mon, Jan 22, 2018 at 01:27:54PM +0300, Dan Carpenter wrote: > > The main problem is that the parentheses are in the wrong place and the > > unlikely() call returns either 0 or 1 so it's never less than zero. &

Re: [Cocci] [PATCH] scripts/coccinelle/misc/shift.cocci: detect < or > that should be a shift

2018-02-08 Thread Dan Carpenter
On Thu, Feb 08, 2018 at 02:58:56PM +0100, Julia Lawall wrote: > > > On Thu, 8 Feb 2018, Dan Carpenter wrote: > > > On Thu, Feb 08, 2018 at 01:53:54PM +0100, Julia Lawall wrote: > > > This checks for a comparison using < or > between two constants, > > >

Re: [Cocci] [PATCH] scripts/coccinelle/misc/shift.cocci: detect < or > that should be a shift

2018-02-08 Thread Dan Carpenter
bugs. On the other hand, two false positives are not a big deal. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH] coccinelle: reduce false positives

2018-02-01 Thread Dan Carpenter
easier way to do cross function analysis. I had wondered about that. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH] coccinelle: reduce false positives

2018-02-01 Thread Dan Carpenter
> That's surprising... Do you have an example false positive? regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [patch] CodingStyle: add some more error handling guidelines

2014-12-03 Thread Dan Carpenter
On Wed, Dec 03, 2014 at 01:31:19PM +0100, SF Markus Elfring wrote: * To which source code place should the word location refer to? - jump source - jump target jump target. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr

Re: [Cocci] [PATCH v2] fs-fat: Less function calls in fat_fill_super() after error detection

2014-12-01 Thread Dan Carpenter
should be based on the label location to say what the goto does. Something like err_put_fsinfo, err_put_fat, and err_unload or like that. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH v2] fs-fat: Less function calls in fat_fill_super() after error detection

2014-12-01 Thread Dan Carpenter
similarly to the jump target. That is a useless thing to do. It seems that there are a few variations used for the affected identifiers. There is a lot of crap code in the kernel, yes. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr

Re: [Cocci] [PATCH v2] fs-fat: Less function calls in fat_fill_super() after error detection

2014-11-30 Thread Dan Carpenter
to the label does. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] kernel-audit: Deletion of an unnecessary check before the function call audit_log_end

2014-11-24 Thread Dan Carpenter
: if (foo) kfree(foo); regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH 1/1] net: xfrm: Deletion of an unnecessary check before the function call ipcomp_free_tfms

2014-11-19 Thread Dan Carpenter
is not needed. It doesn't though... regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH 1/1] kernel-audit: Deletion of an unnecessary check before the function call audit_log_end

2014-11-17 Thread Dan Carpenter
topic s390/net: Deletion of unnecessary checks before two function calls? What do you want me to clarify? Do you still not see the bug? regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH v2 2/2] staging: rtl8188eu: Better memory clean-up in efuse_phymap_to_logical()

2014-11-12 Thread Dan Carpenter
or free_fuse_tabel. 2) Don't use do-nothing labels. Just return directly. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH v2 1/2] staging: rtl8188eu: Deletion of unnecessary checks before three function calls

2014-11-12 Thread Dan Carpenter
pointers. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] s390/net: Deletion of unnecessary checks before two function calls

2014-11-03 Thread Dan Carpenter
know it's fun to send automated patches but these make the code worse and they waste reviewer time. regards, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] s390/net: Deletion of unnecessary checks before two function calls

2014-11-03 Thread Dan Carpenter
, dan carpenter ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci