Hi Omar,
On Thu, 2010-12-09 at 23:47 +0200, Ionut Nicu wrote:
> Reorganized some code in rmgr/node.c to increase its
> readability. Most of the changes reduce the code
> indentation level and simplifiy the code. No functional
> changes were done.
<snip>
> /*
> * Check stream mode. Default is STRMMODE_PROCCOPY.
> */
> - if (!status && pattrs) {
> - if (pattrs->strm_mode != STRMMODE_PROCCOPY)
> - status = -EPERM; /* illegal stream mode */
> -
> - }
> - if (status)
> - goto func_end;
> + if (pattrs && pattrs->strm_mode != STRMMODE_PROCCOPY)
> + return -EPERM; /* illegal stream mode */
>
While cleaning up and reviewing the code I saw this check, which unless
it's intentional I think it looks like a bug. See comment below.
<snip>
> + strm_mode = pattrs ? pattrs->strm_mode : STRMMODE_PROCCOPY;
> + switch (strm_mode) {
> + case STRMMODE_RDMA:
...
> +
> + case STRMMODE_ZEROCOPY:
...
> + case STRMMODE_PROCCOPY:
It looks like all modes are handled here although the only one that
could escape the validation from above is STRMMODE_PROCCOPY.
I tried removing the first check and tested with the
userspace-dspbridge strmcopy application, but I noticed the DSP hangs if
I try to use it with anything else than the copy mode.
Are the other modes (rdma, zerocopy) not supported at all?
Thanks,
Ionut.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html