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]
Message-ID: <f3b3d90b-6504-328e-c9f4-a3b3f085d9dc@codeaurora.org>
Date:   Fri, 4 May 2018 12:41:56 +0530
From:   Rohit Kumar <rohitkr@...eaurora.org>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        andy.gross@...aro.org, broonie@...nel.org,
        linux-arm-msm@...r.kernel.org, alsa-devel@...a-project.org,
        robh+dt@...nel.org, bgoswami@...eaurora.org
Cc:     mark.rutland@....com, devicetree@...r.kernel.org,
        rohkumar@....qualcomm.com, gregkh@...uxfoundation.org,
        plai@...eaurora.org, tiwai@...e.com, lgirdwood@...il.com,
        david.brown@...aro.org, linux-arm-kernel@...ts.infradead.org,
        spatakok@....qualcomm.com, linux-kernel@...r.kernel.org
Subject: Re: [alsa-devel] [PATCH v7 16/24] ASoC: qdsp6: q6asm: Add support to
 audio stream apis



On 5/1/2018 5:38 PM, Srinivas Kandagatla wrote:
> +static int __q6asm_run(struct audio_client *ac, uint32_t flags,
> +	      uint32_t msw_ts, uint32_t lsw_ts, bool wait)
> +{
> +	struct asm_session_cmd_run_v2 *run;
> +	struct apr_pkt *pkt;
> +	int pkt_size, rc;
> +	void *p;
> +
> +	pkt_size = APR_HDR_SIZE + sizeof(*run);
> +	p = kzalloc(pkt_size, GFP_KERNEL);
Should be GFP_ATOMIC as this API is also called from interrupt context
> +	if (!p)
> +		return -ENOMEM;
> +
[..]
> +int q6asm_read(struct audio_client *ac)
> +{
> +	struct asm_data_cmd_read_v2 *read;
> +	struct audio_port_data *port;
> +	struct audio_buffer *ab;
> +	struct apr_pkt *pkt;
> +	int pkt_size;
> +	int rc = 0;
> +	void *p;
> +
> +	if (!(ac->io_mode & ASM_SYNC_IO_MODE))
> +		return 0;
> +
> +	pkt_size = APR_HDR_SIZE + sizeof(*read);
> +	p = kzalloc(pkt_size, GFP_KERNEL);
same here. GFP_ATOMIC
> +	if (!p)
> +		return -ENOMEM;
[..]
> +int q6asm_write_async(struct audio_client *ac, uint32_t len, uint32_t msw_ts,
> +		       uint32_t lsw_ts, uint32_t flags)
> +{
> +	struct asm_data_cmd_write_v2 *write;
> +	struct audio_port_data *port;
> +	struct audio_buffer *ab;
> +	struct apr_pkt *pkt;
> +	int pkt_size;
> +	int rc = 0;
> +	void *p;
> +
> +	pkt_size = APR_HDR_SIZE + sizeof(*write);
> +	p = kzalloc(pkt_size, GFP_KERNEL);
GFP_ATOMIC
> +	if (!p)
> +		return -ENOMEM;
>
Thanks,
Rohit

-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ