Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1276057
| From | "Dmitry V. Levin" <ldv@altlinux.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 8/8] Use __kernel_long_t in struct mq_attr |
| Date | 2015-11-24 05:40 +0100 |
| Message-ID | <qydyx-3fl-5@gated-at.bofh.it> (permalink) |
| References | <mtNV8-1zS-5@gated-at.bofh.it> <mtNV9-1zS-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Fri, Dec 27, 2013 at 02:14:24PM -0800, H.J. Lu wrote:
> Both x32 and x86-64 use the same struct mq_attr for system calls. But
> x32 long is 32-bit. This patch replaces long with __kernel_long_t in
> struct mq_attr.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
> include/uapi/linux/mqueue.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/uapi/linux/mqueue.h b/include/uapi/linux/mqueue.h
> index 8b5a796..d0a2b8e 100644
> --- a/include/uapi/linux/mqueue.h
> +++ b/include/uapi/linux/mqueue.h
> @@ -23,11 +23,11 @@
> #define MQ_BYTES_MAX 819200
>
> struct mq_attr {
> - long mq_flags; /* message queue flags */
> - long mq_maxmsg; /* maximum number of messages */
> - long mq_msgsize; /* maximum message size */
> - long mq_curmsgs; /* number of messages currently queued */
> - long __reserved[4]; /* ignored for input, zeroed for output */
> + __kernel_long_t mq_flags; /* message queue flags */
> + __kernel_long_t mq_maxmsg; /* maximum number of messages */
> + __kernel_long_t mq_msgsize; /* maximum message size */
> + __kernel_long_t mq_curmsgs; /* number of messages currently queued */
> + __kernel_long_t __reserved[4]; /* ignored for input, zeroed for output */
> };
>
> /*
This breaks userspace, please #include <linux/types.h>
before using __kernel_long_t.
--
ldv
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 8/8] Use __kernel_long_t in struct mq_attr "Dmitry V. Levin" <ldv@altlinux.org> - 2015-11-24 05:40 +0100
csiph-web