1. 30 Dec, 2012 13 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux · 4a490b78
      Linus Torvalds authored
      Pull DRM update from Dave Airlie:
       "This is a bit larger due to me not bothering to do anything since
        before Xmas, and other people working too hard after I had clearly
        given up.
      
        It's got the 3 main x86 driver fixes pulls, and a bunch of tegra
        fixes, doesn't fix the Ironlake bug yet, but that does seem to be
        getting closer.
      
         - radeon: gpu reset fixes and userspace packet support
         - i915: watermark fixes, workarounds, i830/845 fix,
         - nouveau: nvd9/kepler microcode fixes, accel is now enabled and
           working, gk106 support
         - tegra: misc fixes."
      
      * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (34 commits)
        Revert "drm: tegra: protect DC register access with mutex"
        drm: tegra: program only one window during modeset
        drm: tegra: clean out old gem prototypes
        drm: tegra: remove redundant tegra2_tmds_config entry
        drm: tegra: protect DC register access with mutex
        drm: tegra: don't leave clients host1x member uninitialized
        drm: tegra: fix front_porch <-> back_porch mixup
        drm/nve0/graph: fix fuc, and enable acceleration on all known chipsets
        drm/nvc0/graph: fix fuc, and enable acceleration on GF119
        drm/nouveau/bios: cache ramcfg strap on later chipsets
        drm/nouveau/mxm: silence output if no bios data
        drm/nouveau/bios: parse/display extra version component
        drm/nouveau/bios: implement opcode 0xa9
        drm/nouveau/bios: update gpio parsing apis to match current design
        drm/nouveau: initial support for GK106
        drm/radeon: add WAIT_UNTIL to evergreen VM safe reg list
        drm/i915: disable shrinker lock stealing for create_mmap_offset
        drm/i915: optionally disable shrinker lock stealing
        drm/i915: fix flags in dma buf exporting
        drm/radeon: add support for MEM_WRITE packet
        ...
      4a490b78
    • Linus Torvalds's avatar
      Merge tag 'omap-late-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 8d91a42e
      Linus Torvalds authored
      Pull late ARM cleanups for omap from Olof Johansson:
       "From Tony Lindgren:
      
        Here are few more patches to finish the omap changes for multiplatform
        conversion that are not strictly fixes, but were too complex to do
        with the dependencies during the merge window.  Those are to move of
        serial-omap.h to platform_data, and the removal of remaining
        cpu_is_omap macro usage outside mach-omap2.
      
        Then there are several trivial fixes for typos and few minimal
        omap2plus_defconfig updates."
      
      * tag 'omap-late-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        arch/arm/mach-omap2/dpll3xxx.c: drop if around WARN_ON
        OMAP2: Fix a typo - replace regist with register.
        ARM/omap: use module_platform_driver macro
        ARM: OMAP2+: PMU: Remove unused header
        ARM: OMAP4: remove duplicated include from omap_hwmod_44xx_data.c
        ARM: OMAP2+: omap2plus_defconfig: enable twl4030 SoC audio
        ARM: OMAP2+: omap2plus_defconfig: Add tps65217 support
        ARM: OMAP2+: enable devtmpfs and devtmpfs automount
        ARM: OMAP2+: omap_twl: Change TWL4030_MODULE_PM_RECEIVER to TWL_MODULE_PM_RECEIVER
        ARM: OMAP2+: Drop plat/cpu.h for omap2plus
        ARM: OMAP: Split fb.c to remove last remaining cpu_is_omap usage
        MAINTAINERS: Add an entry for omap related .dts files
      8d91a42e
    • Linus Torvalds's avatar
      Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 4fe2dfab
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "It's been quiet over the holidays, but we have had a couple of trivial
        fixes coming in for the newly introduced sunxi platform; one to add it
        to the multiplatform defconfig for build coverage, and one fixup for
        device tree strings."
      
      * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        sunxi: Change the machine compatible string.
        ARM: multi_v7_defconfig: Add ARCH_SUNXI
      4fe2dfab
    • Dave Airlie's avatar
      Revert "drm: tegra: protect DC register access with mutex" · d5757dbe
      Dave Airlie authored
      This reverts commit 83c0bcb6.
      
      Lucas pointed out this was a mistake, and I missed the discussion,
      so just revert it out to save a rebase.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      d5757dbe
    • Lucas Stach's avatar
      drm: tegra: program only one window during modeset · 500df2e5
      Lucas Stach authored
      The intention is to program exactly WIN_A, not WIN_A and possibly
      others.
      Signed-off-by: default avatarLucas Stach <dev@lynxeye.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      500df2e5
    • Lucas Stach's avatar
      drm: tegra: clean out old gem prototypes · e39250aa
      Lucas Stach authored
      There is no gem.c anymore, those functions are implemented by the
      drm_cma_helpers now.
      Signed-off-by: default avatarLucas Stach <dev@lynxeye.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e39250aa
    • Lucas Stach's avatar
      drm: tegra: remove redundant tegra2_tmds_config entry · fa416ddc
      Lucas Stach authored
      The 720p and 1080p entries are completely redundant, as we are matching
      the table entries against <=pclk.
      Also generalize the comment, as we are using those table entries even
      when driving other modes than the standard TV ones.
      Signed-off-by: default avatarLucas Stach <dev@lynxeye.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      fa416ddc
    • Lucas Stach's avatar
      drm: tegra: protect DC register access with mutex · 83c0bcb6
      Lucas Stach authored
      Window properties are programmed through a shared aperture and have to
      happen atomically. Also we do the read-update-write dance on some of the
      shared regs.
      To make sure that different functions don't stumble over each other
      protect the register access with a mutex.
      Signed-off-by: default avatarLucas Stach <dev@lynxeye.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      83c0bcb6
    • Lucas Stach's avatar
      drm: tegra: don't leave clients host1x member uninitialized · 4026bfb3
      Lucas Stach authored
      No real problem for now, as nothing is using this, but leaving it
      unitialized is asking for trouble later on.
      Signed-off-by: default avatarLucas Stach <dev@lynxeye.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      4026bfb3
    • Lucas Stach's avatar
      drm: tegra: fix front_porch <-> back_porch mixup · 40495089
      Lucas Stach authored
      Fixes wrong picture offset observed when using HDMI output with a
      Technisat HD TV.
      Signed-off-by: default avatarLucas Stach <dev@lynxeye.de>
      Acked-by: default avatarMark Zhang <markz@nvidia.com>
      Tested-by: default avatarMark Zhang <markz@nvidia.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      40495089
    • Dave Airlie's avatar
      Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-next · 8be0e5c4
      Dave Airlie authored
      Some fixes for 3.8:
      - Watermark fixups from Chris Wilson (4 pieces).
      - 2 snb workarounds, seem to be recently added to our internal DB.
      - workaround for the infamous i830/i845 hang, seems now finally solid!
        Based on Chris' fix for SNA, now also for UXA/mesa&old SNA.
      - Some more fixlets for shrinker-pulls-the-rug issues (Chris&me).
      - Fix dma-buf flags when exporting (you).
      - Disable the VGA plane if it's enabled on lid open - similar fix in
        spirit to the one I've sent you last weeek, BIOS' really like to mess
        with the display when closing the lid (awesome debug work from Krzysztof
        Mazur).
      
      * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
        drm/i915: disable shrinker lock stealing for create_mmap_offset
        drm/i915: optionally disable shrinker lock stealing
        drm/i915: fix flags in dma buf exporting
        i915: ensure that VGA plane is disabled
        drm/i915: Preallocate the drm_mm_node prior to manipulating the GTT drm_mm manager
        drm: Export routines for inserting preallocated nodes into the mm manager
        drm/i915: don't disable disconnected outputs
        drm/i915: Implement workaround for broken CS tlb on i830/845
        drm/i915: Implement WaSetupGtModeTdRowDispatch
        drm/i915: Implement WaDisableHiZPlanesWhenMSAAEnabled
        drm/i915: Prefer CRTC 'active' rather than 'enabled' during WM computations
        drm/i915: Clear self-refresh watermarks when disabled
        drm/i915: Double the cursor self-refresh latency on Valleyview
        drm/i915: Fixup cursor latency used for IVB lp3 watermarks
      8be0e5c4
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux into drm-next · b1d778b9
      Dave Airlie authored
      Misc fixes for reset and new packets for userspace usage.
      
      * 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux:
        drm/radeon: add WAIT_UNTIL to evergreen VM safe reg list
        drm/radeon: add support for MEM_WRITE packet
        drm/radeon: restore modeset late in GPU reset path
        drm/radeon: avoid deadlock in pm path when waiting for fence
        drm/radeon: don't leave fence blocked process on failed GPU reset
      b1d778b9
    • Dave Airlie's avatar
      Merge branch 'drm-nouveau-fixes-3.8' of... · 344f9067
      Dave Airlie authored
      Merge branch 'drm-nouveau-fixes-3.8' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
      
      Fixes the accel support for nvd9 + kepler chipsets, also fixes GK106 support.
      
      * 'drm-nouveau-fixes-3.8' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
        drm/nve0/graph: fix fuc, and enable acceleration on all known chipsets
        drm/nvc0/graph: fix fuc, and enable acceleration on GF119
        drm/nouveau/bios: cache ramcfg strap on later chipsets
        drm/nouveau/mxm: silence output if no bios data
        drm/nouveau/bios: parse/display extra version component
        drm/nouveau/bios: implement opcode 0xa9
        drm/nouveau/bios: update gpio parsing apis to match current design
        drm/nouveau: initial support for GK106
      344f9067
  2. 28 Dec, 2012 2 commits
  3. 27 Dec, 2012 3 commits
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 101e5c74
      Linus Torvalds authored
      Pull hwmon fixes from Guenter Roeck:
      
       - Report i2c errors to userspace in lm73 driver
      
       - Fix problem with DIV_ROUND_CLOSEST and unsigned divisors in emc6w201
         driver
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (emc6w201) Fix DIV_ROUND_CLOSEST problem with unsigned divisors
        hwmon: (lm73} Detect and report i2c bus errors
      101e5c74
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · ddf75ae3
      Linus Torvalds authored
      Pull namespace fixes from Eric Biederman:
       "This tree includes two bug fixes for problems Oleg spotted on his
        review of the recent pid namespace work.  A small fix to not enable
        bottom halves with irqs disabled, and a trivial build fix for f2fs
        with user namespaces enabled."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        f2fs: Don't assign e_id in f2fs_acl_from_disk
        proc: Allow proc_free_inum to be called from any context
        pidns: Stop pid allocation when init dies
        pidns: Outlaw thread creation after unshare(CLONE_NEWPID)
      ddf75ae3
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 7fd83b47
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
      1) GRE tunnel drivers don't set the transport header properly, they also
         blindly deref the inner protocol ipv4 and needs some checks.  Fixes
         from Isaku Yamahata.
      
      2) Fix sleeps while atomic in netdevice rename code, from Eric Dumazet.
      
      3) Fix double-spinlock in solos-pci driver, from Dan Carpenter.
      
      4) More ARP bug fixes.  Fix lockdep splat in arp_solicit() and then the
         bug accidentally added by that fix.  From Eric Dumazet and Cong Wang.
      
      5) Remove some __dev* annotations that slipped back in, as well as all
         HOTPLUG references.  From Greg KH
      
      6) RDS protocol uses wrong interfaces to access scatter-gather elements,
         causing a regression.  From Mike Marciniszyn.
      
      7) Fix build error in cpts driver, from Richard Cochran.
      
      8) Fix arithmetic in packet scheduler, from Stefan Hasko.
      
      9) Similarly, fix association during calculation of random backoff in
         batman-adv.  From Akinobu Mita.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits)
        ipv6/ip6_gre: set transport header correctly
        ipv4/ip_gre: set transport header correctly to gre header
        IB/rds: suppress incompatible protocol when version is known
        IB/rds: Correct ib_api use with gs_dma_address/sg_dma_len
        net/vxlan: Use the underlying device index when joining/leaving multicast groups
        tcp: should drop incoming frames without ACK flag set
        netprio_cgroup: define sk_cgrp_prioidx only if NETPRIO_CGROUP is enabled
        cpts: fix a run time warn_on.
        cpts: fix build error by removing useless code.
        batman-adv: fix random jitter calculation
        arp: fix a regression in arp_solicit()
        net: sched: integer overflow fix
        CONFIG_HOTPLUG removal from networking core
        Drivers: network: more __dev* removal
        bridge: call br_netpoll_disable in br_add_if
        ipv4: arp: fix a lockdep splat in arp_solicit()
        tuntap: dont use a private kmem_cache
        net: devnet_rename_seq should be a seqcount
        ip_gre: fix possible use after free
        ip_gre: make ipgre_tunnel_xmit() not parse network header as IP unconditionally
        ...
      7fd83b47
  4. 26 Dec, 2012 14 commits
    • Isaku Yamahata's avatar
      ipv6/ip6_gre: set transport header correctly · ae782bb1
      Isaku Yamahata authored
      ip6gre_xmit2() incorrectly sets transport header to inner payload
      instead of GRE header. It seems copy-and-pasted from ipip.c.
      Set transport header to gre header.
      (In ipip case the transport header is the inner ip header, so that's
      correct.)
      
      Found by inspection. In practice the incorrect transport header
      doesn't matter because the skb usually is sent to another net_device
      or socket, so the transport header isn't referenced.
      Signed-off-by: default avatarIsaku Yamahata <yamahata@valinux.co.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae782bb1
    • Isaku Yamahata's avatar
      ipv4/ip_gre: set transport header correctly to gre header · 861aa6d5
      Isaku Yamahata authored
      ipgre_tunnel_xmit() incorrectly sets transport header to inner payload
      instead of GRE header. It seems copy-and-pasted from ipip.c.
      So set transport header to gre header.
      (In ipip case the transport header is the inner ip header, so that's
      correct.)
      
      Found by inspection. In practice the incorrect transport header
      doesn't matter because the skb usually is sent to another net_device
      or socket, so the transport header isn't referenced.
      Signed-off-by: default avatarIsaku Yamahata <yamahata@valinux.co.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      861aa6d5
    • Marciniszyn, Mike's avatar
      IB/rds: suppress incompatible protocol when version is known · a4967598
      Marciniszyn, Mike authored
      Add an else to only print the incompatible protocol message
      when version hasn't been established.
      Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4967598
    • Marciniszyn, Mike's avatar
      IB/rds: Correct ib_api use with gs_dma_address/sg_dma_len · f2e9bd70
      Marciniszyn, Mike authored
      0b088e00 ("RDS: Use page_remainder_alloc() for recv bufs")
      added uses of sg_dma_len() and sg_dma_address(). This makes
      RDS DOA with the qib driver.
      
      IB ulps should use ib_sg_dma_len() and ib_sg_dma_address
      respectively since some HCAs overload ib_sg_dma* operations.
      Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f2e9bd70
    • Yan Burman's avatar
      net/vxlan: Use the underlying device index when joining/leaving multicast groups · af9b078e
      Yan Burman authored
      The socket calls from vxlan to join/leave multicast group aren't
      using the index of the underlying device, as a result the stack uses
      the first interface that is up. This results in vxlan being non functional
      over a device which isn't the 1st to be up.
      Fix this by providing the iflink field to the vxlan instance
      to the multicast calls.
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      af9b078e
    • Eric Dumazet's avatar
      tcp: should drop incoming frames without ACK flag set · c3ae62af
      Eric Dumazet authored
      In commit 96e0bf4b (tcp: Discard segments that ack data not yet
      sent) John Dykstra enforced a check against ack sequences.
      
      In commit 354e4aa3 (tcp: RFC 5961 5.2 Blind Data Injection Attack
      Mitigation) I added more safety tests.
      
      But we missed fact that these tests are not performed if ACK bit is
      not set.
      
      RFC 793 3.9 mandates TCP should drop a frame without ACK flag set.
      
      " fifth check the ACK field,
            if the ACK bit is off drop the segment and return"
      
      Not doing so permits an attacker to only guess an acceptable sequence
      number, evading stronger checks.
      
      Many thanks to Zhiyun Qian for bringing this issue to our attention.
      
      See :
      http://web.eecs.umich.edu/~zhiyunq/pub/ccs12_TCP_sequence_number_inference.pdfReported-by: default avatarZhiyun Qian <zhiyunq@umich.edu>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Nandita Dukkipati <nanditad@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: John Dykstra <john.dykstra1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3ae62af
    • Christoffer Dall's avatar
      mm: Fix PageHead when !CONFIG_PAGEFLAGS_EXTENDED · ad4b3fb7
      Christoffer Dall authored
      Unfortunately with !CONFIG_PAGEFLAGS_EXTENDED, (!PageHead) is false, and
      (PageHead) is true, for tail pages.  If this is indeed the intended
      behavior, which I doubt because it breaks cache cleaning on some ARM
      systems, then the nomenclature is highly problematic.
      
      This patch makes sure PageHead is only true for head pages and PageTail
      is only true for tail pages, and neither is true for non-compound pages.
      
      [ This buglet seems ancient - seems to have been introduced back in Apr
        2008 in commit 6a1e7f77: "pageflags: convert to the use of new
        macros".  And the reason nobody noticed is because the PageHead()
        tests are almost all about just sanity-checking, and only used on
        pages that are actual page heads.  The fact that the old code returned
        true for tail pages too was thus not really noticeable.   - Linus ]
      Signed-off-by: default avatarChristoffer Dall <cdall@cs.columbia.edu>
      Acked-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Will Deacon <Will.Deacon@arm.com>
      Cc: Steve Capper <Steve.Capper@arm.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: stable@kernel.org  # 2.6.26+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ad4b3fb7
    • Li Zefan's avatar
      netprio_cgroup: define sk_cgrp_prioidx only if NETPRIO_CGROUP is enabled · 3d0dcfbd
      Li Zefan authored
      sock->sk_cgrp_prioidx won't be used at all if CONFIG_NETPRIO_CGROUP=n.
      Signed-off-by: default avatarLi Zefan <lizefan@huawei.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d0dcfbd
    • Richard Cochran's avatar
      cpts: fix a run time warn_on. · ccb6e984
      Richard Cochran authored
      This patch fixes a warning in clk_enable by calling clk_prepare_enable
      instead.
      Signed-off-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ccb6e984
    • Richard Cochran's avatar
      cpts: fix build error by removing useless code. · cbc44dbe
      Richard Cochran authored
      The cpts driver tries to obtain the input clock frequency by calling the
      clock's internal 'recalc' method. Since <plat/clock.h> has been removed,
      this code can no longer compile.
      
      However, the driver never makes use of the frequency value, so this patch
      fixes the issue by removing the offending code altogether.
      Signed-off-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cbc44dbe
    • Akinobu Mita's avatar
      batman-adv: fix random jitter calculation · 143cdd8f
      Akinobu Mita authored
      batadv_iv_ogm_emit_send_time() attempts to calculates a random integer
      in the range of 'orig_interval +- BATADV_JITTER' by the below lines.
      
              msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
              msecs += (random32() % 2 * BATADV_JITTER);
      
      But it actually gets 'orig_interval' or 'orig_interval - BATADV_JITTER'
      because '%' and '*' have same precedence and associativity is
      left-to-right.
      
      This adds the parentheses at the appropriate position so that it matches
      original intension.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Acked-by: default avatarAntonio Quartulli <ordex@autistici.org>
      Cc: Marek Lindner <lindner_marek@yahoo.de>
      Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Cc: Antonio Quartulli <ordex@autistici.org>
      Cc: b.a.t.m.a.n@lists.open-mesh.org
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      143cdd8f
    • Eric W. Biederman's avatar
      f2fs: Don't assign e_id in f2fs_acl_from_disk · 48c6d121
      Eric W. Biederman authored
      With user namespaces enabled building f2fs fails with:
      
       CC      fs/f2fs/acl.o
      fs/f2fs/acl.c: In function ‘f2fs_acl_from_disk’:
      fs/f2fs/acl.c:85:21: error: ‘struct posix_acl_entry’ has no member named ‘e_id’
      make[2]: *** [fs/f2fs/acl.o] Error 1
      make[2]: Target `__build' not remade because of errors.
      
      e_id is a backwards compatibility field only used for file systems
      that haven't been converted to use kuids and kgids.  When the posix
      acl tag field is neither ACL_USER nor ACL_GROUP assigning e_id is
      unnecessary.  Remove the assignment so f2fs will build with user
      namespaces enabled.
      
      Cc: Namjae Jeon <namjae.jeon@samsung.com>
      Cc: Amit Sahrawat <a.sahrawat@samsung.com>
      Acked-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      48c6d121
    • Eric W. Biederman's avatar
      proc: Allow proc_free_inum to be called from any context · dfb2ea45
      Eric W. Biederman authored
      While testing the pid namespace code I hit this nasty warning.
      
      [  176.262617] ------------[ cut here ]------------
      [  176.263388] WARNING: at /home/eric/projects/linux/linux-userns-devel/kernel/softirq.c:160 local_bh_enable_ip+0x7a/0xa0()
      [  176.265145] Hardware name: Bochs
      [  176.265677] Modules linked in:
      [  176.266341] Pid: 742, comm: bash Not tainted 3.7.0userns+ #18
      [  176.266564] Call Trace:
      [  176.266564]  [<ffffffff810a539f>] warn_slowpath_common+0x7f/0xc0
      [  176.266564]  [<ffffffff810a53fa>] warn_slowpath_null+0x1a/0x20
      [  176.266564]  [<ffffffff810ad9ea>] local_bh_enable_ip+0x7a/0xa0
      [  176.266564]  [<ffffffff819308c9>] _raw_spin_unlock_bh+0x19/0x20
      [  176.266564]  [<ffffffff8123dbda>] proc_free_inum+0x3a/0x50
      [  176.266564]  [<ffffffff8111d0dc>] free_pid_ns+0x1c/0x80
      [  176.266564]  [<ffffffff8111d195>] put_pid_ns+0x35/0x50
      [  176.266564]  [<ffffffff810c608a>] put_pid+0x4a/0x60
      [  176.266564]  [<ffffffff8146b177>] tty_ioctl+0x717/0xc10
      [  176.266564]  [<ffffffff810aa4d5>] ? wait_consider_task+0x855/0xb90
      [  176.266564]  [<ffffffff81086bf9>] ? default_spin_lock_flags+0x9/0x10
      [  176.266564]  [<ffffffff810cab0a>] ? remove_wait_queue+0x5a/0x70
      [  176.266564]  [<ffffffff811e37e8>] do_vfs_ioctl+0x98/0x550
      [  176.266564]  [<ffffffff810b8a0f>] ? recalc_sigpending+0x1f/0x60
      [  176.266564]  [<ffffffff810b9127>] ? __set_task_blocked+0x37/0x80
      [  176.266564]  [<ffffffff810ab95b>] ? sys_wait4+0xab/0xf0
      [  176.266564]  [<ffffffff811e3d31>] sys_ioctl+0x91/0xb0
      [  176.266564]  [<ffffffff810a95f0>] ? task_stopped_code+0x50/0x50
      [  176.266564]  [<ffffffff81939199>] system_call_fastpath+0x16/0x1b
      [  176.266564] ---[ end trace 387af88219ad6143 ]---
      
      It turns out that spin_unlock_bh(proc_inum_lock) is not safe when
      put_pid is called with another spinlock held and irqs disabled.
      
      For now take the easy path and use spin_lock_irqsave(proc_inum_lock)
      in proc_free_inum and spin_loc_irq in proc_alloc_inum(proc_inum_lock).
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      dfb2ea45
    • Eric W. Biederman's avatar
      pidns: Stop pid allocation when init dies · c876ad76
      Eric W. Biederman authored
      Oleg pointed out that in a pid namespace the sequence.
      - pid 1 becomes a zombie
      - setns(thepidns), fork,...
      - reaping pid 1.
      - The injected processes exiting.
      
      Can lead to processes attempting access their child reaper and
      instead following a stale pointer.
      
      That waitpid for init can return before all of the processes in
      the pid namespace have exited is also unfortunate.
      
      Avoid these problems by disabling the allocation of new pids in a pid
      namespace when init dies, instead of when the last process in a pid
      namespace is reaped.
      Pointed-out-by: default avatarOleg Nesterov <oleg@redhat.com>
      Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      c876ad76
  5. 25 Dec, 2012 2 commits
  6. 23 Dec, 2012 6 commits