[PATCH] media: dw2102: Fix use after free

2019-08-22 Thread Anton Vasilyev
n heap to prevent memleak and use after free. Also fixes s421_properties.devices initialization to have 2 element instead of 6 copied from p7500_properties. Signed-off-by: Anton Vasilyev Fixes: 299c7007e936 ("media: dw2102: Fix memleak on sequence of probes") --- drivers/media/usb/dvb-us

[PATCH] usb: gadget: fotg210-udc: Fix memory leak of fotg210->ep[i]

2018-08-07 Thread Anton Vasilyev
There is no deallocation of fotg210->ep[i] elements, allocated at fotg210_udc_probe. The patch adds deallocation of fotg210->ep array elements and simplifies error path of fotg210_udc_probe(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Va

[PATCH] usb: gadget: fotg210-udc: Fix memory leak of fotg210->ep[i]

2018-08-07 Thread Anton Vasilyev
There is no deallocation of fotg210->ep[i] elements, allocated at fotg210_udc_probe. The patch adds deallocation of fotg210->ep array elements and simplifies error path of fotg210_udc_probe(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Va

[PATCH v2] serial: mxs-auart: Fix potential infinite loop

2018-08-07 Thread Anton Vasilyev
lid for signed and unsigned types. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: mistype in patch as result of combination of different fixes. Change comment and leave enum type. --- drivers/tty/serial/mxs-auart.c | 3 ++- 1 file changed

[PATCH v2] serial: mxs-auart: Fix potential infinite loop

2018-08-07 Thread Anton Vasilyev
lid for signed and unsigned types. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: mistype in patch as result of combination of different fixes. Change comment and leave enum type. --- drivers/tty/serial/mxs-auart.c | 3 ++- 1 file changed

[PATCH] serial: mxs-auart: Fix potential infinite loop

2018-08-06 Thread Anton Vasilyev
int. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/tty/serial/mxs-auart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 76aa289652f7..89b34bb09

[PATCH] serial: mxs-auart: Fix potential infinite loop

2018-08-06 Thread Anton Vasilyev
int. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/tty/serial/mxs-auart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 76aa289652f7..89b34bb09

[PATCH] pinctrl: axp209: Fix NULL pointer dereference after allocation

2018-08-06 Thread Anton Vasilyev
There is no check that allocation in axp20x_funcs_groups_from_mask is successful. The patch adds corresponding check and return values. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/pinctrl/pinctrl-axp209.c | 26

[PATCH] pinctrl: axp209: Fix NULL pointer dereference after allocation

2018-08-06 Thread Anton Vasilyev
There is no check that allocation in axp20x_funcs_groups_from_mask is successful. The patch adds corresponding check and return values. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/pinctrl/pinctrl-axp209.c | 26

[PATCH v2] tty: rocket: Fix possible buffer overwrite on register_PCI

2018-08-06 Thread Anton Vasilyev
cation project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: do not enable device which will not be managed by driver. Based on Alan's comment. NOTE: I can't find if there is a call of pci_disable_device(), corresponding to pci_enable_device() from register_PCI(). --- drivers/tty/rocket

[PATCH v2] tty: rocket: Fix possible buffer overwrite on register_PCI

2018-08-06 Thread Anton Vasilyev
cation project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: do not enable device which will not be managed by driver. Based on Alan's comment. NOTE: I can't find if there is a call of pci_disable_device(), corresponding to pci_enable_device() from register_PCI(). --- drivers/tty/rocket

Re: [PATCH v5] staging: rts5208: add error handling into rtsx_probe

2018-08-01 Thread Anton Vasilyev
I found that staging-next already contains my patch v3, committed by Greg Kroah-Hartman. Do I need to send a new patch with a label renaming based on Dan Carpenter comments? -- Anton Vasilyev Linux Verification Center, ISPRAS web: http://linuxtesting.org e-mail: vasil...@ispras.ru

Re: [PATCH v5] staging: rts5208: add error handling into rtsx_probe

2018-08-01 Thread Anton Vasilyev
I found that staging-next already contains my patch v3, committed by Greg Kroah-Hartman. Do I need to send a new patch with a label renaming based on Dan Carpenter comments? -- Anton Vasilyev Linux Verification Center, ISPRAS web: http://linuxtesting.org e-mail: vasil...@ispras.ru

[PATCH v5] staging: rts5208: add error handling into rtsx_probe

2018-08-01 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then release_everything() will crash on uninitialized dev->cmnd_ready complete. Patch adds an error handling into rtsx_probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v5: fix mistype and

[PATCH v5] staging: rts5208: add error handling into rtsx_probe

2018-08-01 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then release_everything() will crash on uninitialized dev->cmnd_ready complete. Patch adds an error handling into rtsx_probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v5: fix mistype and

[PATCH v2] HID: intel_ish-hid: tx_buf memory leak on probe/remove

2018-08-01 Thread Anton Vasilyev
tch replaces kzalloc allocation by devm_kzalloc and removes ishtp_device *dev deallocation by kfree. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Acked-by: Srinivas Pandruvada --- v2: Fix align for multi line statements --- drivers/hid/intel-ish-

[PATCH v2] HID: intel_ish-hid: tx_buf memory leak on probe/remove

2018-08-01 Thread Anton Vasilyev
tch replaces kzalloc allocation by devm_kzalloc and removes ishtp_device *dev deallocation by kfree. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Acked-by: Srinivas Pandruvada --- v2: Fix align for multi line statements --- drivers/hid/intel-ish-

[PATCH] misc: ti-st: Fix memory leak in the error path of probe()

2018-07-27 Thread Anton Vasilyev
Free resources instead of direct return of the error code if kim_probe fails. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/misc/ti-st/st_kim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/ti-st

[PATCH] misc: ti-st: Fix memory leak in the error path of probe()

2018-07-27 Thread Anton Vasilyev
Free resources instead of direct return of the error code if kim_probe fails. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/misc/ti-st/st_kim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/ti-st

[PATCH] fmc: Fix memory leak and NULL pointer dereference

2018-07-27 Thread Anton Vasilyev
There is no deallocation of fmc memory, allocated at ff_dev_create() by kmemdup(), and no check on kmemdup() success. The patch adds deallocation into ff_dev_release() and adds check on allocation success. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton

[PATCH] fmc: Fix memory leak and NULL pointer dereference

2018-07-27 Thread Anton Vasilyev
There is no deallocation of fmc memory, allocated at ff_dev_create() by kmemdup(), and no check on kmemdup() success. The patch adds deallocation into ff_dev_release() and adds check on allocation success. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton

[PATCH] regulator: tps65217: Fix NULL pointer dereference on probe

2018-07-27 Thread Anton Vasilyev
There is no check that tps->strobes is allocated successfully in tps65217_regulator_probe(). The patch adds corresponding check. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/regulator/tps65217-regulator.c | 2 ++ 1 file changed

[PATCH] regulator: tps65217: Fix NULL pointer dereference on probe

2018-07-27 Thread Anton Vasilyev
There is no check that tps->strobes is allocated successfully in tps65217_regulator_probe(). The patch adds corresponding check. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/regulator/tps65217-regulator.c | 2 ++ 1 file changed

[PATCH] tty: rocket: Fix possible buffer overwrite on register_PCI

2018-07-27 Thread Anton Vasilyev
cation project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/tty/rocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c index bdd17d2aaafd..b121d8f8f3d7 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c @@ -

[PATCH] tty: rocket: Fix possible buffer overwrite on register_PCI

2018-07-27 Thread Anton Vasilyev
cation project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/tty/rocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c index bdd17d2aaafd..b121d8f8f3d7 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c @@ -

[PATCH] media: davinci: vpif_display: Mix memory leak on probe error path

2018-07-27 Thread Anton Vasilyev
project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/media/platform/davinci/vpif_display.c | 24 --- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index

[PATCH] media: davinci: vpif_display: Mix memory leak on probe error path

2018-07-27 Thread Anton Vasilyev
project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/media/platform/davinci/vpif_display.c | 24 --- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index

[PATCH v2] firmware: vpd: Fix section enabled flag on vpd_section_destroy

2018-07-24 Thread Anton Vasilyev
Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: add cleanup on the error path of vpd_sections_init --- drivers/firmware/google/vpd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c

[PATCH v2] firmware: vpd: Fix section enabled flag on vpd_section_destroy

2018-07-24 Thread Anton Vasilyev
Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: add cleanup on the error path of vpd_sections_init --- drivers/firmware/google/vpd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c

[PATCH] HID: intel_ish-hid: tx_buf memory leak on probe/remove

2018-07-24 Thread Anton Vasilyev
tch replaces kzalloc allocation by devm_kzalloc and removes ishtp_device *dev deallocation by kfree. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/hid/intel-ish-hid/ipc/ipc.c | 7 +-- drivers/hid/intel-ish-hid/ipc/pci-ish.c | 2 --

[PATCH] HID: intel_ish-hid: tx_buf memory leak on probe/remove

2018-07-24 Thread Anton Vasilyev
tch replaces kzalloc allocation by devm_kzalloc and removes ishtp_device *dev deallocation by kfree. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/hid/intel-ish-hid/ipc/ipc.c | 7 +-- drivers/hid/intel-ish-hid/ipc/pci-ish.c | 2 --

HID: intel_ish-hid: tx_buf memory leak on probe/remove

2018-07-23 Thread Anton Vasilyev
n project (linuxtesting.org). -- Anton Vasilyev Linux Verification Center, ISPRAS web: http://linuxtesting.org e-mail: vasil...@ispras.ru

HID: intel_ish-hid: tx_buf memory leak on probe/remove

2018-07-23 Thread Anton Vasilyev
n project (linuxtesting.org). -- Anton Vasilyev Linux Verification Center, ISPRAS web: http://linuxtesting.org e-mail: vasil...@ispras.ru

[PATCH] gpio: ml-ioh: Fix buffer underwrite on probe error path

2018-07-23 Thread Anton Vasilyev
chip_save array. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/gpio/gpio-ml-ioh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c index b23d9a36be1f..51c7d1b84c2e

[PATCH] gpio: ml-ioh: Fix buffer underwrite on probe error path

2018-07-23 Thread Anton Vasilyev
chip_save array. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/gpio/gpio-ml-ioh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c index b23d9a36be1f..51c7d1b84c2e

[PATCH] firmware: vpd: Fix section enabled flag on vpd_section_destroy

2018-07-23 Thread Anton Vasilyev
-by: Anton Vasilyev --- drivers/firmware/google/vpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c index e9db895916c3..5347c17c7108 100644 --- a/drivers/firmware/google/vpd.c +++ b/drivers/firmware/google/vpd.c @@ -246,6 +246,7

[PATCH] firmware: vpd: Fix section enabled flag on vpd_section_destroy

2018-07-23 Thread Anton Vasilyev
-by: Anton Vasilyev --- drivers/firmware/google/vpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c index e9db895916c3..5347c17c7108 100644 --- a/drivers/firmware/google/vpd.c +++ b/drivers/firmware/google/vpd.c @@ -246,6 +246,7

[PATCH] uwb: hwa-rc: fix memory leak at probe

2018-07-06 Thread Anton Vasilyev
hwarc_probe() allocates memory for hwarc, but does not free it if uwb_rc_add() or hwarc_get_version() fail. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/uwb/hwa-rc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/uwb/hwa

[PATCH] uwb: hwa-rc: fix memory leak at probe

2018-07-06 Thread Anton Vasilyev
hwarc_probe() allocates memory for hwarc, but does not free it if uwb_rc_add() or hwarc_get_version() fail. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/uwb/hwa-rc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/uwb/hwa

[PATCH v4] staging: rts5208: add error handling into rtsx_probe

2018-06-19 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then release_everything() will crash on uninitialized dev->cmnd_ready complete Patch adds error handling into rtsx_probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v4: rename labels baced

[PATCH v4] staging: rts5208: add error handling into rtsx_probe

2018-06-19 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then release_everything() will crash on uninitialized dev->cmnd_ready complete Patch adds error handling into rtsx_probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v4: rename labels baced

[PATCH v3] staging: rts5208: add error handling into rtsx_probe

2018-06-13 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then release_everything() will crash on uninitialized dev->cmnd_ready complete. Patch adds error handling into rtsx_probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v3: fix subject and

[PATCH v3] staging: rts5208: add error handling into rtsx_probe

2018-06-13 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then release_everything() will crash on uninitialized dev->cmnd_ready complete. Patch adds error handling into rtsx_probe. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v3: fix subject and

[no subject]

2018-06-13 Thread Anton Vasilyev
roject (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v3: fix subject and commit message v2: Add error handling into rtsx_probe based on Dan Carpenter's comment. I do not have corresponding hardware, so patch was tested by compilation only. I faced with inaccuracy at rtsx_remove() and original rtsx

[no subject]

2018-06-13 Thread Anton Vasilyev
roject (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v3: fix subject and commit message v2: Add error handling into rtsx_probe based on Dan Carpenter's comment. I do not have corresponding hardware, so patch was tested by compilation only. I faced with inaccuracy at rtsx_remove() and original rtsx

[PATCH v2] staging: rts5208: add check on NULL before dereference

2018-06-13 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then NULL pointer dereference occurs at release_everything()->rtsx_release_resources(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: Add error handling into rtsx_probe based on Dan Carpe

[PATCH v2] staging: rts5208: add check on NULL before dereference

2018-06-13 Thread Anton Vasilyev
If rtsx_probe() fails to allocate dev->chip, then NULL pointer dereference occurs at release_everything()->rtsx_release_resources(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: Add error handling into rtsx_probe based on Dan Carpe

[PATCH] staging: rts5208: add check on NULL before dereference

2018-06-09 Thread Anton Vasilyev
ect (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/staging/rts5208/rtsx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 70e0b8623110..952dd0d580cf 100644 --- a/drivers/staging/rts5208/rtsx.c ++

[PATCH] staging: rts5208: add check on NULL before dereference

2018-06-09 Thread Anton Vasilyev
ect (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/staging/rts5208/rtsx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 70e0b8623110..952dd0d580cf 100644 --- a/drivers/staging/rts5208/rtsx.c ++

Re: [PATCH] udc: Memory leak on error path and use after free

2017-08-22 Thread Anton Vasilyev
Sorry for delayed reply. On 16.08.2017 19:35, Alan Stern wrote: On Wed, 16 Aug 2017, Anton Vasilyev wrote: On 16.08.2017 18:29, Alan Stern wrote: On Wed, 16 Aug 2017, Anton Vasilyev wrote: gadget_release() is responsible for cleanup dev memory. But if net2280_probe() fails after dev

Re: [PATCH] udc: Memory leak on error path and use after free

2017-08-22 Thread Anton Vasilyev
Sorry for delayed reply. On 16.08.2017 19:35, Alan Stern wrote: On Wed, 16 Aug 2017, Anton Vasilyev wrote: On 16.08.2017 18:29, Alan Stern wrote: On Wed, 16 Aug 2017, Anton Vasilyev wrote: gadget_release() is responsible for cleanup dev memory. But if net2280_probe() fails after dev

[PATCH v3] mtd: plat-ram: Replace manual resource management by devm

2017-08-22 Thread Anton Vasilyev
Driver contains unsuitable request_mem_region() and release_resource() calls. The patch switches manual resource management by devm interface for readability and error-free simplification. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <va

[PATCH v3] mtd: plat-ram: Replace manual resource management by devm

2017-08-22 Thread Anton Vasilyev
Driver contains unsuitable request_mem_region() and release_resource() calls. The patch switches manual resource management by devm interface for readability and error-free simplification. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Suggested

[PATCH v2] mtd: plat-ram: use release_mem_region instead of release_resource

2017-08-16 Thread Anton Vasilyev
Replace ioremap() and request_mem_region() by devm_ioremap_resource(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> Suggested-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- v1: Fix commit based on Bor

[PATCH v2] mtd: plat-ram: use release_mem_region instead of release_resource

2017-08-16 Thread Anton Vasilyev
Replace ioremap() and request_mem_region() by devm_ioremap_resource(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Suggested-by: Boris Brezillon --- v1: Fix commit based on Boris Brezillon review --- v2: Change commit by Boris Brezillon solution

Re: [PATCH] udc: Memory leak on error path and use after free

2017-08-16 Thread Anton Vasilyev
On 16.08.2017 18:29, Alan Stern wrote: On Wed, 16 Aug 2017, Anton Vasilyev wrote: gadget_release() is responsible for cleanup dev memory. But if net2280_probe() fails after dev allocation, then gadget_release() become unregistered and dev memory leaks. This isn't needed

Re: [PATCH] udc: Memory leak on error path and use after free

2017-08-16 Thread Anton Vasilyev
On 16.08.2017 18:29, Alan Stern wrote: On Wed, 16 Aug 2017, Anton Vasilyev wrote: gadget_release() is responsible for cleanup dev memory. But if net2280_probe() fails after dev allocation, then gadget_release() become unregistered and dev memory leaks. This isn't needed

[PATCH] udc: Memory leak on error path and use after free

2017-08-16 Thread Anton Vasilyev
that dev will be deallocated exactly after this call and leads to use after free. The patch moves deallocation from gadget_release() to net2280_remove(). Found by Linux Driver Verififcation project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- drivers/usb/gadg

[PATCH] udc: Memory leak on error path and use after free

2017-08-16 Thread Anton Vasilyev
that dev will be deallocated exactly after this call and leads to use after free. The patch moves deallocation from gadget_release() to net2280_remove(). Found by Linux Driver Verififcation project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/usb/gadget/udc/net2280.c | 14

[PATCH v1] mtd: plat-ram: use release_mem_region instead of release_resource

2017-08-15 Thread Anton Vasilyev
Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting. Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- v1: Fix commit based on Boris Brezillon review --- drivers/mtd/maps/plat-ram.c | 4 ++--

[PATCH v1] mtd: plat-ram: use release_mem_region instead of release_resource

2017-08-15 Thread Anton Vasilyev
Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting. Signed-off-by: Anton Vasilyev --- v1: Fix commit based on Boris Brezillon review --- drivers/mtd/maps/plat-ram.c | 4 ++-- 1 file changed, 2

[PATCH v4] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove

2017-08-15 Thread Anton Vasilyev
resources are under devm control. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- v2: Drop initialization of sec_dai by NULL at samsung_i2s_remove as Sylwester Nawrocki suggest. --- v3: Fix typo in the comment --- v4: Chan

[PATCH v4] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove

2017-08-15 Thread Anton Vasilyev
resources are under devm control. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: Drop initialization of sec_dai by NULL at samsung_i2s_remove as Sylwester Nawrocki suggest. --- v3: Fix typo in the comment --- v4: Change comment based on Krzysz

[PATCH v3] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove

2017-08-11 Thread Anton Vasilyev
nux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- v2: Drop initialization of sec_dai by NULL at samsung_i2s_remove as Sylwester Nawrocki suggest. --- v3: Fix typo in the comment --- sound/soc/samsung/i2s.c | 6 +- 1 file changed, 1

[PATCH v3] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove

2017-08-11 Thread Anton Vasilyev
nux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: Drop initialization of sec_dai by NULL at samsung_i2s_remove as Sylwester Nawrocki suggest. --- v3: Fix typo in the comment --- sound/soc/samsung/i2s.c | 6 +- 1 file changed, 1 insertion(+), 5 deletion

[PATCH] video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path

2017-08-11 Thread Anton Vasilyev
If dlfb_usb_probe drops to error path then there is only one kref_init() call and no kref_get(), so second kref_put() leads to use after free. The patch removes superfluous kref_put on dlfb_usb_probe error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton

[PATCH] video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path

2017-08-11 Thread Anton Vasilyev
If dlfb_usb_probe drops to error path then there is only one kref_init() call and no kref_get(), so second kref_put() leads to use after free. The patch removes superfluous kref_put on dlfb_usb_probe error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton

[PATCH] mISDN: Fix null pointer dereference at mISDN_FsmNew

2017-08-11 Thread Anton Vasilyev
If mISDN_FsmNew() fails to allocate memory for jumpmatrix then null pointer dereference will occur on any write to jumpmatrix. The patch adds check on successful allocation and corresponding error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton

[PATCH] mISDN: Fix null pointer dereference at mISDN_FsmNew

2017-08-11 Thread Anton Vasilyev
If mISDN_FsmNew() fails to allocate memory for jumpmatrix then null pointer dereference will occur on any write to jumpmatrix. The patch adds check on successful allocation and corresponding error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton

[PATCH] mtd: plat-ram: use release_mem_region instead of release_resource

2017-08-11 Thread Anton Vasilyev
Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting. Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- drivers/mtd/maps/plat-ram.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[PATCH] mtd: plat-ram: use release_mem_region instead of release_resource

2017-08-11 Thread Anton Vasilyev
Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting. Signed-off-by: Anton Vasilyev --- drivers/mtd/maps/plat-ram.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mtd

[PATCH v2] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove

2017-08-11 Thread Anton Vasilyev
nux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- v2: Drop initialization of sec_dai at samsung_i2s_remove as Sylwester Nawrocki suggest. --- sound/soc/samsung/i2s.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff -

[PATCH v2] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove

2017-08-11 Thread Anton Vasilyev
nux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: Drop initialization of sec_dai at samsung_i2s_remove as Sylwester Nawrocki suggest. --- sound/soc/samsung/i2s.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/samsung/i2s

[PATCH v2] hwmon:(stts751) buffer overread on wrong chip configuration

2017-08-10 Thread Anton Vasilyev
Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- v2: Fixed Guenter's remark about comparison --- drivers/hwmon/stts751.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/hwmon/stts751.c b/drivers/hwmon/stts751.c index d562

[PATCH v2] hwmon:(stts751) buffer overread on wrong chip configuration

2017-08-10 Thread Anton Vasilyev
Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: Fixed Guenter's remark about comparison --- drivers/hwmon/stts751.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/hwmon/stts751.c b/drivers/hwmon/stts751.c index d56251d..3f940fb 100644 --- a/d

[PATCH] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove

2017-08-10 Thread Anton Vasilyev
nux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- sound/soc/samsung/i2s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index af3ba4d..6beeea8 100644 --- a/sound/s

[PATCH] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove

2017-08-10 Thread Anton Vasilyev
nux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- sound/soc/samsung/i2s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index af3ba4d..6beeea8 100644 --- a/sound/soc/samsung/i2s.c +++ b

[PATCH] dmaengine: qcom_hidma: avoid freeing an uninitialized pointer

2017-08-10 Thread Anton Vasilyev
). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- drivers/dma/qcom/hidma_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c index 5a0991b..89e36e3 100644 --- a/drivers/dma/qcom/hidma_mgmt.c +++ b/

[PATCH] dmaengine: qcom_hidma: avoid freeing an uninitialized pointer

2017-08-10 Thread Anton Vasilyev
). Signed-off-by: Anton Vasilyev --- drivers/dma/qcom/hidma_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c index 5a0991b..89e36e3 100644 --- a/drivers/dma/qcom/hidma_mgmt.c +++ b/drivers/dma/qcom/hidma_mgmt.c

[PATCH] dvb-usb: Add memory free on error path in dw2102_probe()

2017-08-10 Thread Anton Vasilyev
If dw2102_probe() fails on dvb_usb_device_init(), then memleak occurs. The patch adds deallocation to the error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- drivers/media/usb/dvb-usb/dw2102.

[PATCH] dvb-usb: Add memory free on error path in dw2102_probe()

2017-08-10 Thread Anton Vasilyev
If dw2102_probe() fails on dvb_usb_device_init(), then memleak occurs. The patch adds deallocation to the error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/media/usb/dvb-usb/dw2102.c | 39

[PATCH] hwmon:(stts751) buffer overread on wrong chip configuration

2017-08-10 Thread Anton Vasilyev
Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- drivers/hwmon/stts751.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/hwmon/stts751.c b/drivers/hwmon/stts751.c index d56251d..f6eddbd 100644 --- a/drivers/hwmon/stts751.c +

[PATCH] hwmon:(stts751) buffer overread on wrong chip configuration

2017-08-10 Thread Anton Vasilyev
Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/hwmon/stts751.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/hwmon/stts751.c b/drivers/hwmon/stts751.c index d56251d..f6eddbd 100644 --- a/drivers/hwmon/stts751.c +++ b/drivers/hwmon/stt

[PATCH] i2c: use release_mem_region instead of release_resource

2017-08-10 Thread Anton Vasilyev
Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- drivers/i2c/busses/i2c-simtec.c | 6 ++ 1 file changed, 2 insertions(+), 4 del

[PATCH] i2c: use release_mem_region instead of release_resource

2017-08-10 Thread Anton Vasilyev
Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/i2c/busses/i2c-simtec.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH] parport: use release_mem_region instead of release_resource

2017-08-10 Thread Anton Vasilyev
Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- drivers/parport/parport_ax88796.c | 6 ++ 1 file changed, 2 insertions(+), 4 del

[PATCH] parport: use release_mem_region instead of release_resource

2017-08-10 Thread Anton Vasilyev
Use api pair of request_mem_region and release_mem_region instead of release_resource. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/parport/parport_ax88796.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH] hw: Fix permissions for OCRDMA_RESET_STATS

2017-08-08 Thread Anton Vasilyev
). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c index 66056f9..d42c617

[PATCH] hw: Fix permissions for OCRDMA_RESET_STATS

2017-08-08 Thread Anton Vasilyev
). Signed-off-by: Anton Vasilyev --- drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c index 66056f9..d42c617 100644 --- a/drivers/infiniband/hw

net: thunderx: Buffer overwrite on bgx_probe

2017-08-02 Thread Anton Vasilyev
achieve value 3 + 3 * 4 = 15, which lead to buffer overwrite on bgx_vnic[bgx->bgx_id] = bgx; Question: is it enough for fix to change bgx_vnic's size? Found by Linux Driver Verification project (linuxtesting.org). -- Anton Vasilyev Linux Verification Center, ISPRAS web: http://linuxtes

net: thunderx: Buffer overwrite on bgx_probe

2017-08-02 Thread Anton Vasilyev
achieve value 3 + 3 * 4 = 15, which lead to buffer overwrite on bgx_vnic[bgx->bgx_id] = bgx; Question: is it enough for fix to change bgx_vnic's size? Found by Linux Driver Verification project (linuxtesting.org). -- Anton Vasilyev Linux Verification Center, ISPRAS web: http://linuxtes

Buffer overread in pv88090-regulator.ko

2017-08-01 Thread Anton Vasilyev
index = ((range << 1) | conf2); become 3, but index is used for dereference pv88090_buck_vol[3]. Should be index=3 considered as incorrect value and pv88090_i2c_probe() must return error, or pv88090_buck_vol[] should be expanded? Found by Linux Driver Verification project (linuxtesting.org)

Buffer overread in pv88090-regulator.ko

2017-08-01 Thread Anton Vasilyev
index = ((range << 1) | conf2); become 3, but index is used for dereference pv88090_buck_vol[3]. Should be index=3 considered as incorrect value and pv88090_i2c_probe() must return error, or pv88090_buck_vol[] should be expanded? Found by Linux Driver Verification project (linuxtesting.org)

[PATCH v2] misc: Return error on error path

2017-08-01 Thread Anton Vasilyev
If ibmasm_event_buffer_init() or ibmasm_heartbeat_init() fails, then ibmasm_init_one() release all resources and return 0 on error path. The patch adds corresponding error for fails. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras

[PATCH v2] misc: Return error on error path

2017-08-01 Thread Anton Vasilyev
If ibmasm_event_buffer_init() or ibmasm_heartbeat_init() fails, then ibmasm_init_one() release all resources and return 0 on error path. The patch adds corresponding error for fails. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- v2: change

[PATCH] misc: Return error on error path

2017-07-31 Thread Anton Vasilyev
If ibmasm_event_buffer_init() or ibmasm_heartbeat_init() fails, then ibmasm_init_one() release all resources and return 0 on error path. The patch adds corresponding error for fails. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras

[PATCH] misc: Return error on error path

2017-07-31 Thread Anton Vasilyev
If ibmasm_event_buffer_init() or ibmasm_heartbeat_init() fails, then ibmasm_init_one() release all resources and return 0 on error path. The patch adds corresponding error for fails. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev --- drivers/misc

[tip:x86/cleanups] x86/paravirt: Remove unnecessary return from void function

2017-06-24 Thread tip-bot for Anton Vasilyev
Commit-ID: e8ad8bc403f49f8cb95448acfdeee39b459eded4 Gitweb: http://git.kernel.org/tip/e8ad8bc403f49f8cb95448acfdeee39b459eded4 Author: Anton Vasilyev <vasil...@ispras.ru> AuthorDate: Fri, 23 Jun 2017 19:23:13 +0300 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Sat, 24

[tip:x86/cleanups] x86/paravirt: Remove unnecessary return from void function

2017-06-24 Thread tip-bot for Anton Vasilyev
Commit-ID: e8ad8bc403f49f8cb95448acfdeee39b459eded4 Gitweb: http://git.kernel.org/tip/e8ad8bc403f49f8cb95448acfdeee39b459eded4 Author: Anton Vasilyev AuthorDate: Fri, 23 Jun 2017 19:23:13 +0300 Committer: Ingo Molnar CommitDate: Sat, 24 Jun 2017 08:53:33 +0200 x86/paravirt: Remove

[PATCH] x86: Remove unnecessary return from void function

2017-06-23 Thread Anton Vasilyev
The patch removes unnecessary return from void function. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> --- arch/x86/include/asm/paravirt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/inclu

  1   2   >