[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] device: fix net_rcv_messages
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] device: fix net_rcv_messages |
Date: |
Wed, 11 Jun 2014 09:45:43 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Sun 08 Jun 2014 11:48:33 +0200, a écrit :
> Previously, all net_rcv_messages sent by net_deliver were malformed.
> It never was a problem in practice, since the messages are not complex
> and thus the kernel does not try to parse the message.
>
> struct net_rcv_messages contains an additional field of type
> boolean_t. This field has no associated type descriptor, so it must
> not be included in the message.
>
> * device/net_io.c (net_deliver): Account for the extra field in the
> msgh_size calculation.
Ack.
> ---
> device/net_io.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/device/net_io.c b/device/net_io.c
> index 82b6fb9..a9d318e 100644
> --- a/device/net_io.c
> +++ b/device/net_io.c
> @@ -467,6 +467,7 @@ boolean_t net_deliver(boolean_t nonblocking)
> /* remember message sizes must be rounded up */
> kmsg->ikm_header.msgh_size =
> (((mach_msg_size_t) (sizeof(struct net_rcv_msg)
> + - sizeof net_kmsg(kmsg)->sent
> - NET_RCV_MAX + count)) + 3) &~ 3;
> kmsg->ikm_header.msgh_local_port = MACH_PORT_NULL;
> kmsg->ikm_header.msgh_kind = MACH_MSGH_KIND_NORMAL;
> --
> 2.0.0
>
>
--
Samuel
> Subject: pb fvwm95-2 comment l'installer le compiler???
> Merci d'avance
je te conseille d'être un peu plus précis dans l'exposé de ton pb...
-+- EJ in guide du linuxien pervers :"Les modéros sont sympas !" -+-