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:	Thu, 17 Nov 2011 11:00:23 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Jiri Pirko <jpirko@...hat.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	bhutchings@...arflare.com, shemminger@...tta.com,
	andy@...yhouse.net, fbl@...hat.com, jzupka@...hat.com,
	ivecera@...hat.com
Subject: Re: [patch net-next 3/3] team: replicate options on register

Le jeudi 17 novembre 2011 à 10:57 +0100, Jiri Pirko a écrit :
> Thu, Nov 17, 2011 at 09:32:16AM CET, eric.dumazet@...il.com wrote:
> >Le mercredi 16 novembre 2011 à 22:09 +0100, Jiri Pirko a écrit :
> >
> >> +
> >> +int team_options_register(struct team *team,
> >> +			  const struct team_option *option,
> >> +			  size_t option_count)
> >>  {
> >>  	int i;
> >> +	struct team_option *dst_opts[option_count];
> >> +	int err;
> >
> >This kind of construct will trigger static analyzer alerts...
> 
> 
> I thought this is ok to do in kernel. Should I replace that with
> kmalloc/kfree?

If you know the absolute limit of option_count, you could use

struct team_option *dst_opts[OPTION_COUNT_MAX];

If not, then a kmalloc()/kfree() is probably needed ;)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ