The function kunmap_atomatic() is called on the same variable twice,
i.e. pt->v. In the second call, its parameter should be variable v
rather than pt->v.
Signed-off-by: Pan Bian
---
drivers/gpu/drm/gma500/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/g
In functions vpd_sections_init() and vpd_section_init(), iounmap() is
used to unmap memory. However, in these cases, memunmap() should be
used.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
V2: change error label err_iounmap to err_memunmap
V3: add changes from V1 to V2
---
drivers/fi
In functions vpd_sections_init() and vpd_section_init(), iounmap() is
used to unmap memory. However, in these cases, memunmap() should be
used.
Signed-off-by: Pan Bian
---
V2: change error label err_iounmap to err_memunmap
V3: add changes from V1 to V2
---
drivers/firmware/google/vpd.c | 10
dropped.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
kernel/kexec_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 9f48f44..94eeb38 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -627,7 +627,7 @@ stat
dropped.
Signed-off-by: Pan Bian
---
kernel/kexec_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 9f48f44..94eeb38 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -627,7 +627,7 @@ static int
In functions vpd_sections_init() and vpd_section_init(), iounmap() is
used to unmap memory. However, in these cases, memunmap() should be
used.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/firmware/google/vpd.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
In functions vpd_sections_init() and vpd_section_init(), iounmap() is
used to unmap memory. However, in these cases, memunmap() should be
used.
Signed-off-by: Pan Bian
---
drivers/firmware/google/vpd.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers
Function of_clk_get() returns an ERR_PTR on failures. In file
mtk_mdp_commp.c, its return value is checked against NULL. Such checks
cannot prevent from accessing bad memory. This patch replaces the NULL
checks with IS_ERR checks.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers
Function of_clk_get() returns an ERR_PTR on failures. In file
mtk_mdp_commp.c, its return value is checked against NULL. Such checks
cannot prevent from accessing bad memory. This patch replaces the NULL
checks with IS_ERR checks.
Signed-off-by: Pan Bian
---
drivers/media/platform/mtk-mdp
The return value of dma_map_single() should be checked by
dma_mapping_error(). However, in function flctl_dma_fifo0_transfer(), its
return value is checked against NULL, which could result in failures.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/mtd/nand/sh_flctl.c | 2 +-
The return value of dma_map_single() should be checked by
dma_mapping_error(). However, in function flctl_dma_fifo0_transfer(), its
return value is checked against NULL, which could result in failures.
Signed-off-by: Pan Bian
---
drivers/mtd/nand/sh_flctl.c | 2 +-
1 file changed, 1 insertion
The return value of dma_map_single() should be checked by
dma_mapping_error(). However, in function qla26xx_dport_diagnostics(), its
return value is checked against NULL, which could result in failures.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/scsi/qla2xxx/qla_mbx.c | 2
The return value of dma_map_single() should be checked by
dma_mapping_error(). However, in function qla26xx_dport_diagnostics(), its
return value is checked against NULL, which could result in failures.
Signed-off-by: Pan Bian
---
drivers/scsi/qla2xxx/qla_mbx.c | 2 +-
1 file changed, 1
The return value of dma_map_single() should be checked by
dma_mapping_error(). However, in function ccp_init_dm_workarea(), its
return value is checked against NULL, which could result in failures.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/crypto/ccp/ccp-ops.c | 2 +-
The return value of dma_map_single() should be checked by
dma_mapping_error(). However, in function ccp_init_dm_workarea(), its
return value is checked against NULL, which could result in failures.
Signed-off-by: Pan Bian
---
drivers/crypto/ccp/ccp-ops.c | 2 +-
1 file changed, 1 insertion
-off-by: Pan Bian <bianpan2...@163.com>
---
net/9p/trans_xen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 6ad3e04..c548781 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -389,7 +389,7 @@ static int xen_9pfs_front
-off-by: Pan Bian
---
net/9p/trans_xen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 6ad3e04..c548781 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -389,7 +389,7 @@ static int xen_9pfs_front_probe(struct xenbus_device
Function devm_ioremap() will return a NULL pointer on failure. However,
in function mxs_lradc_ts_probe(), its return value is checked with
IS_ERR(), which cannot detect the exceptional case.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/input/touchscreen/mxs-lradc-ts.c | 4 +
Function devm_ioremap() will return a NULL pointer on failure. However,
in function mxs_lradc_ts_probe(), its return value is checked with
IS_ERR(), which cannot detect the exceptional case.
Signed-off-by: Pan Bian
---
drivers/input/touchscreen/mxs-lradc-ts.c | 4 ++--
1 file changed, 2
In functions vpd_sections_init() and vpd_section_init(), iounmap() is
used to unmap memory. However, in these cases, memunmap() is better.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/firmware/google/vpd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
In functions vpd_sections_init() and vpd_section_init(), iounmap() is
used to unmap memory. However, in these cases, memunmap() is better.
Signed-off-by: Pan Bian
---
drivers/firmware/google/vpd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/google
In function kexec_calculate_store_digests(), kfree() is used to free
memory allocated by crypto_alloc_shash(). It is better to use function
crypto_free_shash(), which also zeroizes the memory to be freed.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
kernel/kexec_file.c | 2 +-
In function kexec_calculate_store_digests(), kfree() is used to free
memory allocated by crypto_alloc_shash(). It is better to use function
crypto_free_shash(), which also zeroizes the memory to be freed.
Signed-off-by: Pan Bian
---
kernel/kexec_file.c | 2 +-
1 file changed, 1 insertion(+), 1
In function xfs_test_remount_options(), kfree() is used to free memory
allocated by kmem_zalloc(). But it is better to use kmem_free().
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
fs/xfs/xfs_super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_super.
In function xfs_test_remount_options(), kfree() is used to free memory
allocated by kmem_zalloc(). But it is better to use kmem_free().
Signed-off-by: Pan Bian
---
fs/xfs/xfs_super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
The return value of scsi_host_alloc() should be released by
scsi_host_put(). However, in function mvs_pci_init(), kfree()
is used. This patch replaces kfree() with scsi_host_put() to avoid
possible memory leaks.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/scsi/mvsas/mv_init
The return value of scsi_host_alloc() should be released by
scsi_host_put(). However, in function mvs_pci_init(), kfree()
is used. This patch replaces kfree() with scsi_host_put() to avoid
possible memory leaks.
Signed-off-by: Pan Bian
---
drivers/scsi/mvsas/mv_init.c | 4 ++--
1 file changed
shost again, resulting in a double free bug. This patch removes
scsi_host_put() from pm8001_free() and explicitly calls scsi_host_put()
to release Scsi_Host in need.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/scsi/pm8001/pm8001_init.c | 5 ++---
1 file changed, 2 insertions
shost again, resulting in a double free bug. This patch removes
scsi_host_put() from pm8001_free() and explicitly calls scsi_host_put()
to release Scsi_Host in need.
Signed-off-by: Pan Bian
---
drivers/scsi/pm8001/pm8001_init.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff
Return value of scsi_host_alloc() should be released with
scsi_host_put() rather than kfree().
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_
Return value of scsi_host_alloc() should be released with
scsi_host_put() rather than kfree().
Signed-off-by: Pan Bian
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c
b/drivers/scsi
sages for options
transfers")
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/net/team/team.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index f8c81f1..85c0124 100644
--- a/drivers/net/team/team.c
+
sages for options
transfers")
Signed-off-by: Pan Bian
---
drivers/net/team/team.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index f8c81f1..85c0124 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/t
sages for
options transfers")
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/net/team/team.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index f8c81f1..85c0124 100644
--- a/drivers/net/team/team.c
+
sages for
options transfers")
Signed-off-by: Pan Bian
---
drivers/net/team/team.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index f8c81f1..85c0124 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
From: Pan Bian <bianpan2...@163.com>
Function radeon_fence_emit() returns -ENOMEM if there is no enough
memory. And in this case, function radeon_ring_unlock_undo() rather than
function radeon_ring_unlock_commit() should be called. However, in
function radeon_test_create_and_emit
From: Pan Bian
Function radeon_fence_emit() returns -ENOMEM if there is no enough
memory. And in this case, function radeon_ring_unlock_undo() rather than
function radeon_ring_unlock_commit() should be called. However, in
function radeon_test_create_and_emit_fence(), the return value
From: Pan Bian <bianpan2...@163.com>
Function radeon_ring_lock() returns an errno on failure, and its return
value should be validated. However, in functions r420_cp_errata_init()
and r420_cp_errata_fini(), its return value is not checked. This patch
adds the checks.
Signed-off-by: Pa
From: Pan Bian
Function radeon_ring_lock() returns an errno on failure, and its return
value should be validated. However, in functions r420_cp_errata_init()
and r420_cp_errata_fini(), its return value is not checked. This patch
adds the checks.
Signed-off-by: Pan Bian
---
drivers/gpu/drm
Function devm_kzalloc() will return a NULL pointer. However, in function
isp1704_charger_probe(), the return value of devm_kzalloc() is directly
used without validation. This may result in a bad memory access bug.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/power/
Function devm_kzalloc() will return a NULL pointer. However, in function
isp1704_charger_probe(), the return value of devm_kzalloc() is directly
used without validation. This may result in a bad memory access bug.
Signed-off-by: Pan Bian
---
drivers/power/supply/isp1704_charger.c | 4
1
In function team_nl_send_port_list_get(), pointer skb keeps the return
value of nlmsg_new(). When the call to genlmsg_put() fails, the memory
is not freed. This will result in a memory leak bug. This patch fixes
it.
Fixes: fbd69cda90e7 ("team: fix memory leak")
Signed-off-by: Pan Bian
In function team_nl_send_port_list_get(), pointer skb keeps the return
value of nlmsg_new(). When the call to genlmsg_put() fails, the memory
is not freed. This will result in a memory leak bug. This patch fixes
it.
Fixes: fbd69cda90e7 ("team: fix memory leak")
Signed-off-by
emory leak")
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/net/team/team.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index dd3a2e9..85c0124 100644
--- a/drivers/net/team/team.c
+++ b/drivers
emory leak")
Signed-off-by: Pan Bian
---
drivers/net/team/team.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index dd3a2e9..85c0124 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2361,8 +2361,10
From: Pan Bian <bianpan2...@163.com>
Function create_singlethread_workqueue() will return a NULL pointer if
there is no enough memory, and its return value should be validated
before using. However, in function rndis_wlan_bind(), its return value
is not checked. This may cause NULL deref
From: Pan Bian
Function create_singlethread_workqueue() will return a NULL pointer if
there is no enough memory, and its return value should be validated
before using. However, in function rndis_wlan_bind(), its return value
is not checked. This may cause NULL dereference bugs. This patch fixes
Function devm_kzalloc() will return a NULL pointer. However, in function
isp1704_charger_probe(), the return value of devm_kzalloc() is directly
used without validation. This may result in a bad memory access bug.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/power/
Function devm_kzalloc() will return a NULL pointer. However, in function
isp1704_charger_probe(), the return value of devm_kzalloc() is directly
used without validation. This may result in a bad memory access bug.
Signed-off-by: Pan Bian
---
drivers/power/supply/isp1704_charger.c | 2 ++
1 file
From: Pan Bian <bianpan2...@163.com>
Function pci_find_ext_capability() will returns 0 on failure, and its
return value should be checked before it is used. However, in function
pcie_port_enable_msix(), its return value is not checked. This patch
adds the check.
Signed-off-by: Pan Bian <
From: Pan Bian
Function pci_find_ext_capability() will returns 0 on failure, and its
return value should be checked before it is used. However, in function
pcie_port_enable_msix(), its return value is not checked. This patch
adds the check.
Signed-off-by: Pan Bian
---
drivers/pci/pcie
From: Pan Bian <bianpan2...@163.com>
Function radeon_fence_emit() returns -ENOMEM if there is no enough
memory. And in this case, function radeon_ring_unlock_undo() rather than
function radeon_ring_unlock_commit() should be called. However, in
function radeon_test_create_and_emit
From: Pan Bian
Function radeon_fence_emit() returns -ENOMEM if there is no enough
memory. And in this case, function radeon_ring_unlock_undo() rather than
function radeon_ring_unlock_commit() should be called. However, in
function radeon_test_create_and_emit_fence(), the return value
From: Pan Bian <bianpan2...@163.com>
Function radeon_ring_lock() returns an errno on failure, and its return
value should be validated. However, in functions r420_cp_errata_init()
and r420_cp_errata_fini(), its return value is not checked. This patch
adds the checks.
Signed-off-by: Pa
From: Pan Bian
Function radeon_ring_lock() returns an errno on failure, and its return
value should be validated. However, in functions r420_cp_errata_init()
and r420_cp_errata_fini(), its return value is not checked. This patch
adds the checks.
Signed-off-by: Pan Bian
---
drivers/gpu/drm
From: Pan Bian <bianpan2...@163.com>
Function create_singlethread_workqueue() will return a NULL pointer if
there is no enough memory, and its return value should be validated
before using. However, in function rndis_wlan_bind(), its return value
is not checked. This may cause NULL deref
From: Pan Bian
Function create_singlethread_workqueue() will return a NULL pointer if
there is no enough memory, and its return value should be validated
before using. However, in function rndis_wlan_bind(), its return value
is not checked. This may cause NULL dereference bugs. This patch fixes
From: Pan Bian <bianpan2...@163.com>
Function alloc_workqueue() will return a NULL pointer if there is no
enough memory, and its return value should be validated before using.
However, in function if_spi_probe(), its return value is not checked.
This may result in a NULL dereferen
From: Pan Bian
Function alloc_workqueue() will return a NULL pointer if there is no
enough memory, and its return value should be validated before using.
However, in function if_spi_probe(), its return value is not checked.
This may result in a NULL dereference bug. This patch fixes the bug
From: Pan Bian <bianpan2...@163.com>
In functions cx25840_initialize(), cx231xx_initialize(), and
cx23885_initialize(), the return value of create_singlethread_workqueue()
is used without validation. This may result in NULL dereference and cause
kernel crash. This patch fixes it.
Sign
From: Pan Bian
In functions cx25840_initialize(), cx231xx_initialize(), and
cx23885_initialize(), the return value of create_singlethread_workqueue()
is used without validation. This may result in NULL dereference and cause
kernel crash. This patch fixes it.
Signed-off-by: Pan Bian
From: Pan Bian <bianpan2...@163.com>
Function devm_ioremap() will return a NULL pointer if it fails to remap
IO address, and its return value should be validated before it is used.
However, in function gemini_rtc_probe(), its return value is not
checked. This may result in bad memory acces
From: Pan Bian
Function devm_ioremap() will return a NULL pointer if it fails to remap
IO address, and its return value should be validated before it is used.
However, in function gemini_rtc_probe(), its return value is not
checked. This may result in bad memory access bugs on future access,
e.g
From: Pan Bian <bianpan2...@163.com>
unction devm_regmap_init_i2c() returns an ERR_PTR on errors, and its
return value should be checked before it is dereferenced. However, in
function intel_soc_pmic_i2c_probe(), the return value of function
devm_regmap_init_i2c() is used without vali
From: Pan Bian
unction devm_regmap_init_i2c() returns an ERR_PTR on errors, and its
return value should be checked before it is dereferenced. However, in
function intel_soc_pmic_i2c_probe(), the return value of function
devm_regmap_init_i2c() is used without validation. This patch fixes
From: Pan Bian <bianpan2...@163.com>
Function pci_find_ext_capability() may return 0, which is an invalid
address. In function cobalt_pcie_status_show(), its return value is used
without validation. This patch adds checks to validate the return
address.
Signed-off-by: Pan Bian <bianpa
From: Pan Bian
Function pci_find_ext_capability() may return 0, which is an invalid
address. In function cobalt_pcie_status_show(), its return value is used
without validation. This patch adds checks to validate the return
address.
Signed-off-by: Pan Bian
---
drivers/media/pci/cobalt/cobalt
From: Pan Bian <bianpan2...@163.com>
Function pci_find_ext_capability() may return 0, which is an invalid
address. In function qlcnic_sriov_virtid_fn(), its return value is used
without validation. This may result in invalid memory access bugs. This
patch fixes the bug.
Signed-off-by: Pa
From: Pan Bian
Function pci_find_ext_capability() may return 0, which is an invalid
address. In function qlcnic_sriov_virtid_fn(), its return value is used
without validation. This may result in invalid memory access bugs. This
patch fixes the bug.
Signed-off-by: Pan Bian
---
drivers/net
From: Pan Bian <bianpan2...@163.com>
Function dev_alloc_skb() will return a NULL pointer if there is no
enough memory. However, in function WILC_WFI_mon_xmit(), its return
value is used without validation. This may result in a bad memory access
bug. This patch fixes the bug.
Signed-off-b
From: Pan Bian
Function dev_alloc_skb() will return a NULL pointer if there is no
enough memory. However, in function WILC_WFI_mon_xmit(), its return
value is used without validation. This may result in a bad memory access
bug. This patch fixes the bug.
Signed-off-by: Pan Bian
---
drivers
From: Pan Bian <bianpan2...@163.com>
Function usb_autopm_get_interface() will return a negative errno on
failure, and function usb_autopm_put_interface() should not be called if
it fails. However, in function usb_remove_device(), the return value of
function usb_autopm_get_int
From: Pan Bian
Function usb_autopm_get_interface() will return a negative errno on
failure, and function usb_autopm_put_interface() should not be called if
it fails. However, in function usb_remove_device(), the return value of
function usb_autopm_get_interface() is not validated before calling
From: Pan Bian <bianpan2...@163.com>
In function amd_iommu_bind_pasid(), the control flow jumps to label
out_free when pasid_state->mm and mm is NULL. And mmput(mm) is called.
In function mmput(mm), mm is referenced without validation. This will
result in a NULL dereference bug. This pa
From: Pan Bian
In function amd_iommu_bind_pasid(), the control flow jumps to label
out_free when pasid_state->mm and mm is NULL. And mmput(mm) is called.
In function mmput(mm), mm is referenced without validation. This will
result in a NULL dereference bug. This patch fixes the bug.
Signed-
From: Pan Bian <bianpan2...@163.com>
Function of_address_to_resource() tries to translate device tree address
and return as resource. If the translation fails, it will return a
negative errno. However, function xilly_drv_probe() does not validate
its return value, which may result in a bad
From: Pan Bian
Function of_address_to_resource() tries to translate device tree address
and return as resource. If the translation fails, it will return a
negative errno. However, function xilly_drv_probe() does not validate
its return value, which may result in a bad memory access bug
From: Pan Bian <bianpan2...@163.com>
Function platform_get_irq() will return a negative value on errors.
However, in function bcmgenet_probe(), 0 is considered as a flag of
error. This patch fixes the bug by checking whether the return value of
platform_get_irq() is less than 0.
Sign
From: Pan Bian
Function platform_get_irq() will return a negative value on errors.
However, in function bcmgenet_probe(), 0 is considered as a flag of
error. This patch fixes the bug by checking whether the return value of
platform_get_irq() is less than 0.
Signed-off-by: Pan Bian
---
drivers
From: Pan Bian <bianpan2...@163.com>
Function pci_ioremap_bar() will return a NULL pointer if there is no
enough memory. However, in function apci3xxx_auto_attach(), the return
value of function pci_ioremap_bar() is not validated. This may result in
NULL dereference in following access
From: Pan Bian
Function pci_ioremap_bar() will return a NULL pointer if there is no
enough memory. However, in function apci3xxx_auto_attach(), the return
value of function pci_ioremap_bar() is not validated. This may result in
NULL dereference in following access to dev->mmio. This patch fi
From: Pan Bian <bianpan2...@163.com>
In function pc300_pci_init_one(), on the ioremap error path, function
pc300_pci_remove_one() is called to free the allocated memory. However,
the path is not terminated, and the freed memory will be used later,
resulting in use-after-free bugs. This path
From: Pan Bian
In function pc300_pci_init_one(), on the ioremap error path, function
pc300_pci_remove_one() is called to free the allocated memory. However,
the path is not terminated, and the freed memory will be used later,
resulting in use-after-free bugs. This path fixes the bug.
Signed-off
From: Pan Bian <bianpan2...@163.com>
Function kthread_create() returns an ERR_PTR on error. However, in
function s5k83a_start(), its return value is used without validation.
This may result in a bad memory access bug. This patch fixes the bug.
Signed-off-by: Pan Bian <bianpan2..
From: Pan Bian
Function kthread_create() returns an ERR_PTR on error. However, in
function s5k83a_start(), its return value is used without validation.
This may result in a bad memory access bug. This patch fixes the bug.
Signed-off-by: Pan Bian
---
drivers/media/usb/gspca/m5602
Function alloc_skb() will return a NULL pointer when there is no enough
memory. However, the return value of alloc_skb() is directly used
without validation in function send_fw_pass_open_req(). This patches
checks the return value of alloc_skb() against NULL.
Signed-off-by: Pan Bian <bianp
Function alloc_skb() will return a NULL pointer when there is no enough
memory. However, the return value of alloc_skb() is directly used
without validation in function send_fw_pass_open_req(). This patches
checks the return value of alloc_skb() against NULL.
Signed-off-by: Pan Bian
---
drivers
Function devm_kzalloc() will return a NULL pointer if there is no enough
memory. However, in function isp1704_charger_probe(), the return value
of devm_kzalloc() is used without validation. This may result in a bad
memory access bug. This patch fixes the bug.
Signed-off-by: Pan Bian <bianp
Function devm_kzalloc() will return a NULL pointer if there is no enough
memory. However, in function isp1704_charger_probe(), the return value
of devm_kzalloc() is used without validation. This may result in a bad
memory access bug. This patch fixes the bug.
Signed-off-by: Pan Bian
---
drivers
In function team_nl_send_options_get(), pointer skb keeps the return
value of function nlmsg_new(). When the call to genlmsg_put() fails, the
control flow directly returns and does not free skb. This will result in
a memory leak bug. This patch fixes it.
Signed-off-by: Pan Bian <bianpan2...@
In function team_nl_send_options_get(), pointer skb keeps the return
value of function nlmsg_new(). When the call to genlmsg_put() fails, the
control flow directly returns and does not free skb. This will result in
a memory leak bug. This patch fixes it.
Signed-off-by: Pan Bian
---
drivers/net
In function team_nl_send_port_list_get(), pointer skb keeps the return
value of nlmsg_new(). When the call to genlmsg_put() fails, the memory
is not freed. This will result in a memory leak bug. This patch fixes
it.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/net/team/team
In function team_nl_send_port_list_get(), pointer skb keeps the return
value of nlmsg_new(). When the call to genlmsg_put() fails, the memory
is not freed. This will result in a memory leak bug. This patch fixes
it.
Signed-off-by: Pan Bian
---
drivers/net/team/team.c | 4 +++-
1 file changed, 3
-by: Pan Bian <bianpan2...@163.com>
---
net/tipc/node.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 4512e83..568e48d 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -2098,6 +2098,8 @@ int tipc_nl_node_get_monitor(struct sk_buff *skb,
-by: Pan Bian
---
net/tipc/node.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 4512e83..568e48d 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -2098,6 +2098,8 @@ int tipc_nl_node_get_monitor(struct sk_buff *skb, struct
genl_info *info)
int
Function alloc_skb() will return a NULL pointer if there is no enough
memory. However, in function mt7601u_mcu_msg_alloc(), its return value
is not validated before it is used. This patch fixes it.
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
drivers/net/wireless/mediatek/mt7601u/mcu.
Function alloc_skb() will return a NULL pointer if there is no enough
memory. However, in function mt7601u_mcu_msg_alloc(), its return value
is not validated before it is used. This patch fixes it.
Signed-off-by: Pan Bian
---
drivers/net/wireless/mediatek/mt7601u/mcu.c | 10 --
1 file
of xdr_inline_decode().
Signed-off-by: Pan Bian <bianpan2...@163.com>
---
fs/nfs/nfs4xdr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 80ce289..81afbbd 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -5579,6 +5579,8 @@ static int decode_
of xdr_inline_decode().
Signed-off-by: Pan Bian
---
fs/nfs/nfs4xdr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 80ce289..81afbbd 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -5579,6 +5579,8 @@ static int decode_op_map(struct xdr_stream
-off-by: Pan Bian <bianpan2...@163.com>
---
net/openvswitch/datapath.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 9c62b63..34c0fbd 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/data
101 - 200 of 375 matches
Mail list logo