~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/s390/lib/uaccess_pt.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
                     : "0" (-EFAULT), "d" (oparg), "a" (uaddr),         \
303
303
                       "m" (*uaddr) : "cc" );
304
304
 
305
 
static int __futex_atomic_op_pt(int op, int __user *uaddr, int oparg, int *old)
 
305
static int __futex_atomic_op_pt(int op, u32 __user *uaddr, int oparg, int *old)
306
306
{
307
307
        int oldval = 0, newval, ret;
308
308
 
335
335
        return ret;
336
336
}
337
337
 
338
 
int futex_atomic_op_pt(int op, int __user *uaddr, int oparg, int *old)
 
338
int futex_atomic_op_pt(int op, u32 __user *uaddr, int oparg, int *old)
339
339
{
340
340
        int ret;
341
341
 
354
354
        return ret;
355
355
}
356
356
 
357
 
static int __futex_atomic_cmpxchg_pt(int __user *uaddr, int oldval, int newval)
 
357
static int __futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr,
 
358
                                     u32 oldval, u32 newval)
358
359
{
359
360
        int ret;
360
361
 
361
362
        asm volatile("0: cs   %1,%4,0(%5)\n"
362
 
                     "1: lr   %0,%1\n"
 
363
                     "1: la   %0,0\n"
363
364
                     "2:\n"
364
365
                     EX_TABLE(0b,2b) EX_TABLE(1b,2b)
365
366
                     : "=d" (ret), "+d" (oldval), "=m" (*uaddr)
366
367
                     : "0" (-EFAULT), "d" (newval), "a" (uaddr), "m" (*uaddr)
367
368
                     : "cc", "memory" );
 
369
        *uval = oldval;
368
370
        return ret;
369
371
}
370
372
 
371
 
int futex_atomic_cmpxchg_pt(int __user *uaddr, int oldval, int newval)
 
373
int futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr,
 
374
                            u32 oldval, u32 newval)
372
375
{
373
376
        int ret;
374
377
 
375
378
        if (segment_eq(get_fs(), KERNEL_DS))
376
 
                return __futex_atomic_cmpxchg_pt(uaddr, oldval, newval);
 
379
                return __futex_atomic_cmpxchg_pt(uval, uaddr, oldval, newval);
377
380
        spin_lock(&current->mm->page_table_lock);
378
381
        uaddr = (int __user *) __dat_user_addr((unsigned long) uaddr);
379
382
        if (!uaddr) {
382
385
        }
383
386
        get_page(virt_to_page(uaddr));
384
387
        spin_unlock(&current->mm->page_table_lock);
385
 
        ret = __futex_atomic_cmpxchg_pt(uaddr, oldval, newval);
 
388
        ret = __futex_atomic_cmpxchg_pt(uval, uaddr, oldval, newval);
386
389
        put_page(virt_to_page(uaddr));
387
390
        return ret;
388
391
}