Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1538806
| From | Iyappan Subramanian <isubramanian@apm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drivers: net: xgene: initialize slots |
| Date | 2016-12-08 19:50 +0100 |
| Message-ID | <sMbVw-188-41@gated-at.bofh.it> (permalink) |
| References | <sM4U2-5tG-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Dec 8, 2016 at 3:17 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> static analysis using cppcheck detected that slots was uninitialized.
> Fix this by initializing it to buf_pool->slots - 1
>
> Found using static analysis with CoverityScan, CID #1387620
>
> Fixes: a9380b0f7be818 ("drivers: net: xgene: Add support for Jumbo frame")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> index 6c7eea8..899163c 100644
> --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> @@ -636,6 +636,7 @@ static void xgene_enet_free_pagepool(struct xgene_enet_desc_ring *buf_pool,
>
> dev = ndev_to_dev(buf_pool->ndev);
> head = buf_pool->head;
> + slots = buf_pool->slots - 1;
>
> for (i = 0; i < 4; i++) {
> frag_size = xgene_enet_get_data_len(le64_to_cpu(desc[i ^ 1]));
Thanks, Colin.
Dan Carpenter <dan.carpenter@oracle.com> posted the fix already and
got accepted.
http://marc.info/?l=linux-netdev&m=148110980224343&w=2
> --
> 2.10.2
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] drivers: net: xgene: initialize slots Colin King <colin.king@canonical.com> - 2016-12-08 12:20 +0100 Re: [PATCH] drivers: net: xgene: initialize slots Iyappan Subramanian <isubramanian@apm.com> - 2016-12-08 19:50 +0100
csiph-web