<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/dma, branch v3.2.73</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.73</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.73'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-08-12T14:33:15Z</updated>
<entry>
<title>dmaengine: mv_xor: bug fix for racing condition in descriptors cleanup</title>
<updated>2015-08-12T14:33:15Z</updated>
<author>
<name>Lior Amsalem</name>
<email>alior@marvell.com</email>
</author>
<published>2015-05-26T13:07:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=26aa1c6949dfef77d3aa77e4cb504ccfd8394ce9'/>
<id>urn:sha1:26aa1c6949dfef77d3aa77e4cb504ccfd8394ce9</id>
<content type='text'>
commit 9136291f1dbc1d4d1cacd2840fb35f4f3ce16c46 upstream.

This patch fixes a bug in the XOR driver where the cleanup function can be
called and free descriptors that never been processed by the engine (which
result in data errors).

The cleanup function will free descriptors based on the ownership bit in
the descriptors.

Fixes: ff7b04796d98 ("dmaengine: DMA engine driver for Marvell XOR engine")
Signed-off-by: Lior Amsalem &lt;alior@marvell.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Reviewed-by: Ofer Heifetz &lt;oferh@marvell.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>dma: mv_xor: Flush descriptors before activating a channel</title>
<updated>2014-06-09T12:29:15Z</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel.garcia@free-electrons.com</email>
</author>
<published>2014-05-21T21:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=795bd4fa3417ef8fd7f5e0965c8dbe3817393b49'/>
<id>urn:sha1:795bd4fa3417ef8fd7f5e0965c8dbe3817393b49</id>
<content type='text'>
commit 5a9a55bf9157d3490b0c8c4c81d4708602c26e07 upstream.

We need to use writel() instead of writel_relaxed() when starting
a channel, to ensure all the descriptors have been flushed before
the activation.

While at it, remove the unneeded read-modify-write and make the
code simpler.

Signed-off-by: Lior Amsalem &lt;alior@marvell.com&gt;
Signed-off-by: Ezequiel Garcia &lt;ezequiel.garcia@free-electrons.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
[bwh: Backported to 3.2: it was using __raw_readl() and __raw_writel()
 which are just as wrong]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>ioat: fix tasklet tear down</title>
<updated>2014-04-01T23:58:55Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2014-02-20T00:19:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0ece81d888e6860fccf8114c71b57f36f5f26afc'/>
<id>urn:sha1:0ece81d888e6860fccf8114c71b57f36f5f26afc</id>
<content type='text'>
commit da87ca4d4ca101f177fffd84f1f0a5e4c0343557 upstream.

Since commit 77873803363c "net_dma: mark broken" we no longer pin dma
engines active for the network-receive-offload use case.  As a result
the -&gt;free_chan_resources() that occurs after the driver self test no
longer has a NET_DMA induced -&gt;alloc_chan_resources() to back it up.  A
late firing irq can lead to ksoftirqd spinning indefinitely due to the
tasklet_disable() performed by -&gt;free_chan_resources().  Only
-&gt;alloc_chan_resources() can clear this condition in affected kernels.

This problem has been present since commit 3e037454bcfa "I/OAT: Add
support for MSI and MSI-X" in 2.6.24, but is now exposed. Given the
NET_DMA use case is deprecated we can revisit moving the driver to use
threaded irqs.  For now, just tear down the irq and tasklet properly by:

1/ Disable the irq from triggering the tasklet

2/ Disable the irq from re-arming

3/ Flush inflight interrupts

4/ Flush the timer

5/ Flush inflight tasklets

References:
https://lkml.org/lkml/2014/1/27/282
https://lkml.org/lkml/2014/2/19/672

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Reported-by: Mike Galbraith &lt;bitbucket@online.de&gt;
Reported-by: Stanislav Fomichev &lt;stfomichev@yandex-team.ru&gt;
Tested-by: Mike Galbraith &lt;bitbucket@online.de&gt;
Tested-by: Stanislav Fomichev &lt;stfomichev@yandex-team.ru&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
[bwh: Backported to 3.2:
 - Adjust context
 - As there is no ioatdma_device::irq_mode member, check
   pci_dev::msix_enabled instead]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Acked-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>dma: ste_dma40: don't dereference free:d descriptor</title>
<updated>2014-04-01T23:58:53Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2014-02-13T09:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=74f925dea76124060a2021460a26c6ddc815bfff'/>
<id>urn:sha1:74f925dea76124060a2021460a26c6ddc815bfff</id>
<content type='text'>
commit e9baa9d9d520fb0e24cca671e430689de2d4a4b2 upstream.

It appears that in the DMA40 driver the DMA tasklet will very
often dereference memory for a descriptor just free:d from the
DMA40 slab. Nothing happens because no other part of the driver
has yet had a chance to claim this memory, but it's really
nasty to dereference free:d memory, so let's check the flag
before the descriptor is free and store it in a bool variable.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net_dma: mark broken</title>
<updated>2014-02-15T19:20:14Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2013-12-17T18:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f4118c967b80fb55a7d54ec149294ea4477e5963'/>
<id>urn:sha1:f4118c967b80fb55a7d54ec149294ea4477e5963</id>
<content type='text'>
commit 77873803363c9e831fc1d1e6895c084279090c22 upstream.

net_dma can cause data to be copied to a stale mapping if a
copy-on-write fault occurs during dma.  The application sees missing
data.

The following trace is triggered by modifying the kernel to WARN if it
ever triggers copy-on-write on a page that is undergoing dma:

 WARNING: CPU: 24 PID: 2529 at lib/dma-debug.c:485 debug_dma_assert_idle+0xd2/0x120()
 ioatdma 0000:00:04.0: DMA-API: cpu touching an active dma mapped page [pfn=0x16bcd9]
 Modules linked in: iTCO_wdt iTCO_vendor_support ioatdma lpc_ich pcspkr dca
 CPU: 24 PID: 2529 Comm: linbug Tainted: G        W    3.13.0-rc1+ #353
  00000000000001e5 ffff88016f45f688 ffffffff81751041 ffff88017ab0ef70
  ffff88016f45f6d8 ffff88016f45f6c8 ffffffff8104ed9c ffffffff810f3646
  ffff8801768f4840 0000000000000282 ffff88016f6cca10 00007fa2bb699349
 Call Trace:
  [&lt;ffffffff81751041&gt;] dump_stack+0x46/0x58
  [&lt;ffffffff8104ed9c&gt;] warn_slowpath_common+0x8c/0xc0
  [&lt;ffffffff810f3646&gt;] ? ftrace_pid_func+0x26/0x30
  [&lt;ffffffff8104ee86&gt;] warn_slowpath_fmt+0x46/0x50
  [&lt;ffffffff8139c062&gt;] debug_dma_assert_idle+0xd2/0x120
  [&lt;ffffffff81154a40&gt;] do_wp_page+0xd0/0x790
  [&lt;ffffffff811582ac&gt;] handle_mm_fault+0x51c/0xde0
  [&lt;ffffffff813830b9&gt;] ? copy_user_enhanced_fast_string+0x9/0x20
  [&lt;ffffffff8175fc2c&gt;] __do_page_fault+0x19c/0x530
  [&lt;ffffffff8175c196&gt;] ? _raw_spin_lock_bh+0x16/0x40
  [&lt;ffffffff810f3539&gt;] ? trace_clock_local+0x9/0x10
  [&lt;ffffffff810fa1f4&gt;] ? rb_reserve_next_event+0x64/0x310
  [&lt;ffffffffa0014c00&gt;] ? ioat2_dma_prep_memcpy_lock+0x60/0x130 [ioatdma]
  [&lt;ffffffff8175ffce&gt;] do_page_fault+0xe/0x10
  [&lt;ffffffff8175c862&gt;] page_fault+0x22/0x30
  [&lt;ffffffff81643991&gt;] ? __kfree_skb+0x51/0xd0
  [&lt;ffffffff813830b9&gt;] ? copy_user_enhanced_fast_string+0x9/0x20
  [&lt;ffffffff81388ea2&gt;] ? memcpy_toiovec+0x52/0xa0
  [&lt;ffffffff8164770f&gt;] skb_copy_datagram_iovec+0x5f/0x2a0
  [&lt;ffffffff8169d0f4&gt;] tcp_rcv_established+0x674/0x7f0
  [&lt;ffffffff816a68c5&gt;] tcp_v4_do_rcv+0x2e5/0x4a0
  [..]
 ---[ end trace e30e3b01191b7617 ]---
 Mapped at:
  [&lt;ffffffff8139c169&gt;] debug_dma_map_page+0xb9/0x160
  [&lt;ffffffff8142bf47&gt;] dma_async_memcpy_pg_to_pg+0x127/0x210
  [&lt;ffffffff8142cce9&gt;] dma_memcpy_pg_to_iovec+0x119/0x1f0
  [&lt;ffffffff81669d3c&gt;] dma_skb_copy_datagram_iovec+0x11c/0x2b0
  [&lt;ffffffff8169d1ca&gt;] tcp_rcv_established+0x74a/0x7f0:

...the problem is that the receive path falls back to cpu-copy in
several locations and this trace is just one of the areas.  A few
options were considered to fix this:

1/ sync all dma whenever a cpu copy branch is taken

2/ modify the page fault handler to hold off while dma is in-flight

Option 1 adds yet more cpu overhead to an "offload" that struggles to compete
with cpu-copy.  Option 2 adds checks for behavior that is already documented as
broken when using get_user_pages().  At a minimum a debug mode is warranted to
catch and flag these violations of the dma-api vs get_user_pages().

Thanks to David for his reproducer.

Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Cc: Vinod Koul &lt;vinod.koul@intel.com&gt;
Cc: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
Reported-by: David Whipple &lt;whipple@securedatainnovations.ch&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>drivers/dma/pl330.c: fix locking in pl330_free_chan_resources()</title>
<updated>2013-07-27T04:34:27Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2013-07-03T22:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3dfd75404d6e8f9c0818bf5e96f507992e67082c'/>
<id>urn:sha1:3dfd75404d6e8f9c0818bf5e96f507992e67082c</id>
<content type='text'>
commit da331ba8e9c5de72a27e50f71105395bba6eebe0 upstream.

tasklet_kill() may sleep so call it before taking pch-&gt;lock.

Fixes following lockup:

  BUG: scheduling while atomic: cat/2383/0x00000002
  Modules linked in:
    unwind_backtrace+0x0/0xfc
    __schedule_bug+0x4c/0x58
    __schedule+0x690/0x6e0
    sys_sched_yield+0x70/0x78
    tasklet_kill+0x34/0x8c
    pl330_free_chan_resources+0x24/0x88
    dma_chan_put+0x4c/0x50
  [...]
  BUG: spinlock lockup suspected on CPU#0, swapper/0/0
   lock: 0xe52aa04c, .magic: dead4ead, .owner: cat/2383, .owner_cpu: 1
    unwind_backtrace+0x0/0xfc
    do_raw_spin_lock+0x194/0x204
    _raw_spin_lock_irqsave+0x20/0x28
    pl330_tasklet+0x2c/0x5a8
    tasklet_action+0xfc/0x114
    __do_softirq+0xe4/0x19c
    irq_exit+0x98/0x9c
    handle_IPI+0x124/0x16c
    gic_handle_irq+0x64/0x68
    __irq_svc+0x40/0x70
    cpuidle_wrap_enter+0x4c/0xa0
    cpuidle_enter_state+0x18/0x68
    cpuidle_idle_call+0xac/0xe0
    cpu_idle+0xac/0xf0

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Acked-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Cc: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Cc: Tomasz Figa &lt;t.figa@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>pch_dma: Use GFP_ATOMIC because called from interrupt context</title>
<updated>2013-05-30T13:35:09Z</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya.rohm@gmail.com</email>
</author>
<published>2013-02-12T02:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=99f9dba9919c903f04eec1001b5634e3e8bb40cb'/>
<id>urn:sha1:99f9dba9919c903f04eec1001b5634e3e8bb40cb</id>
<content type='text'>
commit 5c1ef59168c485318e40ba485c1eba57d81d0faa upstream.

pdc_desc_get() is called from pd_prep_slave_sg, and the function is
called from interrupt context(e.g. Uart driver "pch_uart.c").
In fact, I saw kernel error message.
So, GFP_ATOMIC must be used not GFP_NOIO.

Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>ioat: Fix DMA memory sync direction correct flag</title>
<updated>2013-02-06T04:33:23Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuah.khan@hp.com</email>
</author>
<published>2012-10-25T16:22:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0310953f2c6b90c06b5591cb36d48fb77606459d'/>
<id>urn:sha1:0310953f2c6b90c06b5591cb36d48fb77606459d</id>
<content type='text'>
commit ac4989874af56435c308bdde9ad9c837a26f8b23 upstream.

ioat does DMA memory sync with DMA_TO_DEVICE direction on a buffer allocated
for DMA_FROM_DEVICE dma, resulting in the following warning from dma debug.
Fixed the dma_sync_single_for_device() call to use the correct direction.

[  226.288947] WARNING: at lib/dma-debug.c:990 check_sync+0x132/0x550()
[  226.288948] Hardware name: ProLiant DL380p Gen8
[  226.288951] ioatdma 0000:00:04.0: DMA-API: device driver syncs DMA memory with different direction [device address=0x00000000ffff7000] [size=4096 bytes] [mapped with DMA_FROM_DEVICE] [synced with DMA_TO_DEVICE]
[  226.288953] Modules linked in: iTCO_wdt(+) sb_edac(+) ioatdma(+) microcode serio_raw pcspkr edac_core hpwdt(+) iTCO_vendor_support hpilo(+) dca acpi_power_meter ata_generic pata_acpi sd_mod crc_t10dif ata_piix libata hpsa tg3 netxen_nic(+) sunrpc dm_mirror dm_region_hash dm_log dm_mod
[  226.288967] Pid: 1055, comm: work_for_cpu Tainted: G        W    3.3.0-0.20.el7.x86_64 #1
[  226.288968] Call Trace:
[  226.288974]  [&lt;ffffffff810644cf&gt;] warn_slowpath_common+0x7f/0xc0
[  226.288977]  [&lt;ffffffff810645c6&gt;] warn_slowpath_fmt+0x46/0x50
[  226.288980]  [&lt;ffffffff81345502&gt;] check_sync+0x132/0x550
[  226.288983]  [&lt;ffffffff81345c9f&gt;] debug_dma_sync_single_for_device+0x3f/0x50
[  226.288988]  [&lt;ffffffff81661002&gt;] ? wait_for_common+0x72/0x180
[  226.288995]  [&lt;ffffffffa019590f&gt;] ioat_xor_val_self_test+0x3e5/0x832 [ioatdma]
[  226.288999]  [&lt;ffffffff811a5739&gt;] ? kfree+0x259/0x270
[  226.289004]  [&lt;ffffffffa0195d77&gt;] ioat3_dma_self_test+0x1b/0x20 [ioatdma]
[  226.289008]  [&lt;ffffffffa01952c3&gt;] ioat_probe+0x2f8/0x348 [ioatdma]
[  226.289011]  [&lt;ffffffffa0195f51&gt;] ioat3_dma_probe+0x1d5/0x2aa [ioatdma]
[  226.289016]  [&lt;ffffffffa0194d12&gt;] ioat_pci_probe+0x139/0x17c [ioatdma]
[  226.289020]  [&lt;ffffffff81354b8c&gt;] local_pci_probe+0x5c/0xd0
[  226.289023]  [&lt;ffffffff81083e50&gt;] ? destroy_work_on_stack+0x20/0x20
[  226.289025]  [&lt;ffffffff81083e68&gt;] do_work_for_cpu+0x18/0x30
[  226.289029]  [&lt;ffffffff8108d997&gt;] kthread+0xb7/0xc0
[  226.289033]  [&lt;ffffffff8166cef4&gt;] kernel_thread_helper+0x4/0x10
[  226.289036]  [&lt;ffffffff81662d20&gt;] ? _raw_spin_unlock_irq+0x30/0x50
[  226.289038]  [&lt;ffffffff81663234&gt;] ? retint_restore_args+0x13/0x13
[  226.289041]  [&lt;ffffffff8108d8e0&gt;] ? kthread_worker_fn+0x1a0/0x1a0
[  226.289044]  [&lt;ffffffff8166cef0&gt;] ? gs_change+0x13/0x13
[  226.289045] ---[ end trace e1618afc7a606089 ]---
[  226.289047] Mapped at:
[  226.289048]  [&lt;ffffffff81345307&gt;] debug_dma_map_page+0x87/0x150
[  226.289050]  [&lt;ffffffffa019653c&gt;] dma_map_page.constprop.18+0x70/0xb34 [ioatdma]
[  226.289054]  [&lt;ffffffffa0195702&gt;] ioat_xor_val_self_test+0x1d8/0x832 [ioatdma]
[  226.289058]  [&lt;ffffffffa0195d77&gt;] ioat3_dma_self_test+0x1b/0x20 [ioatdma]
[  226.289061]  [&lt;ffffffffa01952c3&gt;] ioat_probe+0x2f8/0x348 [ioatdma]

Signed-off-by: Shuah Khan &lt;shuah.khan@hp.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>drivers/dma/dmaengine.c: lower the priority of 'failed to get' dma channel message</title>
<updated>2012-10-17T02:49:34Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2012-10-05T00:11:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5070d81a7bfaafc9849456513f58ca21e5a48948'/>
<id>urn:sha1:5070d81a7bfaafc9849456513f58ca21e5a48948</id>
<content type='text'>
commit 0eb5a35801df3c438ce3fc91310a415ea4452c00 upstream.

Do the same as commit a03a202e95fd ("dmaengine: failure to get a
specific DMA channel is not critical") to get rid of the following
messages during kernel boot:

  dmaengine_get: failed to get dma1chan0: (-22)
  dmaengine_get: failed to get dma1chan1: (-22)
  dmaengine_get: failed to get dma1chan2: (-22)
  dmaengine_get: failed to get dma1chan3: (-22)
  ..

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Cc: Vinod Koul &lt;vinod.koul@intel.com&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[bwh: Backported to 3.2: also apply changes to this logging statement
 from commit 634332502366 ('dmaengine: Cleanup logging messages')]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>DMA: PL330: Check the pointer returned by kzalloc</title>
<updated>2012-10-10T02:30:56Z</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2012-09-17T09:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cd2ff82610f26dc1817effaed4627907fbe28079'/>
<id>urn:sha1:cd2ff82610f26dc1817effaed4627907fbe28079</id>
<content type='text'>
commit 61c6e7531d3b66b33187b8cdd700fd8ab93ffd62 upstream.

kzalloc could return NULL. Hence add a check to avoid
NULL pointer dereference.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Acked-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
[bwh: Backported to 3.2: adjust context and error label]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
