Linux 3.9.3
This commit is contained in:
parent
033f53a432
commit
58f61257fc
|
@ -1,43 +0,0 @@
|
|||
From 7362f04c2888b14c20f8aaa02e1a897025261768 Mon Sep 17 00:00:00 2001
|
||||
From: Viresh Kumar <viresh.kumar@linaro.org>
|
||||
Date: Fri, 15 Mar 2013 08:48:20 +0000
|
||||
Subject: DMA: OF: Check properties value before running be32_to_cpup() on it
|
||||
|
||||
In of_dma_controller_register() routine we are calling of_get_property() as an
|
||||
parameter to be32_to_cpup(). In case the property doesn't exist we will get a
|
||||
crash.
|
||||
|
||||
This patch changes this code to check if we got a valid property first and then
|
||||
runs be32_to_cpup() on it.
|
||||
|
||||
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
||||
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
|
||||
---
|
||||
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
|
||||
index 6036cd0..00db454 100644
|
||||
--- a/drivers/dma/of-dma.c
|
||||
+++ b/drivers/dma/of-dma.c
|
||||
@@ -93,6 +93,7 @@ int of_dma_controller_register(struct device_node *np,
|
||||
{
|
||||
struct of_dma *ofdma;
|
||||
int nbcells;
|
||||
+ const __be32 *prop;
|
||||
|
||||
if (!np || !of_dma_xlate) {
|
||||
pr_err("%s: not enough information provided\n", __func__);
|
||||
@@ -103,8 +104,11 @@ int of_dma_controller_register(struct device_node *np,
|
||||
if (!ofdma)
|
||||
return -ENOMEM;
|
||||
|
||||
- nbcells = be32_to_cpup(of_get_property(np, "#dma-cells", NULL));
|
||||
- if (!nbcells) {
|
||||
+ prop = of_get_property(np, "#dma-cells", NULL);
|
||||
+ if (prop)
|
||||
+ nbcells = be32_to_cpup(prop);
|
||||
+
|
||||
+ if (!prop || !nbcells) {
|
||||
pr_err("%s: #dma-cells property is missing or invalid\n",
|
||||
__func__);
|
||||
kfree(ofdma);
|
||||
--
|
||||
cgit v0.9.1
|
|
@ -74,7 +74,7 @@ Summary: The Linux kernel
|
|||
%if 0%{?released_kernel}
|
||||
|
||||
# Do we have a -stable update to apply?
|
||||
%define stable_update 2
|
||||
%define stable_update 3
|
||||
# Is it a -stable RC?
|
||||
%define stable_rc 0
|
||||
# Set rpm version accordingly
|
||||
|
@ -716,8 +716,6 @@ Patch20001: 0002-x86-EFI-Calculate-the-EFI-framebuffer-size-instead-o.patch
|
|||
|
||||
# ARM
|
||||
Patch21000: arm-export-read_current_timer.patch
|
||||
# https://lists.ozlabs.org/pipermail/devicetree-discuss/2013-March/029029.html
|
||||
Patch21001: arm-of-dma.patch
|
||||
|
||||
# ARM omap
|
||||
Patch21003: arm-omap-ehci-fix.patch
|
||||
|
@ -1311,7 +1309,6 @@ ApplyPatch debug-bad-pte-modules.patch
|
|||
# ARM
|
||||
#
|
||||
ApplyPatch arm-export-read_current_timer.patch
|
||||
ApplyPatch arm-of-dma.patch
|
||||
ApplyPatch arm-omap-ehci-fix.patch
|
||||
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
|
||||
ApplyPatch arm-tegra-fixclk.patch
|
||||
|
@ -2292,6 +2289,9 @@ fi
|
|||
# ||----w |
|
||||
# || ||
|
||||
%changelog
|
||||
* Mon May 20 2013 Josh Boyer <jwboyer@redhat.com> - 3.9.3-200
|
||||
- Linux 3.9.3
|
||||
|
||||
* Thu May 16 2013 Josh Boyer <jwboyer@redhat.com>
|
||||
- Fix config-local usage (rhbz 950841)
|
||||
|
||||
|
|
Loading…
Reference in New Issue