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] [day] [month] [year] [list]
Message-ID: <1314186369.24121.8.camel@twins>
Date:	Wed, 24 Aug 2011 13:46:09 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Don Zickus <dzickus@...hat.com>
Cc:	x86@...nel.org, Andi Kleen <andi@...stfloor.org>,
	Robert Richter <robert.richter@....com>, ying.huang@...el.com,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [V2][PATCH 2/6] x86, nmi: create new NMI handler routines

On Tue, 2011-08-23 at 17:11 -0400, Don Zickus wrote:
> +int register_nmi_handler(unsigned int type, nmi_handler_t handler,
> +                       unsigned long nmiflags, const char *devname)
> +{
> +       struct nmiaction *action;
> +       int retval;
> +
> +       if (!handler)
> +               return -EINVAL;
> +
> +       action = kzalloc(sizeof(struct nmiaction), GFP_KERNEL);
> +       if (!action)
> +               return -ENOMEM;
> +
> +       action->handler = handler;
> +       action->flags = nmiflags;
> +       action->name = kstrndup(devname, NMI_MAX_NAMELEN, GFP_KERNEL);
> +
> +       retval = __setup_nmi(type, action);
> +
> +       if (retval)
> +               kfree(action);

you just leaked your kstrndup().

> +       
> +       return retval;
> +} 
--
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