linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg KH <gregkh@linuxfoundation.org>,
	torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk, Andreas Schwab <schwab@linux-m68k.org>,
	Thorsten Glaser <tg@debian.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [ 45/49] m68k: Make sys_atomic_cmpxchg_32 work on classic m68k
Date: Tue,  7 Aug 2012 15:45:03 -0700	[thread overview]
Message-ID: <20120807222030.887995969@linuxfoundation.org> (raw)
In-Reply-To: <20120807222026.848194739@linuxfoundation.org>

From: Greg KH <gregkh@linuxfoundation.org>

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Andreas Schwab <schwab@linux-m68k.org>

commit 9e2760d18b3cf179534bbc27692c84879c61b97c upstream.

User space access must always go through uaccess accessors, since on
classic m68k user space and kernel space are completely separate.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Tested-by: Thorsten Glaser <tg@debian.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/m68k/kernel/sys_m68k.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -479,9 +479,13 @@ sys_atomic_cmpxchg_32(unsigned long newv
 			goto bad_access;
 		}
 
-		mem_value = *mem;
+		/*
+		 * No need to check for EFAULT; we know that the page is
+		 * present and writable.
+		 */
+		__get_user(mem_value, mem);
 		if (mem_value == oldval)
-			*mem = newval;
+			__put_user(newval, mem);
 
 		pte_unmap_unlock(pte, ptl);
 		up_read(&mm->mmap_sem);



  parent reply	other threads:[~2012-08-07 22:47 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07 22:44 [ 00/49] 3.0.40-stable review Greg Kroah-Hartman
2012-08-07 22:44 ` [ 01/49] mmc: sdhci-pci: CaFe has broken card detection Greg Kroah-Hartman
2012-08-07 22:44 ` [ 02/49] powerpc/ftrace: Fix assembly trampoline register usage Greg Kroah-Hartman
2012-08-07 22:44 ` [ 03/49] powerpc: Add "memory" attribute for mfmsr() Greg Kroah-Hartman
2012-08-07 22:44 ` [ 04/49] powerpc: Fix wrong divisor in usecs_to_cputime Greg Kroah-Hartman
2012-08-07 22:44 ` [ 05/49] SCSI: libsas: continue revalidation Greg Kroah-Hartman
2012-08-07 22:44 ` [ 06/49] SCSI: libsas: fix sas_discover_devices return code handling Greg Kroah-Hartman
2012-08-07 22:44 ` [ 07/49] SCSI: fix eh wakeup (scsi_schedule_eh vs scsi_restart_operations) Greg Kroah-Hartman
2012-08-07 22:44 ` [ 08/49] SCSI: fix hot unplug vs async scan race Greg Kroah-Hartman
2012-08-07 22:44 ` [ 09/49] SCSI: Avoid dangling pointer in scsi_requeue_command() Greg Kroah-Hartman
2012-08-07 22:44 ` [ 10/49] ARM: OMAP2+: OPP: Fix to ensure check of right oppdef after bad one Greg Kroah-Hartman
2012-08-07 22:44 ` [ 11/49] ALSA: hda - Add support for Realtek ALC282 Greg Kroah-Hartman
2012-08-07 22:44 ` [ 12/49] usbdevfs: Correct amount of data copied to user in processcompl_compat Greg Kroah-Hartman
2012-08-07 22:44 ` [ 13/49] usb: gadget: Fix g_ether interface link status Greg Kroah-Hartman
2012-08-07 22:44 ` [ 14/49] locks: fix checking of fcntl_setlease argument Greg Kroah-Hartman
2012-08-07 22:44 ` [ 15/49] ftrace: Disable function tracing during suspend/resume and hibernation, again Greg Kroah-Hartman
2012-08-07 22:44 ` [ 16/49] stable: update references to older 2.6 versions for 3.x Greg Kroah-Hartman
2012-08-07 22:44 ` [ 17/49] workqueue: perform cpu down operations from low priority cpu_notifier() Greg Kroah-Hartman
2012-08-07 22:44 ` [ 18/49] ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check Greg Kroah-Hartman
2012-08-07 22:44 ` [ 19/49] Btrfs: call the ordered free operation without any locks held Greg Kroah-Hartman
2012-08-07 22:44 ` [ 20/49] drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns Greg Kroah-Hartman
2012-08-07 22:44 ` [ 21/49] drm/radeon: fix non revealent error message Greg Kroah-Hartman
2012-08-07 22:44 ` [ 22/49] drm/radeon: fix hotplug of DP to DVI|HDMI passive adapters (v2) Greg Kroah-Hartman
2012-08-07 22:44 ` [ 23/49] drm/radeon: on hotplug force link training to happen (v2) Greg Kroah-Hartman
2012-08-07 22:44 ` [ 24/49] nfsd4: our filesystems are normally case sensitive Greg Kroah-Hartman
2012-08-07 22:44 ` [ 25/49] nfs: skip commit in releasepage if were freeing memory for fs-related reasons Greg Kroah-Hartman
2012-08-07 22:44 ` [ 26/49] ext4: pass a char * to ext4_count_free() instead of a buffer_head ptr Greg Kroah-Hartman
2012-08-07 22:44 ` [ 27/49] ext4: dont let i_reserved_meta_blocks go negative Greg Kroah-Hartman
2012-08-07 22:44 ` [ 28/49] bnx2: Fix bug in bnx2_free_tx_skbs() Greg Kroah-Hartman
2012-08-07 22:44 ` [ 29/49] sch_sfb: Fix missing NULL check Greg Kroah-Hartman
2012-08-07 22:44 ` [ 30/49] sctp: Fix list corruption resulting from freeing an association on a list Greg Kroah-Hartman
2012-08-07 22:44 ` [ 31/49] caif: Fix access to freed pernet memory Greg Kroah-Hartman
2012-08-07 22:44 ` [ 32/49] cipso: dont follow a NULL pointer when setsockopt() is called Greg Kroah-Hartman
2012-08-07 22:44 ` [ 33/49] caif: fix NULL pointer check Greg Kroah-Hartman
2012-08-07 22:44 ` [ 34/49] wanmain: comparing array with NULL Greg Kroah-Hartman
2012-08-07 22:44 ` [ 35/49] tcp: Add TCP_USER_TIMEOUT negative value check Greg Kroah-Hartman
2012-08-07 22:44 ` [ 36/49] USB: kaweth.c: use GFP_ATOMIC under spin_lock Greg Kroah-Hartman
2012-08-07 22:44 ` [ 37/49] net: fix rtnetlink IFF_PROMISC and IFF_ALLMULTI handling Greg Kroah-Hartman
2012-08-07 22:44 ` [ 38/49] tcp: perform DMA to userspace only if there is a task waiting for it Greg Kroah-Hartman
2012-08-07 22:44 ` [ 39/49] net/tun: fix ioctl() based info leaks Greg Kroah-Hartman
2012-08-07 22:44 ` [ 40/49] USB: echi-dbgp: increase the controller wait time to come out of halt Greg Kroah-Hartman
2012-08-07 22:44 ` [ 41/49] ALSA: snd-usb: fix clock source validity index Greg Kroah-Hartman
2012-08-07 22:45 ` [ 42/49] ALSA: mpu401: Fix missing initialization of irq field Greg Kroah-Hartman
2012-08-07 22:45 ` [ 43/49] ASoC: wm8962: Allow VMID time to fully ramp Greg Kroah-Hartman
2012-08-07 22:45 ` [ 44/49] ASoC: wm8994: Ensure there are enough BCLKs for four channels Greg Kroah-Hartman
2012-08-07 22:45 ` Greg Kroah-Hartman [this message]
2012-08-07 22:45 ` [ 46/49] m68k: Correct the Atari ALLOWINT definition Greg Kroah-Hartman
2012-08-07 22:45 ` [ 47/49] futex: Test for pi_mutex on fault in futex_wait_requeue_pi() Greg Kroah-Hartman
2012-08-07 22:45 ` [ 48/49] futex: Fix bug in WARN_ON for NULL q.pi_state Greg Kroah-Hartman
2012-08-07 22:45 ` [ 49/49] futex: Forbid uaddr == uaddr2 in futex_wait_requeue_pi() Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120807222030.887995969@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwab@linux-m68k.org \
    --cc=stable@vger.kernel.org \
    --cc=tg@debian.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).