irda: fix a potential use-after-free in ircomm_param_request
authorWANG Cong <[email protected]>
Fri, 29 Jan 2016 19:58:03 +0000 (11:58 -0800)
committerDavid S. Miller <[email protected]>
Sat, 30 Jan 2016 06:56:46 +0000 (22:56 -0800)
commit3d45296ab96c2ec8308226b3350a6d9e48379870
tree1842eaaeb44e9d2ac1d485833d0d7e3029e3a51a
parentae9d723e9fbe9fb28213b7df26475791428bf76a
irda: fix a potential use-after-free in ircomm_param_request

self->ctrl_skb is protected by self->spinlock, we should not
access it out of the lock. Move the debugging printk inside.

Reported-by: Dmitry Vyukov <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/irda/ircomm/ircomm_param.c