Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

Paul Moore
2007-11-19T15:50:51Z

On Monday 19 November 2007 9:29:52 am Tetsuo Handa wrote:
> Paul Moore wrote:
> > If that is the case then the second call to
> > skb_peek() will return a different skb then the one you passed to
> > security_post_recv_datagram().
>
> Yes. The second call to skb_peek() might return a different skb than the
> one I passed to security_post_recv_datagram().

My apologies, I mistakenly read the following if statement in your patch:

+       if (skb == skb_peek(&sk->sk_receive_queue)) {
+               __skb_unlink(skb, &sk->sk_receive_queue);
+               atomic_dec(&skb->users);
+       }

I read the conditional as the following:

+ if (skb = skb_peek(&sk->sk_receive_queue)) {

... which would have caused the problems I was describing. I'm sorry for all
of the confusion/frustration, you patient explanations are correct; I was
wrong in this particular case.

--
paul moore
linux security @ hp