From: gsantosh@codeaurora.org
To: gsantosh@codeaurora.org, vinod.koul@intel.com, tiwai@suse.de
Cc: alsa-devel@alsa-project.org,
"Clemens Ladisch lgirdwood@gmail.com" <clemens@ladisch.de>
Subject: Re: Question on compress offload framework memory corruption
Date: Thu, 19 Dec 2013 07:59:30 -0000 [thread overview]
Message-ID: <2d386ff31eb7fc2d7ae36a4d49e48b03.squirrel@www.codeaurora.org> (raw)
In-Reply-To: <63ac7c9c1f4ac8d8ef0ed9587fd1cf5f.squirrel@www.codeaurora.org>
Re sending this as i did not got the response.
--Santosh
> Hi,
>
> I have following questions in the compressed offload framework API.
>
> static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
> struct snd_compr_params *params)
> {
> ...
> hw_params = kzalloc(sizeof(*hw_params), GFP_KERNEL);
> if (hw_params == NULL)
> return -ENOMEM;
> /*1st question is, what is the use of above allocated memory I do not see
> this being used in this function*/
>
> ...
>
> memcpy(&fe->dpcm[fe_substream->stream].hw_params, params,
> sizeof(struct snd_pcm_hw_params));
>
> /* 2nd question is
> in above memcpy there is parameter mismatch
> &fe->dpcm[fe_substream->stream].hw_params is of structure type struct
> snd_pcm_hw_params
>
> params argument is of the structure type struct snd_compr_params
> the definition of the two structures are different, how this is working?
> this will over right the destination with junk value which will return
> in error when this memory is accessed, after memcpy this cpu_dai hw_params
> returing with EINVAL error, please explain why this is done this way.
> */
>
> ...
>
> }
>
> Regards,
> Santosh M G.
>
>
>
next prev parent reply other threads:[~2013-12-19 7:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 13:17 Question on compress offload framework memory corruption gsantosh
2013-12-19 7:59 ` gsantosh [this message]
2013-12-19 10:42 ` Clemens Ladisch
2013-12-19 10:55 ` Mark Brown
2014-01-05 14:04 ` Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2014-03-04 22:19 Banajit Goswami
2014-03-05 7:51 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d386ff31eb7fc2d7ae36a4d49e48b03.squirrel@www.codeaurora.org \
--to=gsantosh@codeaurora.org \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=tiwai@suse.de \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.