lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20121107112016.d9321efe.akpm@linux-foundation.org>
Date:	Wed, 7 Nov 2012 11:20:16 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Stanislav Kinsbursky <skinsbursky@...allels.com>
Cc:	ebiederm@...ssion.com, devel@...nvz.org,
	linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk,
	jmorris@...ei.org
Subject: Re: [PATCH 2/4] ipc: convert prepare_copy() from macro to function

On Wed, 07 Nov 2012 13:05:00 +0300
Stanislav Kinsbursky <skinsbursky@...allels.com> wrote:

> This code works if CONFIG_CHECKPOINT_RESTORE is disabled.
> 
> ...
>
> --- a/ipc/msg.c
> +++ b/ipc/msg.c
> @@ -803,8 +803,15 @@ static inline void free_copy(struct msg_msg *copy)
>  		free_msg(copy);
>  }
>  #else
> -#define prepare_copy(buf, sz, msgflg, msgtyp, copy_nr)	ERR_PTR(-ENOSYS)
>  #define fill_copy(copy_nr, msg_nr, msg, copy)		NULL
> +
> +static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz,
> +					   int msgflg, long *msgtyp,
> +					   unsigned long *copy_number)
> +{
> +	return ERR_PTR(-ENOSYS);
> +}
> +
>  static inline void free_copy(struct msg_msg *copy)
>  {
>  }
> @@ -819,7 +826,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
>  	int mode;
>  	struct ipc_namespace *ns;
>  	struct msg_msg *copy = NULL;
> -	unsigned long __maybe_unused copy_number;
> +	unsigned long __maybe_unused copy_number = 0;

The __maybe_unused here makes no sense.  I'll remove it.

>  
>  	if (msqid < 0 || (long) bufsz < 0)
>  		return -EINVAL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ