From: <gregkh@linuxfoundation.org>
To: sakari.ailus@iki.fi, gregkh@linuxfoundation.org,
laurent.pinchart@ideasonboard.com, mchehab@osg.samsung.com,
sre@kernel.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "[media] v4l: omap3isp: Fix async notifier registration order" has been added to the 4.2-stable tree
Date: Fri, 25 Sep 2015 20:49:17 -0700 [thread overview]
Message-ID: <1443239357117169@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
[media] v4l: omap3isp: Fix async notifier registration order
to the 4.2-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:
v4l-omap3isp-fix-async-notifier-registration-order.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 5d479386983c5f1bb1aff4f88a027b6143f88a39 Mon Sep 17 00:00:00 2001
From: Sakari Ailus <sakari.ailus@iki.fi>
Date: Tue, 19 May 2015 20:08:05 -0300
Subject: [media] v4l: omap3isp: Fix async notifier registration order
From: Sakari Ailus <sakari.ailus@iki.fi>
commit 5d479386983c5f1bb1aff4f88a027b6143f88a39 upstream.
The async notifier was registered before the v4l2_device was registered and
before the notifier callbacks were set. This could lead to missing the
bound() and complete() callbacks and to attempting to spin_lock() and
uninitialised spin lock.
Also fix unregistering the async notifier in the case of an error --- the
function may not fail anymore after the notifier is registered.
Fixes: da7f3843d2c7 ("[media] omap3isp: Add support for the Device Tree")
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/omap3isp/isp.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2000,10 +2000,8 @@ static int isp_register_entities(struct
ret = v4l2_device_register_subdev_nodes(&isp->v4l2_dev);
done:
- if (ret < 0) {
+ if (ret < 0)
isp_unregister_entities(isp);
- v4l2_async_notifier_unregister(&isp->notifier);
- }
return ret;
}
@@ -2423,10 +2421,6 @@ static int isp_probe(struct platform_dev
ret = isp_of_parse_nodes(&pdev->dev, &isp->notifier);
if (ret < 0)
return ret;
- ret = v4l2_async_notifier_register(&isp->v4l2_dev,
- &isp->notifier);
- if (ret)
- return ret;
} else {
isp->pdata = pdev->dev.platform_data;
isp->syscon = syscon_regmap_lookup_by_pdevname("syscon.0");
@@ -2557,18 +2551,27 @@ static int isp_probe(struct platform_dev
if (ret < 0)
goto error_iommu;
- isp->notifier.bound = isp_subdev_notifier_bound;
- isp->notifier.complete = isp_subdev_notifier_complete;
-
ret = isp_register_entities(isp);
if (ret < 0)
goto error_modules;
+ if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
+ isp->notifier.bound = isp_subdev_notifier_bound;
+ isp->notifier.complete = isp_subdev_notifier_complete;
+
+ ret = v4l2_async_notifier_register(&isp->v4l2_dev,
+ &isp->notifier);
+ if (ret)
+ goto error_register_entities;
+ }
+
isp_core_init(isp, 1);
omap3isp_put(isp);
return 0;
+error_register_entities:
+ isp_unregister_entities(isp);
error_modules:
isp_cleanup_modules(isp);
error_iommu:
Patches currently in stable-queue which might be from sakari.ailus@iki.fi are
queue-4.2/v4l-omap3isp-fix-sub-device-power-management-code.patch
queue-4.2/v4l-omap3isp-fix-async-notifier-registration-order.patch
reply other threads:[~2015-09-26 6:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1443239357117169@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=mchehab@osg.samsung.com \
--cc=sakari.ailus@iki.fi \
--cc=sre@kernel.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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.