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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 4 Aug 2009 13:20:50 +0200
From:	Leon Woestenberg <leon.woestenberg@...il.com>
To:	Brice Goglin <Brice.Goglin@...ia.fr>
Cc:	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: get_user_pages() stores ERR_PTR() in pages[i] on 
	failure

Hello Brice,

On Tue, Aug 4, 2009 at 12:39 PM, Brice Goglin<Brice.Goglin@...ia.fr> wrote:
>
> Only compile-tested (and not in the nommu case).
>
> @@ -1317,10 +1320,11 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
>                                        FAULT_FLAG_WRITE : 0);
>
>                                if (ret & VM_FAULT_ERROR) {
> -                                       if (ret & VM_FAULT_OOM)
> -                                               return i ? i : -ENOMEM;
> -                                       else if (ret & VM_FAULT_SIGBUS)
> -                                               return i ? i : -EFAULT;
> +                                       if (ret & VM_FAULT_OOM) {
> +                                               err = -ENOMEM;
> +                                               goto abort;
> +                                       } else if (ret & VM_FAULT_SIGBUS)
> +                                               goto abort;

Minor style issue; when the if-block has brackets, the else(if)-block
should also have brackets (even when it's a one-liner on the else
block).

Looks good, I will go ahead and test it (back-port/patched against 2.6.30).

Regards,
-- 
Leon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ