Skip to contentSkip to conversation

Patch "media: dvb_frontend: be sure to init dvb_frontend_handle_ioctl() return code" has been added to the 4.15-stable tree

PATCH [email protected] 1 participant 1 message Feb 15, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

media: dvb_frontend: be sure to init dvb_frontend_handle_ioctl() return code

to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
media-dvb_frontend-be-sure-to-init-dvb_frontend_handle_ioctl-return-code.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a9cb97c3e628902e37583d8a40bb28cf76522cf1 Mon Sep 17 00:00:00 2001

From: Mauro Carvalho Chehab <[email protected]>
Date: Wed, 1 Nov 2017 17:05:39 -0400
Subject: media: dvb_frontend: be sure to init dvb_frontend_handle_ioctl() return code

From: Mauro Carvalho Chehab <[email protected]>

commit a9cb97c3e628902e37583d8a40bb28cf76522cf1 upstream.

As smatch warned:
drivers/media/dvb-core/dvb_frontend.c:2468 dvb_frontend_handle_ioctl() error: uninitialized symbol 'err'.

The ioctl handler actually got a regression here: before changeset d73dcf0cdb95 ("media: dvb_frontend: cleanup ioctl handling logic"), the code used to return -EOPNOTSUPP if an ioctl handler was not implemented on a driver. After the change, it may return a random value.

Fixes d73dcf0cdb95 ("media: dvb_frontend: cleanup ioctl handling logic")
---
 drivers/media/dvb-core/dvb_frontend.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/dvb-core/dvb_frontend.c +3 -1
@@ -2110,7 +2110,7 @@ static int dvb_frontend_handle_ioctl(str
 	struct dvb_frontend *fe = dvbdev->priv;
 	struct dvb_frontend_private *fepriv = fe->frontend_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
-	int i, err;
+	int i, err = -EOPNOTSUPP;
 
 	dev_dbg(fe->dvb->device, "%s:\n", __func__);
 
@@ -2145,6 +2145,7 @@ static int dvb_frontend_handle_ioctl(str
 			}
 		}
 		kfree(tvp);
+		err = 0;
 		break;
 	}
 	case FE_GET_PROPERTY: {
@@ -2196,6 +2197,7 @@ static int dvb_frontend_handle_ioctl(str
 			return -EFAULT;
 		}
 		kfree(tvp);
+		err = 0;
 		break;
 	}
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.15/media-hdpvr-fix-an-error-handling-path-in-hdpvr_probe.patch queue-4.15/media-v4l2-compat-ioctl32.c-copy-m.userptr-in-put_v4l2_plane32.patch queue-4.15/media-v4l2-compat-ioctl32.c-avoid-sizeof-type.patch queue-4.15/media-v4l2-compat-ioctl32.c-drop-pr_info-for-unknown-buffer-type.patch queue-4.15/media-dvb-usb-v2-lmedm04-move-ts2020-attach-to-dm04_lme2510_tuner.patch queue-4.15/media-v4l2-compat-ioctl32.c-add-missing-vidioc_prepare_buf.patch queue-4.15/media-v4l2-compat-ioctl32.c-refactor-compat-ioctl32-logic.patch queue-4.15/media-v4l2-compat-ioctl32.c-fix-ctrl_is_pointer.patch queue-4.15/media-vivid-fix-module-load-error-when-enabling-fb-and-no_error_inj-1.patch queue-4.15/media-dvb-frontends-fix-i2c-access-helpers-for-kasan.patch queue-4.15/media-dvb-usb-v2-lmedm04-improve-logic-checking-of-warm-start.patch queue-4.15/media-v4l2-compat-ioctl32.c-move-helper-functions-to-__get-put_v4l2_format32.patch queue-4.15/media-dvb_frontend-be-sure-to-init-dvb_frontend_handle_ioctl-return-code.patch queue-4.15/media-ts2020-avoid-integer-overflows-on-32-bit-machines.patch queue-4.15/media-v4l2-compat-ioctl32.c-don-t-copy-back-the-result-for-certain-errors.patch queue-4.15/media-dt-bindings-media-cec-gpio.txt-mention-the-cec-hpd-max-voltages.patch queue-4.15/media-v4l2-compat-ioctl32.c-make-ctrl_is_pointer-work-for-subdevs.patch queue-4.15/media-v4l2-compat-ioctl32.c-fix-the-indentation.patch queue-4.15/media-v4l2-ioctl.c-don-t-copy-back-the-result-for-enotty.patch queue-4.15/media-v4l2-ioctl.c-use-check_fmt-for-enum-g-s-try_fmt.patch queue-4.15/media-v4l2-compat-ioctl32.c-copy-clip-list-in-put_v4l2_window32.patch