格式我稍微调整了一下,你可以参照这个再重发一下。
bugzilla: https://gitee.com/openeuler/kernel/issues/I4HDHZ 这个链接,你新提一个 issue,更新到 patch 中。
On 2022/3/18 19:57, yan wrote:
已跟据意见修改patch
From 7f34ecc037b95102f44a5f4ece1a265e3e040409 Mon Sep 17 00:00:00 2001 From: Yan Lei yan_lei@dahuatech.com Date: Sun, 20 Mar 2022 15:49:47 +0800 Subject: [PATCH openEuler-22.03-LTS v2] media: v4l2: fix uninitialized value tuner_status
dahua inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4HDHZ CVE: NA
-------------------------------------------------
Declaring variable "tuner_status" without initializer. Using uninitialized value "tuner_status" when calling "*fe_tuner_ops->get_status". (The function pointer resolves to "cx24113_get_status".)
Signed-off-by: Yan Lei yan_lei@dahuatech.com --- drivers/media/v4l2-core/tuner-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index 12d1e0c33c3c..15bcde42cae7 100644 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c @@ -1118,7 +1118,7 @@ static void tuner_status(struct dvb_frontend *fe) if (t->mode != V4L2_TUNER_RADIO) return; if (fe_tuner_ops->get_status) { - u32 tuner_status; + u32 tuner_status = 0;
fe_tuner_ops->get_status(&t->fe, &tuner_status); if (tuner_status & TUNER_STATUS_LOCKED) @@ -1258,7 +1258,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) if (vt->type == t->mode) { vt->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; if (fe_tuner_ops->get_status) { - u32 tuner_status; + u32 tuner_status = 0;
fe_tuner_ops->get_status(&t->fe, &tuner_status); vt->rxsubchans = -- 2.20.1
在 2022-03-16 19:59:23,"Xie XiuQi" xiexiuqi@huawei.com 写道:
Hi yanlei,
Thanks for your patch.
On 2022/3/15 20:18, yan wrote:
1> From: Yan Lei yan_lei@dahuatech.com
mainline-inclusion
该补丁是你自己开发的,不是主线 backport 的,不要标成 mainline inclusion, 你可以写成 driver inclusioin, 或者 dahua inclusion 都可以。
from mainline-openEuler-22.03-LTS
自己开发的补丁,不需要这一行。
category: bugfix Subject: [PATCH openEuler-22.03-LTS] fix CWE-457 bug#1
Subject 是补丁标题,不是标在这里的。使用 git format-patch 生成的补丁, 应该格式就 OK 了。
Declaring variable "tuner_status" without initializer. Using uninitialized value "tuner_status" when calling "*fe_tuner_ops->get_status". (The function pointer resolves to "cx24113_get_status".)
该补丁,确实 fix 了这特场景的初始化问题。 我看社区主线也有这个问。
建议也同时往社区发一下。
这个补丁格式修改一下,再往openEuler发一版本吧。
Signed-off-by: Yan Lei yan_lei@dahuatech.com
drivers/media/v4l2-core/tuner-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 drivers/media/v4l2-core/tuner-core.c
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index 12d1e0c..15bcde4 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c @@ -1118,7 +1118,7 @@ static void tuner_status(struct dvb_frontend *fe) if (t->mode != V4L2_TUNER_RADIO) return; if (fe_tuner_ops->get_status) {
u32 tuner_status;
u32 tuner_status = 0;
fe_tuner_ops->get_status(&t->fe, &tuner_status); if (tuner_status & TUNER_STATUS_LOCKED)
@@ -1258,7 +1258,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) if (vt->type == t->mode) { vt->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; if (fe_tuner_ops->get_status) {
u32 tuner_status;
u32 tuner_status = 0; fe_tuner_ops->get_status(&t->fe, &tuner_status); vt->rxsubchans =
-- 2.7.4
Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org