> > > We jump to the fail without releasing the lock.
> > > Instead of a "fail", how about just breaking from the loop
> > > and falling through to release lock and return...
> >
> > Sure. That should work too. Thanks.
>
> Also, you would have to make sure pol is set to NULL
> in this case.

I see lspp63 could use the following patch that does the
above:

--- linux-2.6.18.i386.old/net/xfrm/xfrm_policy.c        2007-01-16
10:36:23.000000000 -0600
+++ linux-2.6.18.i386/net/xfrm/xfrm_policy.c    2007-01-16
10:36:59.000000000 -0600
@@ -627,9 +627,11 @@ static int xfrm_policy_lookup(struct flo
                                xfrm_pol_hold(pol);
                                break;
                        } else if (ret == -ESRCH)
-                                       ret = 0;
-                       else
+                               ret = 0;
+                       else {
+                               pol = NULL;
                                break;
+                       }
                }
        }
        read_unlock_bh(&xfrm_policy_lock);



--
redhat-lspp mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-lspp

Reply via email to