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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 02 Mar 2015 11:29:07 +0100
From:	Oliver Neukum <oliver@...kum.org>
To:	Sebastian Reichel <sre@...nel.org>
Cc:	Peter Ujfalusi <peter.ujfalusi@...com>,
	Kai Vehmanen <kvcontact@...ignal.fi>,
	Pavel Machek <pavel@....cz>, Pali Rohar <pali.rohar@...il.com>,
	Aaro Koskinen <aaro.koskinen@....fi>,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-api@...r.kernel.org, Kai Vehmanen <kai.vehmanen@...ia.com>,
	Carlos Chinea <carlos.chinea@...ia.com>,
	Joni Lapilainen <joni.lapilainen@...il.com>
Subject: Re: [PATCH 1/9] HSI: cmt_speech: Add cmt-speech driver

On Mon, 2015-03-02 at 05:38 +0100, Sebastian Reichel wrote:
> +static int cs_alloc_cmds(struct cs_hsi_iface *hi)
> +{
> +       struct hsi_msg *msg;
> +       u32 *buf;
> +       unsigned int i;
> +
> +       INIT_LIST_HEAD(&hi->cmdqueue);
> +
> +       for (i = 0; i < CS_MAX_CMDS; i++) {
> +               msg = hsi_alloc_msg(1, GFP_ATOMIC);

Why does this need to be ATOMIC?
> +               if (!msg)
> +                       goto out;
> +               buf = kmalloc(sizeof(*buf), GFP_ATOMIC);
> +               if (!buf) {
> +                       hsi_free_msg(msg);
> +                       goto out;
> +               }
> +               sg_init_one(msg->sgt.sgl, buf, sizeof(*buf));
> +               msg->channel = CONTROL_HSI_CH;
> +               msg->context = hi;
> +               list_add_tail(&msg->link, &hi->cmdqueue);
> +       }
> +
> +       return 0;
> +
> +out:
> +       cs_free_cmds(hi);
> +       return -ENOMEM;
> +}
> +



--
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