aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_statetable.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-08-07 03:25:24 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-15 02:30:37 -0400
commit55e26eb95a5345a5796babac98de6d6c42771df1 (patch)
tree65560cf23dbd241f38e86b6b82d1b5d286605ba5 /net/sctp/sm_statetable.c
parentebb7e95d9351f77a8ec1fca20eb645051401b7b2 (diff)
sctp: Push struct net down to sctp_chunk_event_lookup
This trickles up through sctp_sm_lookup_event up to sctp_do_sm and up further into sctp_primitiv_NAME before the code reaches places where struct net can be reliably found. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_statetable.c')
-rw-r--r--net/sctp/sm_statetable.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c
index 7c211a7f90f4..4a029d798287 100644
--- a/net/sctp/sm_statetable.c
+++ b/net/sctp/sm_statetable.c
@@ -59,7 +59,8 @@ other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES];
59static const sctp_sm_table_entry_t 59static const sctp_sm_table_entry_t
60timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES]; 60timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES];
61 61
62static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(sctp_cid_t cid, 62static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(struct net *net,
63 sctp_cid_t cid,
63 sctp_state_t state); 64 sctp_state_t state);
64 65
65 66
@@ -82,13 +83,14 @@ static const sctp_sm_table_entry_t bug = {
82 rtn; \ 83 rtn; \
83}) 84})
84 85
85const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type, 86const sctp_sm_table_entry_t *sctp_sm_lookup_event(struct net *net,
87 sctp_event_t event_type,
86 sctp_state_t state, 88 sctp_state_t state,
87 sctp_subtype_t event_subtype) 89 sctp_subtype_t event_subtype)
88{ 90{
89 switch (event_type) { 91 switch (event_type) {
90 case SCTP_EVENT_T_CHUNK: 92 case SCTP_EVENT_T_CHUNK:
91 return sctp_chunk_event_lookup(event_subtype.chunk, state); 93 return sctp_chunk_event_lookup(net, event_subtype.chunk, state);
92 case SCTP_EVENT_T_TIMEOUT: 94 case SCTP_EVENT_T_TIMEOUT:
93 return DO_LOOKUP(SCTP_EVENT_TIMEOUT_MAX, timeout, 95 return DO_LOOKUP(SCTP_EVENT_TIMEOUT_MAX, timeout,
94 timeout_event_table); 96 timeout_event_table);
@@ -906,7 +908,8 @@ static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][S
906 TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE, 908 TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE,
907}; 909};
908 910
909static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(sctp_cid_t cid, 911static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(struct net *net,
912 sctp_cid_t cid,
910 sctp_state_t state) 913 sctp_state_t state)
911{ 914{
912 if (state > SCTP_STATE_MAX) 915 if (state > SCTP_STATE_MAX)