From: Dan Carpenter <dan.carpenter@oracle.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Nas Chung <nas.chung@chipsnmedia.com>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
mchehab@kernel.org
Subject: Re: [PATCH v9 0/6] staging: media: wave5: add wave5 codec driver
Date: Thu, 30 Jun 2022 14:22:57 +0300 [thread overview]
Message-ID: <20220630112257.GY16517@kadam> (raw)
In-Reply-To: <ff27a9a8-47b6-9a09-4409-8fcc9cd2a314@xs4all.nl>
On Wed, Jun 29, 2022 at 05:36:31PM +0200, Hans Verkuil wrote:
> drivers/staging/media/wave5/wave5-vpuapi.c:93 wave5_check_dec_open_param() warn: maybe use
> && instead of &
The warning is not clear but the bug looks real.
if (!(BIT(param->bitstream_mode) & p_attr->support_bitstream_mode))
return -EINVAL;
If this is really what you intended to write then it would be more
readable as:
if (!p_attr->support_bitstream_mode ||
param->bitstream_mode != BS_MODE_INTERRUPT)
return -EINVAL;
> drivers/staging/media/wave5/wave5-vpuapi.c:505 wave5_vpu_dec_get_output_info() warn:
> inconsistent indenting
Self explanatory.
> drivers/staging/media/wave5/wave5-vpu-dec.c:1357 wave5_vpu_open_dec() warn: '&inst->list'
> not removed from list
Use after free. Probably the fix is to not call
list_add_tail(&inst->list, &dev->instances) until everything succeeds.
The others are hopefully self explanatory.
regards,
dan carpenter
prev parent reply other threads:[~2022-06-30 11:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 11:08 [PATCH v9 0/6] staging: media: wave5: add wave5 codec driver Nas Chung
2022-06-28 11:08 ` [PATCH v9 1/6] staging: media: wave5: Add vpuapi layer Nas Chung
2022-06-28 11:08 ` [PATCH v9 2/6] staging: media: wave5: Add the vdi layer Nas Chung
2022-06-29 16:58 ` Ezequiel Garcia
2022-06-28 11:08 ` [PATCH v9 3/6] staging: media: wave5: Add the v4l2 layer Nas Chung
2022-06-28 11:08 ` [PATCH v9 4/6] staging: media: wave5: Add TODO file Nas Chung
2022-06-28 11:08 ` [PATCH v9 5/6] dt-bindings: media: staging: wave5: add yaml devicetree bindings Nas Chung
2022-06-28 11:08 ` [PATCH v9 6/6] media: wave5: Add wave5 driver to maintainers file Nas Chung
2022-06-29 15:36 ` [PATCH v9 0/6] staging: media: wave5: add wave5 codec driver Hans Verkuil
2022-06-30 11:22 ` Dan Carpenter [this message]
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=20220630112257.GY16517@kadam \
--to=dan.carpenter@oracle.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=nas.chung@chipsnmedia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox