Linux v3.9-12070-g8cbc95e
This commit is contained in:
parent
ea30261517
commit
6391f4231e
@ -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
|
|
@ -73,6 +73,7 @@ CONFIG_MMC_MVSDIO=m
|
|||||||
CONFIG_SPI_ORION=m
|
CONFIG_SPI_ORION=m
|
||||||
CONFIG_USB_MV_UDC=m
|
CONFIG_USB_MV_UDC=m
|
||||||
CONFIG_MVEBU_MBUS=y
|
CONFIG_MVEBU_MBUS=y
|
||||||
|
CONFIG_ARMADA_THERMAL=m
|
||||||
|
|
||||||
# omap
|
# omap
|
||||||
CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
|
CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
|
||||||
|
@ -95,7 +95,7 @@ Summary: The Linux kernel
|
|||||||
# The rc snapshot level
|
# The rc snapshot level
|
||||||
%define rcrev 0
|
%define rcrev 0
|
||||||
# The git snapshot level
|
# The git snapshot level
|
||||||
%define gitrev 23
|
%define gitrev 24
|
||||||
# Set rpm version accordingly
|
# Set rpm version accordingly
|
||||||
%define rpmversion 3.%{upstream_sublevel}.0
|
%define rpmversion 3.%{upstream_sublevel}.0
|
||||||
%endif
|
%endif
|
||||||
@ -696,8 +696,6 @@ Patch14010: lis3-improve-handling-of-null-rate.patch
|
|||||||
|
|
||||||
# ARM
|
# ARM
|
||||||
Patch21000: arm-export-read_current_timer.patch
|
Patch21000: arm-export-read_current_timer.patch
|
||||||
# https://lists.ozlabs.org/pipermail/devicetree-discuss/2013-March/029029.html
|
|
||||||
Patch21001: arm-of-dma.patch
|
|
||||||
|
|
||||||
# lpae
|
# lpae
|
||||||
Patch21002: arm-lpae-ax88796.patch
|
Patch21002: arm-lpae-ax88796.patch
|
||||||
@ -1287,7 +1285,6 @@ ApplyPatch debug-bad-pte-modules.patch
|
|||||||
# ARM
|
# ARM
|
||||||
#
|
#
|
||||||
ApplyPatch arm-export-read_current_timer.patch
|
ApplyPatch arm-export-read_current_timer.patch
|
||||||
ApplyPatch arm-of-dma.patch
|
|
||||||
ApplyPatch arm-lpae-ax88796.patch
|
ApplyPatch arm-lpae-ax88796.patch
|
||||||
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
|
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
|
||||||
#pplyPatch arm-tegra-fixclk.patch
|
#pplyPatch arm-tegra-fixclk.patch
|
||||||
@ -2240,6 +2237,9 @@ fi
|
|||||||
# ||----w |
|
# ||----w |
|
||||||
# || ||
|
# || ||
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 09 2013 Josh Boyer <jwboyer@redhat.com> - 3.10.0-0.rc0.git24.1
|
||||||
|
- Linux v3.9-12070-g8cbc95e
|
||||||
|
|
||||||
* Thu May 9 2013 Peter Robinson <pbrobinson@fedoraproject.org>
|
* Thu May 9 2013 Peter Robinson <pbrobinson@fedoraproject.org>
|
||||||
- Enable DMA for ARM sound drivers
|
- Enable DMA for ARM sound drivers
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user