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

From: Paul Moore
Date: Mon Nov 19 2007 - 10:50:51 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/