Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1171152 > unrolled thread

Re: [PATCH] crypto-jitterentropy: Delete unnecessary checks before the function call "kzfree"

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2015-06-24 09:50 +0200
Last post2015-06-24 11:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] crypto-jitterentropy: Delete unnecessary checks before  the function call "kzfree" Dan Carpenter <dan.carpenter@oracle.com> - 2015-06-24 09:50 +0200
    Re: [PATCH] crypto-jitterentropy: Delete unnecessary checks before the function call "kzfree" Stephan Mueller <smueller@chronox.de> - 2015-06-24 10:00 +0200
      Re: [PATCH] crypto-jitterentropy: Delete unnecessary checks before  the function call "kzfree" Dan Carpenter <dan.carpenter@oracle.com> - 2015-06-24 11:20 +0200

#1171152 — Re: [PATCH] crypto-jitterentropy: Delete unnecessary checks before the function call "kzfree"

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-06-24 09:50 +0200
SubjectRe: [PATCH] crypto-jitterentropy: Delete unnecessary checks before the function call "kzfree"
Message-ID<pENBw-3q6-5@gated-at.bofh.it>
The other NULL assignment isn't useful either.  Also If
"entropy_collector" is NULL then we would oops calling
kzfree(entropy_collector->mem);
       ^^^^^^^^^^^^^^^^^^^^^^
Dereference.

I don't understand the patch that you sent.  We shouldn't be introducing
jent_zalloc() or jent_zfree().  Why are you adding abstractions there?
Quite bad ones as well.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1171159 — Re: [PATCH] crypto-jitterentropy: Delete unnecessary checks before the function call "kzfree"

FromStephan Mueller <smueller@chronox.de>
Date2015-06-24 10:00 +0200
SubjectRe: [PATCH] crypto-jitterentropy: Delete unnecessary checks before the function call "kzfree"
Message-ID<pENLd-3Bl-13@gated-at.bofh.it>
In reply to#1171152
Am Mittwoch, 24. Juni 2015, 10:48:19 schrieb Dan Carpenter:

Hi Dan,

>The other NULL assignment isn't useful either.  Also If
>"entropy_collector" is NULL then we would oops calling
>kzfree(entropy_collector->mem);
>       ^^^^^^^^^^^^^^^^^^^^^^
>Dereference.
>
>I don't understand the patch that you sent.  We shouldn't be introducing
>jent_zalloc() or jent_zfree().  Why are you adding abstractions there?

The one C file should have no dependencies on any kernel header files. Thus, 
all links to kernel functions are wrapped.

>Quite bad ones as well.

What would you suggest to change?

Thanks.

Ciao
Stephan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1171224

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-06-24 11:20 +0200
Message-ID<pEP0D-5yL-27@gated-at.bofh.it>
In reply to#1171159
Ah.  I should have read the whole thread.  I sort of assumed we were
just adding abstractions for the fun of it (because I have worked in
staging for too long).

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web