~ubuntu-branches/ubuntu/raring/linux-lowlatency/raring

« back to all changes in this revision

Viewing changes to drivers/xen/privcmd.c

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft, Andy Whitcroft, Ubuntu: 3.7.0-4.12, Ubuntu: 3.7.0-4.11, Ubuntu: 3.7.0-4.10
  • Date: 2012-11-28 17:52:14 UTC
  • Revision ID: package-import@ubuntu.com-20121128175214-btremk0zrunld1q7
Tags: 3.7.0-4.3
[ Andy Whitcroft ]

* rebase to Ubuntu-3.7.0-4.12

[ Ubuntu: 3.7.0-4.12 ]

* Revert "[Config] Use -j1 for headers_install"
* Revert "[Config] install-arch-headers needs a valid config"
  Strayed into the weeds in search of the root cause of the periodic
  build failure.
  Fixes powerpc FTBS introduced in -4.11.
* [Config] hmake -j1
  The kernel makefile appears to have parallel dependency
  problems for the install_headers target. This appears to be root
  cause for a periodic build failure on N-way machines.

[ Ubuntu: 3.7.0-4.11 ]

* [Config] Use -j1 for headers_install
  Also fixes a powerpc FTBS introduced by
  "[Config] install-arch-headers needs a valid config".

[ Ubuntu: 3.7.0-4.10 ]

* [Config] add rebuild-test support for autopkgtest
  - LP: #1081500
* [tests] move build tests out of the way
  - LP: #1081500
* [tests] add an autopkgtest rebuild test
  - LP: #1081500
* rebase to v3.7-rc7
* SAUCE: Remove emi62 files duplicated in linux-firmware
* SAUCE: Remove sb16 files duplicated in linux-firmware
* SAUCE: Remove whiteheat files duplicated in linux-firmware
* SAUCE: Remove yamaha files duplicated in linux-firmware
* SAUCE: Remove dsp56k files used only by m68k
* SAUCE: firmware: Remove last vestiges of dabusb
* SAUCE: Remove vicam files duplicated in linux-firmware
* [Config] install-arch-headers needs a valid config
* rebase to v3.7-rc7
  - LP: #1076840
  - LP: #1081466

Show diffs side-by-side

added added

removed removed

Lines of Context:
361
361
        down_write(&mm->mmap_sem);
362
362
 
363
363
        vma = find_vma(mm, m.addr);
364
 
        ret = -EINVAL;
365
364
        if (!vma ||
366
365
            vma->vm_ops != &privcmd_vm_ops ||
367
366
            (m.addr != vma->vm_start) ||
368
367
            ((m.addr + (nr_pages << PAGE_SHIFT)) != vma->vm_end) ||
369
368
            !privcmd_enforce_singleshot_mapping(vma)) {
370
369
                up_write(&mm->mmap_sem);
 
370
                ret = -EINVAL;
371
371
                goto out;
372
372
        }
373
373
 
383
383
 
384
384
        up_write(&mm->mmap_sem);
385
385
 
386
 
        if (state.global_error && (version == 1)) {
387
 
                /* Write back errors in second pass. */
388
 
                state.user_mfn = (xen_pfn_t *)m.arr;
389
 
                state.err      = err_array;
390
 
                ret = traverse_pages(m.num, sizeof(xen_pfn_t),
391
 
                                     &pagelist, mmap_return_errors_v1, &state);
 
386
        if (version == 1) {
 
387
                if (state.global_error) {
 
388
                        /* Write back errors in second pass. */
 
389
                        state.user_mfn = (xen_pfn_t *)m.arr;
 
390
                        state.err      = err_array;
 
391
                        ret = traverse_pages(m.num, sizeof(xen_pfn_t),
 
392
                                             &pagelist, mmap_return_errors_v1, &state);
 
393
                } else
 
394
                        ret = 0;
 
395
 
392
396
        } else if (version == 2) {
393
397
                ret = __copy_to_user(m.err, err_array, m.num * sizeof(int));
394
398
                if (ret)