aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-02 16:27:41 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-02 16:27:41 -0500
commit452edd598f60522c11f7f88fdbab27eb36509d1a (patch)
treedf1510e9848e591a412c8bfa724253470c48c4c2 /net/decnet
parent3872b284087081ee5cb0e4630954c2f7a2153cf5 (diff)
xfrm: Return dst directly from xfrm_lookup()
Instead of on the stack. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_route.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 0877147d2167..484fdbf92bd8 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1222,7 +1222,11 @@ static int dn_route_output_key(struct dst_entry **pprt, struct flowi *flp, int f
1222 1222
1223 err = __dn_route_output_key(pprt, flp, flags); 1223 err = __dn_route_output_key(pprt, flp, flags);
1224 if (err == 0 && flp->proto) { 1224 if (err == 0 && flp->proto) {
1225 err = xfrm_lookup(&init_net, pprt, flp, NULL, 0); 1225 *pprt = xfrm_lookup(&init_net, *pprt, flp, NULL, 0);
1226 if (IS_ERR(*pprt)) {
1227 err = PTR_ERR(*pprt);
1228 *pprt = NULL;
1229 }
1226 } 1230 }
1227 return err; 1231 return err;
1228} 1232}
@@ -1235,7 +1239,11 @@ int dn_route_output_sock(struct dst_entry **pprt, struct flowi *fl, struct sock
1235 if (err == 0 && fl->proto) { 1239 if (err == 0 && fl->proto) {
1236 if (!(flags & MSG_DONTWAIT)) 1240 if (!(flags & MSG_DONTWAIT))
1237 fl->flags |= FLOWI_FLAG_CAN_SLEEP; 1241 fl->flags |= FLOWI_FLAG_CAN_SLEEP;
1238 err = xfrm_lookup(&init_net, pprt, fl, sk, 0); 1242 *pprt = xfrm_lookup(&init_net, *pprt, fl, sk, 0);
1243 if (IS_ERR(*pprt)) {
1244 err = PTR_ERR(*pprt);
1245 *pprt = NULL;
1246 }
1239 } 1247 }
1240 return err; 1248 return err;
1241} 1249}