Bugzilla – Attachment 65615 Details for
Bug 117749
IPsec crashes kernel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Updated test patch
xfrm-test (text/plain), 2.58 KB, created by
Olaf Kirch
on 2006-01-30 12:05:37 UTC
(
hide
)
Description:
Updated test patch
Filename:
MIME Type:
Creator:
Olaf Kirch
Created:
2006-01-30 12:05:37 UTC
Size:
2.58 KB
patch
obsolete
> net/xfrm/xfrm_policy.c | 34 ++++++++++++++++++++++++++++++---- > 1 files changed, 30 insertions(+), 4 deletions(-) > >Index: build/net/xfrm/xfrm_policy.c >=================================================================== >--- build.orig/net/xfrm/xfrm_policy.c >+++ build/net/xfrm/xfrm_policy.c >@@ -786,7 +786,22 @@ int xfrm_lookup(struct dst_entry **dst_p > u16 family = dst_orig->ops->family; > u8 dir = policy_to_flow_dir(XFRM_POLICY_OUT); > u32 sk_sid = security_sk_sid(sk, fl, dir); >+ int loops = 0; >+ > restart: >+ if (dst_orig && !dst_check(dst_orig, 0)) { >+ printk(KERN_NOTICE "xfrm_lookup: IPv4 route is stale (obsolete=%u, loops=%d)\n", >+ dst_orig->obsolete, loops); >+ dump_stack(); >+ err = -EHOSTUNREACH; >+ goto error; >+ } >+ if (unlikely(++loops > 10)) { >+ printk(KERN_NOTICE "xfrm_lookup bailing out after %d loops\n", loops); >+ err = -EHOSTUNREACH; >+ goto error; >+ } >+ > genid = atomic_read(&flow_cache_genid); > policy = NULL; > if (sk && sk->sk_policy[1]) >@@ -854,6 +869,7 @@ restart: > } > if (nx == -EAGAIN || > genid != atomic_read(&flow_cache_genid)) { >+ printk(KERN_NOTICE "xfrm_tmpl_resolve says EAGAIN, try again\n"); > xfrm_pol_put(policy); > goto restart; > } >@@ -887,6 +903,8 @@ restart: > */ > write_unlock_bh(&policy->lock); > >+ printk(KERN_NOTICE "xfrm_lookup: newly created bundle is stale\n"); >+ > xfrm_pol_put(policy); > if (dst) > dst_free(dst); >@@ -1196,18 +1214,24 @@ int xfrm_bundle_ok(struct xfrm_dst *firs > u32 mtu; > > if (!dst_check(dst->path, ((struct xfrm_dst *)dst)->path_cookie) || >- (dst->dev && !netif_running(dst->dev))) >+ (dst->dev && !netif_running(dst->dev))) { >+ printk(KERN_DEBUG "xfrm_bundle_ok: %u\n", __LINE__); > return 0; >+ } > > last = NULL; > > do { > struct xfrm_dst *xdst = (struct xfrm_dst *)dst; > >- if (fl && !xfrm_selector_match(&dst->xfrm->sel, fl, family)) >+ if (fl && !xfrm_selector_match(&dst->xfrm->sel, fl, family)) { >+ printk(KERN_DEBUG "xfrm_bundle_ok: %u\n", __LINE__); > return 0; >- if (dst->xfrm->km.state != XFRM_STATE_VALID) >+ } >+ if (dst->xfrm->km.state != XFRM_STATE_VALID) { >+ printk(KERN_DEBUG "xfrm_bundle_ok: %u\n", __LINE__); > return 0; >+ } > > mtu = dst_mtu(dst->child); > if (xdst->child_mtu_cached != mtu) { >@@ -1215,8 +1239,10 @@ int xfrm_bundle_ok(struct xfrm_dst *firs > xdst->child_mtu_cached = mtu; > } > >- if (!dst_check(xdst->route, xdst->route_cookie)) >+ if (!dst_check(xdst->route, xdst->route_cookie)) { >+ printk(KERN_DEBUG "xfrm_bundle_ok: %u\n", __LINE__); > return 0; >+ } > mtu = dst_mtu(xdst->route); > if (xdst->route_mtu_cached != mtu) { > last = xdst;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 117749
:
54633
|
54650
|
54652
|
59102
|
59285
|
65244
|
65245
|
65248
|
65282
|
65369
|
65417
| 65615 |
66176
|
70394
|
70395
|
86502
|
87491