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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1212271435250.18214@chino.kir.corp.google.com>
Date:	Thu, 27 Dec 2012 14:38:38 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Liu Hui-R64343 <r64343@...escale.com>
cc:	Mel Gorman <mgorman@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: echo 1 > /proc/sys/vm/compact_memory -> sh: write error: Bad
 address

On Thu, 27 Dec 2012, Liu Hui-R64343 wrote:

> diff --git a/mm/compaction.c b/mm/compaction.c
> index c4bc5ac..d3cb27f 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -732,8 +732,10 @@ int sysctl_compact_memory;
>  int sysctl_compaction_handler(struct ctl_table *table, int write,
>                         void __user *buffer, size_t *length, loff_t *ppos)
>  {
> -       if (write)
> -               return compact_nodes();
> +       if (write) {
> +               compact_nodes();
> +               return *length;
> +       }
> 
>         return 0;
>  }

No need to return the length at all, simply change compact_nodes() to 
return void, remove the return value, and do

	if (write)
		compact_nodes();
	return 0;

and it should be fixed.  Could you write a changelog that shows the before 
and after behavior (not necessarily the implementation), sign-off the 
patch as described in Documentation/SubmittingPatches, running 
scripts/get_maintainer.pl on your new patch file, and sending it to 
all addresses that are listed?
--
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