[PATCH] pxa168: fix double deallocation of managed resources

2015-04-24 Thread Alexey Khoroshilov
can happen. The patch removes explicit resource deallocation. Also it converts clk_disable() to clk_disable_unprepare() to make it symmetrical with clk_prepare_enable(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru

[PATCH] irda: ali-ircc: Fix deadlock in ali_ircc_sir_change_speed()

2015-09-11 Thread Alexey Khoroshilov
_ircc_interrupt() under spin_lock(>lock); The patch removes spin_lock/unlock from ali_ircc_sir_change_speed(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/irda/ali-ircc.c | 6 -- 1 f

[PATCH] ipw2x00: add checks for dma mapping errors

2016-01-01 Thread Alexey Khoroshilov
ipw2100_alloc_skb() and ipw2100_tx_send_data() do not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/wireless/i

[PATCH] prism54: fix checks for dma mapping errors

2015-12-25 Thread Alexey Khoroshilov
prism54 checks for dma mapping errors by comparison returned address with zero, while pci_dma_mapping_error() should be used. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/wireless/prism54/islpci

[PATCH] natsemi: add checks for dma mapping errors

2015-12-18 Thread Alexey Khoroshilov
refill_rx() and start_tx() do not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/natsemi/natsemi.

Re: [PATCH] natsemi: add checks for dma mapping errors

2015-12-19 Thread Alexey Khoroshilov
On 19.12.2015 05:36, David Miller wrote: > From: Alexey Khoroshilov <khoroshi...@ispras.ru> > Date: Sat, 19 Dec 2015 00:55:37 +0300 > >> @@ -2093,6 +2099,10 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) >> np->tx_skbuff[entry] =

[PATCH v2] natsemi: add checks for dma mapping errors

2015-12-19 Thread Alexey Khoroshilov
refill_rx() and start_tx() do not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/natsemi/natsemi.

[PATCH] vmxnet3: fix checks for dma mapping errors

2015-11-27 Thread Alexey Khoroshilov
vmxnet3_drv does check dma_addr with dma_mapping_error() after mapping dma memory. The patch adds the checks and tries to handle failures. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/v

[BUG] act_ife: sleeping functions called in atomic context

2016-06-16 Thread Alexey Khoroshilov
ry_module_get(o->owner) -> kzalloc(sizeof(*mi), GFP_KERNEL); -> ops->alloc(mi, metaval); -> module_put(ops->owner); _tcf_ife_cleanup() -> module_put() The same problem is actual for tcf_ife_cleanup() as well. Found by Linux Driver Verification pr

Re: [BUG] act_ife: sleeping functions called in atomic context

2016-06-17 Thread Alexey Khoroshilov
On 17.06.2016 08:38, Cong Wang wrote: > On Thu, Jun 16, 2016 at 7:14 PM, Cong Wang wrote: >> >> I think we can just remove that tcf_lock, I am testing a patch now. > > Please try the attached patch, I will do more tests tomorrow. > > Thanks! > Looks good with two

Suspicious code in tun_flow_update()

2016-03-04 Thread Alexey Khoroshilov
Hello, If tun_flow_find() successfully finds tun_flow_entry, tun_flow_update() updates the entry in place. Is such usage of RCU safe here? Found by Linux Driver Verification project (linuxtesting.org). -- Alexey Khoroshilov Linux Verification Center, ISPRAS

[PATCH v2] net: adaptec: starfire: add checks for dma mapping errors

2017-01-27 Thread Alexey Khoroshilov
init_ring(), refill_rx_ring() and start_tx() don't check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/a

[PATCH] net: adaptec: starfire: add checks for dma mapping errors

2017-01-20 Thread Alexey Khoroshilov
init_ring() and refill_rx_ring() don't check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/adaptec/starfire.

[PATCH] vmxnet3: avoid assumption about invalid dma_pa in vmxnet3_set_mc()

2016-10-07 Thread Alexey Khoroshilov
project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/vmxnet3/vmxnet3_drv.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index b5554f

[PATCH] net: mvmdio: do not clk_disable_unprepare() NULL clock

2016-09-30 Thread Alexey Khoroshilov
There is no need to clk_disable_unprepare(dev->clk) before it was initialized. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/marvell/mvmdio.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v2] vmxnet3: avoid assumption about invalid dma_pa in vmxnet3_set_mc()

2016-10-14 Thread Alexey Khoroshilov
Driver Verification project (linuxtesting.org). v2: use "bool" and "true"/"false" for boolean variables. Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/vmxnet3/vmxnet3_drv.c | 17 ++--- 1 file changed, 10 insertions(+), 7 de

[PATCH] net: macb: add check for dma mapping error in start_xmit()

2016-11-18 Thread Alexey Khoroshilov
at91ether_start_xmit() does not check for dma mapping errors. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/cadence/macb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drive

[PATCH] adm80211: add checks for dma mapping errors

2016-12-02 Thread Alexey Khoroshilov
The driver does not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/wireless/admtek/adm8211.

[PATCH] irda: vlsi_ir: fix check for dma mapping errors

2017-03-24 Thread Alexey Khoroshilov
vlsi_alloc_ring() checks for dma mapping errors by comparison returned address with zero, while pci_dma_mapping_error() should be used. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/irda/vlsi_ir

[PATCH] net: natsemi: ns83820: add checks for dma mapping error

2017-04-14 Thread Alexey Khoroshilov
The driver does not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/natsemi/ns83820.c | 13 +++--

[PATCH v2] net: natsemi: ns83820: add checks for dma mapping error

2017-04-22 Thread Alexey Khoroshilov
The driver does not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/natsemi/ns83820.

[PATCH] net/sched: act_skbmod: remove unneeded rcu_read_unlock in tcf_skbmod_dump

2017-03-04 Thread Alexey Khoroshilov
Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- net/sched/act_skbmod.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c index 3b7074e23024..c736627f8f4a 100644 ---

net/sched: act_skbmod: rcu_read_unlock in tcf_skbmod_dump?

2017-03-04 Thread Alexey Khoroshilov
Hello! rcu_read_unlock() in tcf_skbmod_dump() looks suspicious to me. What does it mean there? -- Thank you, Alexey Khoroshilov Linux Verification Center, ISPRAS web: http://linuxtesting.org

[PATCH v3 net-next 1/2] wan: dscc4: add checks for dma mapping errors

2017-08-10 Thread Alexey Khoroshilov
The driver does not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- v2: Fix issues noted by David Miller and Francois Romi

[PATCH v3 net-next 2/2] wan: dscc4: convert to plain DMA API

2017-08-10 Thread Alexey Khoroshilov
Make use the dma_*() interfaces rather than the pci_*() interfaces. Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/wan/dscc4.c | 96 ++--- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/drivers/net/wan

[PATCH] smsc911x: Add check for ioremap_nocache() return code

2017-07-12 Thread Alexey Khoroshilov
There is no check for return code of smsc911x_drv_probe() in smsc911x_drv_probe(). The patch adds one. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/ethernet/smsc/smsc911x.c | 5 + 1 file chan

[PATCH] wan: dscc4: add checks for dma mapping errors

2017-08-04 Thread Alexey Khoroshilov
The driver does not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/wan/dscc4.

[PATCH net-next v2] wan: dscc4: add checks for dma mapping errors

2017-08-08 Thread Alexey Khoroshilov
The driver does not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- v2: Fix issues noted by David Miller and Francois

[PATCH] net: atheros: atl2: don't return zero on failure path in atl2_probe()

2017-05-19 Thread Alexey Khoroshilov
If dma mask checks fail in atl2_probe(), it breaks off initialization, deallocates all resources, but returns zero. The patch adds proper error code return value and make error code setup unified. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov

[PATCH] net: phy: xgene: disable clk on error paths

2017-12-15 Thread Alexey Khoroshilov
There are several error paths in xgene_mdio_probe(), where clk is left undisabled. The patch fixes them. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/phy/mdio-xgene.c | 21 +++--

[PATCH] tun: fix mismatch in mutex lock-unlock in tun_get_user()

2018-02-16 Thread Alexey Khoroshilov
There is a single error path where tfile->napi_mutex is left unlocked. It can lead to a deadlock. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> --- drivers/net/tun.c | 4 1 file changed, 4 insertions(+) d