aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/llc_input.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-22 03:43:05 -0400
committerArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-22 03:43:05 -0400
commit6e2144b76840be09924de1626e2dcd7b315f75b3 (patch)
tree33044cb63f368270229e2b40aa2ad024325c7e8b /net/llc/llc_input.c
parent04e4223f44b89e50f275cb6b95a58ebe2c4909be (diff)
[LLC]: Use refcounting with struct llc_sap
Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/llc/llc_input.c')
-rw-r--r--net/llc/llc_input.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c
index 60c1acac7c97..789eec426451 100644
--- a/net/llc/llc_input.c
+++ b/net/llc/llc_input.c
@@ -166,17 +166,22 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
166 */ 166 */
167 if (sap->rcv_func) { 167 if (sap->rcv_func) {
168 sap->rcv_func(skb, dev, pt, orig_dev); 168 sap->rcv_func(skb, dev, pt, orig_dev);
169 goto out; 169 goto out_put;
170 } 170 }
171 dest = llc_pdu_type(skb); 171 dest = llc_pdu_type(skb);
172 if (unlikely(!dest || !llc_type_handlers[dest - 1])) 172 if (unlikely(!dest || !llc_type_handlers[dest - 1]))
173 goto drop; 173 goto drop_put;
174 llc_type_handlers[dest - 1](sap, skb); 174 llc_type_handlers[dest - 1](sap, skb);
175out_put:
176 llc_sap_put(sap);
175out: 177out:
176 return 0; 178 return 0;
177drop: 179drop:
178 kfree_skb(skb); 180 kfree_skb(skb);
179 goto out; 181 goto out;
182drop_put:
183 kfree_skb(skb);
184 goto out_put;
180handle_station: 185handle_station:
181 if (!llc_station_handler) 186 if (!llc_station_handler)
182 goto drop; 187 goto drop;