Re: [PATCH] Bluetooth: initialize skb_queue_head at l2cap_chan_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tetsuo,

> syzbot is hitting "INFO: trying to register non-static key." message [1],
> for "struct l2cap_chan"->tx_q.lock spinlock is not yet initialized when
> l2cap_chan_del() is called due to e.g. timeout.
> 
> Since "struct l2cap_chan"->lock mutex is initialized at l2cap_chan_create()
> immediately after "struct l2cap_chan" is allocated using kzalloc(), let's
> as well initialize "struct l2cap_chan"->{tx_q,srej_q}.lock spinlocks there.
> 
> [1] https://syzkaller.appspot.com/bug?extid=fadfba6a911f6bf71842
> 
> Reported-and-tested-by: syzbot <syzbot+fadfba6a911f6bf71842@xxxxxxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
> ---
> net/bluetooth/l2cap_core.c | 2 ++
> 1 file changed, 2 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux