Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1599858
| From | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dma-engine: Fix array index out of bounds warning in __get_unmap_pool() |
| Date | 2017-03-13 23:00 +0100 |
| Message-ID | <tkGat-6RP-5@gated-at.bofh.it> (permalink) |
| References | <tkFR8-6IY-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Mar 13, 2017 at 2:30 PM, Matthias Kaehlcke <mka@chromium.org> wrote:
> This fixes the following warning when building with clang and
> CONFIG_DMA_ENGINE_RAID=n :
>
> drivers/dma/dmaengine.c:1102:11: error: array index 2 is past the end of the array (which contains 1 element) [-Werror,-Warray-bounds]
> return &unmap_pool[2];
> ^ ~
> drivers/dma/dmaengine.c:1083:1: note: array 'unmap_pool' declared here
> static struct dmaengine_unmap_pool unmap_pool[] = {
> ^
> drivers/dma/dmaengine.c:1104:11: error: array index 3 is past the end of the array (which contains 1 element) [-Werror,-Warray-bounds]
> return &unmap_pool[3];
> ^ ~
> drivers/dma/dmaengine.c:1083:1: note: array 'unmap_pool' declared here
> static struct dmaengine_unmap_pool unmap_pool[] = {
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] dma-engine: Fix array index out of bounds warning in __get_unmap_pool() Matthias Kaehlcke <mka@chromium.org> - 2017-03-13 22:40 +0100 Re: [PATCH] dma-engine: Fix array index out of bounds warning in __get_unmap_pool() Dan Williams <dan.j.williams@intel.com> - 2017-03-13 23:00 +0100 Re: [PATCH] dma-engine: Fix array index out of bounds warning in __get_unmap_pool() Vinod Koul <vinod.koul@intel.com> - 2017-03-14 05:50 +0100
csiph-web