From: Sinan Kaya
Cleanup event registry during shutdown to prevent memory
leaks.
Signed-off-by: Sinan Kaya
---
app/test-pmd/testpmd.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index c6ad9b18bf..1de7b7cd51 10
From: Sinan Kaya
Code will fetch the existing registration when called
for second time as part of the reinit changes.
Registration will still succeed.
Signed-off-by: Sinan Kaya
---
app/test/test_tailq.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/app/test/test_tailq.c b/app/test/te
From: Sinan Kaya
Call of rte_eal_init() api after rte_eal_cleanup() possible for
certain application types but this is not an officially supported
feature.
Signed-off-by: Sinan Kaya
---
lib/eal/include/rte_eal.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/lib/eal/include/rte_eal.h
From: Sinan Kaya
Initialize worker threads once and keep a flag
for other init calls.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal.c | 60 -
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
From: Sinan Kaya
Initialize heap area just once.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memory.c | 6 ++
lib/eal/common/malloc_heap.c | 7 +++
2 files changed, 13 insertions(+)
diff --git a/lib/eal/common/eal_common_memory.c
b/lib/eal/common/eal_common_memory.c
From: Sinan Kaya
Initialize interrupt thread once and keep a flag
for further init.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_interrupts.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index c9881143be..7adf4076a
From: Sinan Kaya
Initialize memory segments just once and bail out if called
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_memory.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 9
From: Sinan Kaya
Initialize memzone once and bail out if someone calls init
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
b/lib/eal/common/eal_common_memzone.c
ind
From: Sinan Kaya
Allows tailq to be reinitialied multiple times
by looking up previously registered tailqs
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_tailqs.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lib/eal/common/eal_common_tailqs
From: Graham Whyte
reinitialize the solib link list and clean the globals holding
state for parsing.
Signed-off-by: Sinan Kaya
Signed-off-by: Graham Whyte
---
lib/eal/common/eal_common_options.c | 7 +++
lib/eal/linux/eal.c | 4 +++-
2 files changed, 10 insertions(+), 1 de
From: Stephen Hemminger
When rte_eal_cleanup is called walk through the list of shared
objects loaded, and close them and free the data structure.
Signed-off-by: Stephen Hemminger
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_options.c | 14 ++
lib/eal/common/eal_options
From: Sinan Kaya
We want to be able to call rte_eal_init() and rte_eal_cleanup()
APIs back to back for maintanance reasons.
Here is a summary of the code we have seen so far:
1. some code support getting called multiple times by keeping
a static variable.
2. some code initializes once but never
From: Sinan Kaya
Initialize worker threads once and keep a flag
for other init calls.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal.c | 60 -
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
From: Sinan Kaya
Initialize interrupt thread once and keep a flag
for further init.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_interrupts.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index c9881143be..6a35b4ae
From: Sinan Kaya
Initialize heap area just once.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memory.c | 5 +
lib/eal/common/malloc_heap.c | 7 +++
2 files changed, 12 insertions(+)
diff --git a/lib/eal/common/eal_common_memory.c
b/lib/eal/common/eal_common_memory.c
From: Sinan Kaya
Initialize memory segments just once and bail out if called
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_memory.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 9
From: Sinan Kaya
Initialize memzone once and bail out if someone calls init
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
b/lib/eal/common/eal_common_memzone.c
in
From: Sinan Kaya
Allows tailq to be reinitialied multiple times
by looking up previously registered tailqs
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_tailqs.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lib/eal/common/eal_common_tailqs
From: Graham Whyte
reinitialize the solib link list and clean the globals holding
state for parsing.
Signed-off-by: Sinan Kaya
Signed-off-by: Graham Whyte
---
lib/eal/common/eal_common_options.c | 8
lib/eal/linux/eal.c | 4 +++-
2 files changed, 11 insertions(+), 1 d
From: Stephen Hemminger
When rte_eal_cleanup is called walk through the list of shared
objects loaded, and close them and free the data structure.
Signed-off-by: Stephen Hemminger
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_options.c | 12
lib/eal/common/eal_options.h
From: Sinan Kaya
We want to be able to call rte_eal_init() and rte_eal_cleanup()
APIs back to back for maintanance reasons.
Here is a summary of the code we have seen so far:
1. some code support getting called multiple times by keeping
a static variable.
2. some code initializes once but never
From: Sinan Kaya
Initialize worker threads once and keep a flag
for other init calls.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal.c | 60 -
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
From: Sinan Kaya
Initialize interrupt thread once and keep a flag
for further init.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_interrupts.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index c9881143be..6a35b4ae
From: Sinan Kaya
Initialize heap area just once.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memory.c | 5 +
lib/eal/common/malloc_heap.c | 7 +++
2 files changed, 12 insertions(+)
diff --git a/lib/eal/common/eal_common_memory.c
b/lib/eal/common/eal_common_memory.c
From: Sinan Kaya
Initialize memory segments just once and bail out if called
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_memory.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 9
From: Sinan Kaya
Initialize memzone once and bail out if someone calls init
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
b/lib/eal/common/eal_common_memzone.c
in
From: Sinan Kaya
Allows tailq to be reinitialied multiple times
by looking up previously registered tailqs
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_tailqs.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lib/eal/common/eal_common_tailqs
From: Graham Whyte
reinitialize the solib link list and clean the globals holding
state for parsing.
Signed-off-by: Sinan Kaya
Signed-off-by: Graham Whyte
---
lib/eal/common/eal_common_options.c | 7 +++
lib/eal/linux/eal.c | 4 +++-
2 files changed, 10 insertions(+), 1 de
From: Sinan Kaya
We want to be able to call rte_eal_init() and rte_eal_cleanup()
APIs back to back for maintanance reasons.
Here is a summary of the code we have seen so far:
1. some code support getting called multiple times by keeping
a static variable.
2. some code initializes once but never
From: Sinan Kaya
Initialize worker threads once and keep a flag
for other init calls.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal.c | 68 -
1 file changed, 36 insertions(+), 32 deletions(-)
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
From: Sinan Kaya
Initialize interrupt thread once and keep a flag
for further init.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_interrupts.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index d52ec8eb4c..f141711f
From: Sinan Kaya
Initialize memory segments just once and bail out if called
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_memory.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 6
From: Sinan Kaya
Initialize heap area just once.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memory.c | 5 +
lib/eal/common/malloc_heap.c | 7 +++
2 files changed, 12 insertions(+)
diff --git a/lib/eal/common/eal_common_memory.c
b/lib/eal/common/eal_common_memory.c
From: Sinan Kaya
Initialize memzone once and bail out if someone calls init
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
b/lib/eal/common/eal_common_memzone.c
in
From: Sinan Kaya
Allows tailq to be reinitialied multiple times
by looking up previously registered tailqs
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_tailqs.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lib/eal/common/eal_common_tailqs
From: Graham Whyte
reinitialize the solib link list and clean the globals holding
state for parsing.
Signed-off-by: Sinan Kaya
Signed-off-by: Graham Whyte
---
lib/eal/common/eal_common_options.c | 7 +++
lib/eal/linux/eal.c | 4 +++-
2 files changed, 10 insertions(+), 1 de
From: Sinan Kaya
We want to be able to call rte_eal_init() and rte_eal_cleanup()
APIs back to back for maintanance reasons.
Here is a summary of the code we have seen so far:
1. some code support getting called multiple times by keeping
a static variable.
2. some code initializes once but never
From: Sinan Kaya
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal.c | 68 -
1 file changed, 36 insertions(+), 32 deletions(-)
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 5fd81d71cb..63190a4e70 100644
--- a/lib/eal/linux/eal.c
+++ b/li
From: Sinan Kaya
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_interrupts.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index d52ec8eb4c..aa296f153b 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal
From: Sinan Kaya
Initialize heap area just once.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memory.c | 5 +
lib/eal/common/malloc_heap.c | 6 ++
2 files changed, 11 insertions(+)
diff --git a/lib/eal/common/eal_common_memory.c
b/lib/eal/common/eal_common_memory.c
i
From: Sinan Kaya
Initialize memory segments just once and bail out if called
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/linux/eal_memory.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 60
From: Sinan Kaya
Initialize memzone once and bail out if someone calls init
multiple times.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
b/lib/eal/common/eal_common_memzone.c
ind
From: Sinan Kaya
Allows tailq to be reinitialied multiple times
by looking up previously registered tailqs
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_tailqs.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/lib/eal/common/eal_common_tailq
From: Graham Whyte
reinitialize the solib link list and clean the globals holding
state for parsing.
Signed-off-by: Sinan Kaya
Signed-off by: Graham Whyte
---
lib/eal/common/eal_common_options.c | 7 +++
lib/eal/linux/eal.c | 4 +++-
2 files changed, 10 insertions(+), 1 de
From: Sinan Kaya
We want to be able to call rte_eal_init() and rte_eal_cleanup()
APIs back to back for maintanance reasons.
Here is a summary of the code we have seen so far:
1. some code support getting called multiple times by keeping
a static variable.
2. some code initializes once but never
From: Sinan Kaya
In rte_eth_vdev_allocate result of call to rte_vdev_device_name is
dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/ethdev/ethdev_vdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ethdev/ethdev_vdev.h b/lib/ethdev/ethdev_vdev.h
index 364f140f
From: Sinan Kaya
In malloc_heap_free result of call to malloc_elem_free is dereferenced
here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
index 8827
From: Sinan Kaya
In malloc_elem_alloc result of call to elem_start_pt is dereferenced
here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_elem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/eal/common/malloc_elem.c b/lib/eal/common/malloc_elem.c
index 8f4981
From: Sinan Kaya
In malloc_elem_find_max_iova_contig result of call to rte_mem_virt2memseg
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_elem.c | 11 ---
lib/eal/common/malloc_heap.c | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
From: Sinan Kaya
In eal_memalloc_is_contig result of call to rte_fbarray_get
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memalloc.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memalloc.c
b/
From: Sinan Kaya
In alloc_pages_on_heap result of call to rte_mem_virt2memseg_list
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
From: Sinan Kaya
In malloc_heap_add_memory result of call to malloc_elem_join_adjacent_free
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/mallo
From: Sinan Kaya
In memzone_reserve_aligned_thread_unsafe result of call
to malloc_elem_from_data is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 4
1 file changed, 4 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
From: Sinan Kaya
rte_class_eth: eth_mac_cmp: The status of this call to rte_eth_dev_info_get
is not checked, potentially leaving dev_info uninitialized.
Signed-off-by: Sinan Kaya
---
lib/ethdev/rte_class_eth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/ethdev/rt
From: Sinan Kaya
Following up the codeql reported problems first submitted
by Stephen Hemminger here:
https://lore.kernel.org/all/20220527161210.77212d0b@hermes.local/t/
Posting a series of fixes about potential null pointer accesses.
Changes from v3:
- Dropped net/tap: check if name is null
-
From: Sinan Kaya
In memzone_lookup_thread_unsafe result of call to rte_fbarray_get
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memzone.
From: Sinan Kaya
In rte_eth_vdev_allocate result of call to rte_vdev_device_name is
dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/ethdev/ethdev_vdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ethdev/ethdev_vdev.h b/lib/ethdev/ethdev_vdev.h
index 364f140f
From: Sinan Kaya
In malloc_elem_alloc result of call to elem_start_pt is dereferenced
here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_elem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/eal/common/malloc_elem.c b/lib/eal/common/malloc_elem.c
index 8f4981
From: Sinan Kaya
In malloc_heap_free result of call to malloc_elem_free is dereferenced
here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
index 8827
From: Sinan Kaya
In eal_memalloc_is_contig result of call to rte_fbarray_get
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memalloc.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memalloc.c
b/
From: Sinan Kaya
In malloc_elem_find_max_iova_contig result of call to rte_mem_virt2memseg
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_elem.c | 11 ---
lib/eal/common/malloc_heap.c | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
From: Sinan Kaya
In alloc_pages_on_heap result of call to rte_mem_virt2memseg_list
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
From: Sinan Kaya
In memzone_reserve_aligned_thread_unsafe result of call
to malloc_elem_from_data is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 4
1 file changed, 4 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
From: Sinan Kaya
In malloc_heap_add_memory result of call to malloc_elem_join_adjacent_free
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/mallo
From: Sinan Kaya
In memzone_lookup_thread_unsafe result of call to rte_fbarray_get
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memzone.
From: Sinan Kaya
In rte_pmd_tun_probe result of call to rte_vdev_device_name is
dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
drivers/net/tap/rte_eth_tap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
in
From: Sinan Kaya
rte_class_eth: eth_mac_cmp: The status of this call to rte_eth_dev_info_get
is not checked, potentially leaving dev_info uninitialized.
Signed-off-by: Sinan Kaya
---
lib/ethdev/rte_class_eth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/ethdev/rt
From: Sinan Kaya
Following up the codeql reported problems first submitted
by Stephen Hemminger here:
https://lore.kernel.org/all/20220527161210.77212d0b@hermes.local/t/
Posting a series of fixes about potential null pointer accesses.
Changes from v1:
- Remove braces around single line stateme
From: Sinan Kaya
In malloc_elem_find_max_iova_contig result of call to rte_mem_virt2memseg
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_elem.c | 11 ---
lib/eal/common/malloc_heap.c | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
From: Sinan Kaya
In malloc_heap_free result of call to malloc_elem_free is dereferenced
here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
index 8827
From: Sinan Kaya
In eal_memalloc_is_contig result of call to rte_fbarray_get
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memalloc.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memalloc.c
b/
From: Sinan Kaya
In alloc_pages_on_heap result of call to rte_mem_virt2memseg_list
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
From: Sinan Kaya
In malloc_heap_add_memory result of call to malloc_elem_join_adjacent_free
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/mallo
From: Sinan Kaya
In memzone_reserve_aligned_thread_unsafe result of call
to malloc_elem_from_data is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 4
1 file changed, 4 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
From: Sinan Kaya
In memzone_lookup_thread_unsafe result of call to rte_fbarray_get
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memzone.
From: Sinan Kaya
In rte_pmd_tun_probe result of call to rte_vdev_device_name is
dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
drivers/net/tap/rte_eth_tap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
in
From: Sinan Kaya
rte_class_eth: eth_mac_cmp: The status of this call to rte_eth_dev_info_get
is not checked, potentially leaving dev_info uninitialized.
Signed-off-by: Sinan Kaya
---
lib/ethdev/rte_class_eth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/ethdev/rt
From: Sinan Kaya
Following up the codeql reported problems first submitted
by Stephen Hemminger here:
https://lore.kernel.org/all/20220527161210.77212d0b@hermes.local/t/
Posting a series of fixes about potential null pointer accesses.
Changes from v1:
- Remove braces around single line stateme
From: Sinan Kaya
In malloc_heap_free result of call to malloc_elem_free is dereferenced
here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
index 1bf2
From: Sinan Kaya
In eal_memalloc_is_contig result of call to rte_fbarray_get
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memalloc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memalloc.c
b/l
From: Sinan Kaya
In malloc_elem_find_max_iova_contig result of call to rte_mem_virt2memseg
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_elem.c | 11 ---
lib/eal/common/malloc_heap.c | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
From: Sinan Kaya
In memzone_lookup_thread_unsafe result of call to rte_fbarray_get
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memzone.
From: Sinan Kaya
In alloc_pages_on_heap result of call to rte_mem_virt2memseg_list
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
From: Sinan Kaya
In malloc_heap_add_memory result of call to malloc_elem_join_adjacent_free
is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/malloc_heap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/mall
From: Sinan Kaya
In memzone_reserve_aligned_thread_unsafe result of call
to malloc_elem_from_data is dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
lib/eal/common/eal_common_memzone.c | 4
1 file changed, 4 insertions(+)
diff --git a/lib/eal/common/eal_common_memzone.c
From: Sinan Kaya
In rte_pmd_tun_probe result of call to rte_vdev_device_name is
dereferenced here and may be null.
Signed-off-by: Sinan Kaya
---
drivers/net/tap/rte_eth_tap.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
i
From: Sinan Kaya
rte_class_eth: eth_mac_cmp: The status of this call to rte_eth_dev_info_get
is not checked, potentially leaving dev_info uninitialized.
Signed-off-by: Sinan Kaya
---
lib/ethdev/rte_class_eth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/ethdev/rt
From: Sinan Kaya
Following up the codeql reported problems first submitted
by Stephen Hemminger here:
https://lore.kernel.org/all/20220527161210.77212d0b@hermes.local/t/
Posting a series of fixes about potential null pointer accesses.
Sinan Kaya (11):
ethdev: check return result of rte_eth_d
88 matches
Mail list logo