summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2010-04-28 08:47:18 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-12 15:02:57 -0700
commitfbcf931163be5f6c34cad7f00dc59ed83146e158 (patch)
tree6b31215fada09e513bc3f53b41bad9283ed6c065 /include
parent9a537dc8a33eb48eb5a6a2fdc5ced5251295b3ea (diff)
downloadkernel-crypto-fbcf931163be5f6c34cad7f00dc59ed83146e158.tar.gz
kernel-crypto-fbcf931163be5f6c34cad7f00dc59ed83146e158.tar.xz
kernel-crypto-fbcf931163be5f6c34cad7f00dc59ed83146e158.zip
sctp: avoid irq lock inversion while call sk->sk_data_ready()
[ Upstream commit 561b1733a465cf9677356b40c27653dd45f1ac56 ] sk->sk_data_ready() of sctp socket can be called from both BH and non-BH contexts, but the default sk->sk_data_ready(), sock_def_readable(), can not be used in this case. Therefore, we have to make a new function sctp_data_ready() to grab sk->sk_data_ready() with BH disabling. ========================================================= [ INFO: possible irq lock inversion dependency detected ] 2.6.33-rc6 #129 --------------------------------------------------------- sctp_darn/1517 just changed the state of lock: (clock-AF_INET){++.?..}, at: [<c06aab60>] sock_def_readable+0x20/0x80 but this lock took another, SOFTIRQ-unsafe lock in the past: (slock-AF_INET){+.-...} and interrupts could create inverse lock ordering between them. other info that might help us debug this: 1 lock held by sctp_darn/1517: #0: (sk_lock-AF_INET){+.+.+.}, at: [<cdfe363d>] sctp_sendmsg+0x23d/0xc00 [sctp] Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/sctp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 78740ec57d5..fa6cde578a1 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -128,6 +128,7 @@ extern int sctp_register_pf(struct sctp_pf *, sa_family_t);
int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
int sctp_inet_listen(struct socket *sock, int backlog);
void sctp_write_space(struct sock *sk);
+void sctp_data_ready(struct sock *sk, int len);
unsigned int sctp_poll(struct file *file, struct socket *sock,
poll_table *wait);
void sctp_sock_rfree(struct sk_buff *skb);