@@ -199,11 +199,11 @@ static void dn_dst_check_expire(struct timer_list *unused)
199
199
lockdep_is_held (& dn_rt_hash_table [i ].lock ))) != NULL ) {
200
200
if (atomic_read (& rt -> dst .__refcnt ) > 1 ||
201
201
(now - rt -> dst .lastuse ) < expire ) {
202
- rtp = & rt -> dst . dn_next ;
202
+ rtp = & rt -> dn_next ;
203
203
continue ;
204
204
}
205
- * rtp = rt -> dst . dn_next ;
206
- rt -> dst . dn_next = NULL ;
205
+ * rtp = rt -> dn_next ;
206
+ rt -> dn_next = NULL ;
207
207
dst_dev_put (& rt -> dst );
208
208
dst_release (& rt -> dst );
209
209
}
@@ -233,11 +233,11 @@ static int dn_dst_gc(struct dst_ops *ops)
233
233
lockdep_is_held (& dn_rt_hash_table [i ].lock ))) != NULL ) {
234
234
if (atomic_read (& rt -> dst .__refcnt ) > 1 ||
235
235
(now - rt -> dst .lastuse ) < expire ) {
236
- rtp = & rt -> dst . dn_next ;
236
+ rtp = & rt -> dn_next ;
237
237
continue ;
238
238
}
239
- * rtp = rt -> dst . dn_next ;
240
- rt -> dst . dn_next = NULL ;
239
+ * rtp = rt -> dn_next ;
240
+ rt -> dn_next = NULL ;
241
241
dst_dev_put (& rt -> dst );
242
242
dst_release (& rt -> dst );
243
243
break ;
@@ -333,8 +333,8 @@ static int dn_insert_route(struct dn_route *rt, unsigned int hash, struct dn_rou
333
333
lockdep_is_held (& dn_rt_hash_table [hash ].lock ))) != NULL ) {
334
334
if (compare_keys (& rth -> fld , & rt -> fld )) {
335
335
/* Put it first */
336
- * rthp = rth -> dst . dn_next ;
337
- rcu_assign_pointer (rth -> dst . dn_next ,
336
+ * rthp = rth -> dn_next ;
337
+ rcu_assign_pointer (rth -> dn_next ,
338
338
dn_rt_hash_table [hash ].chain );
339
339
rcu_assign_pointer (dn_rt_hash_table [hash ].chain , rth );
340
340
@@ -345,10 +345,10 @@ static int dn_insert_route(struct dn_route *rt, unsigned int hash, struct dn_rou
345
345
* rp = rth ;
346
346
return 0 ;
347
347
}
348
- rthp = & rth -> dst . dn_next ;
348
+ rthp = & rth -> dn_next ;
349
349
}
350
350
351
- rcu_assign_pointer (rt -> dst . dn_next , dn_rt_hash_table [hash ].chain );
351
+ rcu_assign_pointer (rt -> dn_next , dn_rt_hash_table [hash ].chain );
352
352
rcu_assign_pointer (dn_rt_hash_table [hash ].chain , rt );
353
353
354
354
dst_hold_and_use (& rt -> dst , now );
@@ -369,8 +369,8 @@ static void dn_run_flush(struct timer_list *unused)
369
369
goto nothing_to_declare ;
370
370
371
371
for (; rt ; rt = next ) {
372
- next = rcu_dereference_raw (rt -> dst . dn_next );
373
- RCU_INIT_POINTER (rt -> dst . dn_next , NULL );
372
+ next = rcu_dereference_raw (rt -> dn_next );
373
+ RCU_INIT_POINTER (rt -> dn_next , NULL );
374
374
dst_dev_put (& rt -> dst );
375
375
dst_release (& rt -> dst );
376
376
}
@@ -1183,6 +1183,7 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowidn *o
1183
1183
if (rt == NULL )
1184
1184
goto e_nobufs ;
1185
1185
1186
+ rt -> dn_next = NULL ;
1186
1187
memset (& rt -> fld , 0 , sizeof (rt -> fld ));
1187
1188
rt -> fld .saddr = oldflp -> saddr ;
1188
1189
rt -> fld .daddr = oldflp -> daddr ;
@@ -1252,7 +1253,7 @@ static int __dn_route_output_key(struct dst_entry **pprt, const struct flowidn *
1252
1253
if (!(flags & MSG_TRYHARD )) {
1253
1254
rcu_read_lock_bh ();
1254
1255
for (rt = rcu_dereference_bh (dn_rt_hash_table [hash ].chain ); rt ;
1255
- rt = rcu_dereference_bh (rt -> dst . dn_next )) {
1256
+ rt = rcu_dereference_bh (rt -> dn_next )) {
1256
1257
if ((flp -> daddr == rt -> fld .daddr ) &&
1257
1258
(flp -> saddr == rt -> fld .saddr ) &&
1258
1259
(flp -> flowidn_mark == rt -> fld .flowidn_mark ) &&
@@ -1448,6 +1449,7 @@ static int dn_route_input_slow(struct sk_buff *skb)
1448
1449
if (rt == NULL )
1449
1450
goto e_nobufs ;
1450
1451
1452
+ rt -> dn_next = NULL ;
1451
1453
memset (& rt -> fld , 0 , sizeof (rt -> fld ));
1452
1454
rt -> rt_saddr = fld .saddr ;
1453
1455
rt -> rt_daddr = fld .daddr ;
@@ -1529,7 +1531,7 @@ static int dn_route_input(struct sk_buff *skb)
1529
1531
1530
1532
rcu_read_lock ();
1531
1533
for (rt = rcu_dereference (dn_rt_hash_table [hash ].chain ); rt != NULL ;
1532
- rt = rcu_dereference (rt -> dst . dn_next )) {
1534
+ rt = rcu_dereference (rt -> dn_next )) {
1533
1535
if ((rt -> fld .saddr == cb -> src ) &&
1534
1536
(rt -> fld .daddr == cb -> dst ) &&
1535
1537
(rt -> fld .flowidn_oif == 0 ) &&
@@ -1749,7 +1751,7 @@ int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb)
1749
1751
rcu_read_lock_bh ();
1750
1752
for (rt = rcu_dereference_bh (dn_rt_hash_table [h ].chain ), idx = 0 ;
1751
1753
rt ;
1752
- rt = rcu_dereference_bh (rt -> dst . dn_next ), idx ++ ) {
1754
+ rt = rcu_dereference_bh (rt -> dn_next ), idx ++ ) {
1753
1755
if (idx < s_idx )
1754
1756
continue ;
1755
1757
skb_dst_set (skb , dst_clone (& rt -> dst ));
@@ -1795,7 +1797,7 @@ static struct dn_route *dn_rt_cache_get_next(struct seq_file *seq, struct dn_rou
1795
1797
{
1796
1798
struct dn_rt_cache_iter_state * s = seq -> private ;
1797
1799
1798
- rt = rcu_dereference_bh (rt -> dst . dn_next );
1800
+ rt = rcu_dereference_bh (rt -> dn_next );
1799
1801
while (!rt ) {
1800
1802
rcu_read_unlock_bh ();
1801
1803
if (-- s -> bucket < 0 )
0 commit comments