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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <paul.moore@...>
Cc: <akpm@...>, <linux-kernel@...>, <linux-security-module@...>, <takedakn@...>
Date: Friday, November 16, 2007 - 11:45 pm

Hello.

Thank you for your feedback.

Paul Moore wrote:
I see.

The skb might be already dequeued by other thread while I slept inside
security_post_recv_datagram().

So far, there is no difference between skb_free_datagram() and kfree_skb().

| void skb_free_datagram(struct sock *sk, struct sk_buff *skb)
| {
|         kfree_skb(skb);
| }

udp_recvmsg() thinks it might not be ok to directly call kfree_skb().
But you and skb_kill_datagram() think it is ok to directly call kfree_skb(),
I will do so.

Oh, I didn't notice I can insert here. Now I can also move the rest code like

|		error = security_post_recv_datagram(sk, skb, flags);
|		if (error)
|                       goto force_dequeue;

|         } while (!wait_for_packet(sk, err, &timeo));
|
|         return NULL;
| force_dequeue:
|         /* dequeue if MSG_PEEK is set. */
| no_packet:
|         *err = error;
|         return NULL;

to reduce indentation.

Thank you.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux., Tetsuo Handa, (Fri Nov 16, 11:45 pm)
Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux., Tetsuo Handa, (Sun Nov 18, 12:00 am)
Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux., Tetsuo Handa, (Mon Nov 19, 10:29 am)
Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux., Paul Moore, (Mon Nov 19, 11:39 am)
Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux., Tetsuo Handa, (Mon Nov 19, 8:04 pm)
Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux., James Morris, (Mon Nov 19, 8:52 pm)