]> git.baikalelectronics.ru Git - kernel.git/commit
caif: fix two caif_connect() bugs
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 4 Oct 2010 22:42:08 +0000 (22:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Oct 2010 03:35:53 +0000 (20:35 -0700)
commiteccd301d434832bc542e2dd4ce2c2bfb1e071dae
treeda41cf961fd143ba9365fcb18a657dba904e617f
parent374ce4d63b2bcf55dc5f1bc69fd98d555bbe7aab
caif: fix two caif_connect() bugs

caif_connect() might dereference a netdevice after dev_put() it.

It also doesnt check dev_get_by_index() return value and could
dereference a NULL pointer.

Fix it, using RCU to avoid taking a reference.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/caif_socket.c