Lad, Prabhakar
0368dfd01a
lib/genalloc.c: add check gen_pool_dma_alloc() if dma pointer is not NULL
...
In the gen_pool_dma_alloc() the dma pointer can be NULL and while
assigning gen_pool_virt_to_phys(pool, vaddr) to dma caused the following
crash on da850 evm:
Unable to handle kernel NULL pointer dereference at virtual address 00000000
Internal error: Oops: 805 [#1 ] PREEMPT ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.13.0-rc1-00001-g0609e45-dirty #5
task: c4830000 ti: c4832000 task.ti: c4832000
PC is at gen_pool_dma_alloc+0x30/0x3c
LR is at gen_pool_virt_to_phys+0x74/0x80
Process swapper, call trace:
gen_pool_dma_alloc+0x30/0x3c
davinci_pm_probe+0x40/0xa8
platform_drv_probe+0x1c/0x4c
driver_probe_device+0x98/0x22c
__driver_attach+0x8c/0x90
bus_for_each_dev+0x6c/0x8c
bus_add_driver+0x124/0x1d4
driver_register+0x78/0xf8
platform_driver_probe+0x20/0xa4
davinci_init_late+0xc/0x14
init_machine_late+0x1c/0x28
do_one_initcall+0x34/0x15c
kernel_init_freeable+0xe4/0x1ac
kernel_init+0x8/0xec
This patch fixes the above.
[akpm@linux-foundation.org: update kerneldoc]
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Nicolin Chen <b42378@freescale.com>
Cc: Joe Perches <joe@perches.com>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: <stable@vger.kernel.org> [3.13.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-01-29 16:22:39 -08:00
..
2013-06-28 10:28:22 +02:00
2013-09-11 15:59:45 -07:00
2013-02-20 19:36:01 +01:00
2013-09-25 17:17:01 +01:00
2013-09-10 13:03:41 -07:00
2013-03-13 15:21:48 -07:00
2011-03-22 17:44:17 -07:00
2010-03-12 15:52:44 -08:00
2012-10-08 13:50:18 +10:30
2013-04-29 18:28:19 -07:00
2012-12-19 07:55:08 -08:00
2014-01-23 09:25:10 -08:00
2012-07-30 17:25:16 -07:00
2012-12-20 13:50:16 -08:00
2011-05-04 14:41:28 -04:00
2014-01-16 23:46:06 -08:00
2012-09-10 11:13:16 -07:00
2011-03-11 14:25:50 +00:00
2012-12-06 10:39:54 +01:00
2012-03-07 15:04:04 -05:00
2012-06-07 14:43:55 -07:00
2013-01-21 17:17:57 +10:30
2013-06-19 17:54:06 +02:00
2013-03-22 16:41:20 -07:00
2012-03-07 15:04:04 -05:00
2013-02-11 20:00:33 +05:30
2013-07-09 10:33:30 -07:00
2012-02-02 10:34:23 +11:00
2014-01-23 16:36:57 -08:00
2011-10-29 21:20:22 +02:00
2013-09-13 15:09:52 +02:00
2012-07-30 17:25:22 -07:00
2014-01-21 16:19:47 -08:00
2011-06-03 15:01:06 -04:00
2013-11-04 15:27:08 -05:00
2012-03-23 16:58:38 -07:00
2013-09-12 15:31:34 +10:00
2012-03-07 15:04:04 -05:00
2013-06-26 12:10:56 +02:00
2013-11-13 12:09:22 +09:00
2012-03-07 15:04:04 -05:00
2011-12-06 10:00:05 +01:00
2013-09-11 15:58:38 -07:00
2014-01-23 16:37:04 -08:00
2011-12-06 09:53:40 +01:00
2013-02-20 19:36:00 +01:00
2011-03-31 11:26:23 -03:00
2013-07-09 10:33:30 -07:00
2013-02-27 19:10:09 -08:00
2013-11-13 12:09:22 +09:00
2013-08-23 09:02:14 -04:00
2014-01-21 16:19:41 -08:00
2013-08-06 14:21:01 -07:00
2014-01-27 21:02:39 -08:00
2012-05-31 18:18:17 -04:00
2013-08-14 23:24:01 +02:00
2009-06-12 21:47:04 +09:30
2013-06-03 13:55:01 -07:00
2012-07-23 13:54:52 +01:00
2012-07-23 13:54:52 +01:00
2012-07-23 13:54:52 +01:00
2012-07-23 13:54:52 +01:00
2012-07-23 13:54:52 +01:00
2012-07-23 13:54:52 +01:00
2012-03-07 15:04:04 -05:00
2012-03-07 15:04:04 -05:00
2014-01-21 23:17:20 -08:00
2012-09-25 08:59:21 -07:00
2012-10-06 03:04:57 +09:00
2012-10-06 03:04:46 +09:00
2014-01-29 16:22:39 -08:00
2012-03-07 15:04:04 -05:00
2013-12-19 00:14:53 -05:00
2013-09-20 15:38:26 -04:00
2012-03-07 15:04:04 -05:00
2013-07-03 16:08:04 -07:00
2010-08-12 09:51:35 -07:00
2013-04-29 18:28:19 -07:00
2012-12-17 17:15:26 -08:00
2012-10-09 16:22:40 +09:00
2012-03-07 15:04:04 -05:00
2012-03-07 15:04:04 -05:00
2012-03-24 10:24:31 -07:00
2012-03-07 15:04:04 -05:00
2013-05-20 10:24:22 +09:30
2012-03-07 15:04:04 -05:00
2009-07-17 09:11:31 +10:00
2012-05-02 00:04:06 -07:00
2012-10-11 08:50:15 +09:00
2013-11-21 19:46:00 -08:00
2014-01-27 08:14:08 -08:00
2013-06-18 13:48:45 +02:00
2009-07-01 22:28:44 +02:00
2013-11-15 09:32:23 +09:00
2013-05-21 10:16:39 -07:00
2014-01-19 20:02:02 -08:00
2014-01-08 15:36:18 -08:00
2014-01-23 16:36:57 -08:00
2011-10-31 17:30:56 -07:00
2012-03-07 15:04:04 -05:00
2008-12-25 11:01:42 +11:00
2012-07-06 06:01:49 -07:00
2013-04-29 18:28:42 -07:00
2013-11-15 09:32:22 +09:00
2013-09-25 14:07:32 +02:00
2013-11-27 20:37:33 -08:00
2013-03-22 22:17:36 -06:00
2014-01-25 11:17:34 -08:00
2012-03-07 15:04:04 -05:00
2012-07-30 17:25:22 -07:00
2012-07-30 17:25:16 -07:00
2013-06-05 12:00:27 -07:00
2012-08-30 13:11:46 -04:00
2013-04-09 14:13:05 -04:00
2012-07-30 17:25:22 -07:00
2012-12-14 10:32:52 +11:00
2013-05-05 14:38:00 -07:00
2014-01-23 16:36:55 -08:00
2012-01-31 23:19:47 +02:00
2014-01-17 11:32:24 +11:00
2013-11-22 10:52:03 -08:00
2013-11-13 12:09:11 +09:00
2014-01-21 04:40:56 -05:00
2012-10-06 03:04:58 +09:00
2012-07-30 17:25:22 -07:00
2009-01-06 15:59:11 -08:00
2011-09-13 11:11:50 +02:00
2013-09-11 15:59:36 -07:00
2013-11-14 16:06:02 -05:00
2012-03-07 15:04:04 -05:00
2012-05-17 15:18:37 +02:00
2014-01-23 16:37:03 -08:00
2013-09-11 15:59:19 -07:00
2014-01-21 23:17:20 -08:00
2013-12-08 17:56:37 -08:00
2012-03-07 15:04:04 -05:00
2014-01-21 16:19:48 -08:00
2013-09-25 14:07:32 +02:00
2009-01-08 08:31:14 -08:00
2012-04-20 23:27:08 +02:00
2013-04-30 17:04:03 -07:00
2012-03-24 10:24:31 -07:00
2012-05-26 11:33:40 -07:00
2012-05-27 20:59:46 -07:00
2014-01-27 21:02:38 -08:00
2012-03-07 15:04:04 -05:00
2014-01-23 16:36:57 -08:00
2014-01-23 16:36:57 -08:00
2012-05-29 16:22:32 -07:00
2013-04-30 17:04:03 -07:00
2011-01-24 23:33:30 -08:00
2012-03-24 10:24:31 -07:00
2013-04-15 21:23:03 +01:00
2013-04-30 17:04:09 -07:00
2013-04-29 18:28:42 -07:00
2014-01-23 16:36:56 -08:00