]> git.baikalelectronics.ru Git - kernel.git/commit
SCTP: lock_sock_nested in sctp_sock_migrate
authorZach Brown <zach.brown@oracle.com>
Fri, 22 Jun 2007 22:14:46 +0000 (15:14 -0700)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Tue, 26 Jun 2007 13:29:09 +0000 (09:29 -0400)
commit0d9b0a45c083bb063d6ef8efed184f31bb617933
tree1f216caeef9c70ff5bc76fd08fa7f5a0ae2cbe99
parent7ca182019f6c36c42467b9cb8d844d0efddbbf26
SCTP: lock_sock_nested in sctp_sock_migrate

sctp_sock_migrate() grabs the socket lock on a newly allocated socket while
holding the socket lock on an old socket.  lockdep worries that this might
be a recursive lock attempt.

 task/3026 is trying to acquire lock:
  (sk_lock-AF_INET){--..}, at: [<ffffffff88105b8c>] sctp_sock_migrate+0x2e3/0x327 [sctp]
 but task is already holding lock:
  (sk_lock-AF_INET){--..}, at: [<ffffffff8810891f>] sctp_accept+0xdf/0x1e3 [sctp]

This patch tells lockdep that this locking is safe by using
lock_sock_nested().

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
net/sctp/socket.c