lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Mar 2013 07:35:48 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Zhang Yanfei <zhangyanfei@...fujitsu.com>
Cc:	Vlad Yasevich <vyasevich@...il.com>,
	Sridhar Samudrala <sri@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-sctp@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 18/18] net: sctp: remove cast for kmalloc/kzalloc return
 value

On Tue, Mar 12, 2013 at 01:39:47PM +0800, Zhang Yanfei wrote:
> remove cast for kmalloc/kzalloc return value.
> 
> Signed-off-by: Zhang Yanfei <zhangyanfei@...fujitsu.com>
> Cc: Vlad Yasevich <vyasevich@...il.com>
> Cc: Sridhar Samudrala <sri@...ibm.com>
> Cc: Neil Horman <nhorman@...driver.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: linux-sctp@...r.kernel.org
> ---
>  include/net/sctp/sctp.h |    2 +-
>  net/sctp/protocol.c     |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
> index df85a0c..cd89510 100644
> --- a/include/net/sctp/sctp.h
> +++ b/include/net/sctp/sctp.h
> @@ -576,7 +576,7 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\
>  #define WORD_ROUND(s) (((s)+3)&~3)
>  
>  /* Make a new instance of type.  */
> -#define t_new(type, flags)	(type *)kzalloc(sizeof(type), flags)
> +#define t_new(type, flags)	kzalloc(sizeof(type), flags)
>  
>  /* Compare two timevals.  */
>  #define tv_lt(s, t) \
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 1c2e46c..eaee00c 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1403,7 +1403,7 @@ SCTP_STATIC __init int sctp_init(void)
>  
>  	/* Allocate and initialize the endpoint hash table.  */
>  	sctp_ep_hashsize = 64;
> -	sctp_ep_hashtable = (struct sctp_hashbucket *)
> +	sctp_ep_hashtable =
>  		kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL);
>  	if (!sctp_ep_hashtable) {
>  		pr_err("Failed endpoint_hash alloc\n");
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Acked-by: Neil Horman <nhorman@...driver.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ