1. 10 7月, 2012 11 次提交
    • E
      bonding: Manage /proc/net/bonding/ entries from the netdev events · a64d49c3
      Eric W. Biederman 提交于
      It was recently reported that moving a bonding device between network
      namespaces causes warnings from /proc.  It turns out after the move we
      were trying to add and to remove the /proc/net/bonding entries from the
      wrong network namespace.
      
      Move the bonding /proc registration code into the NETDEV_REGISTER and
      NETDEV_UNREGISTER events where the proc registration and unregistration
      will always happen at the right time.
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a64d49c3
    • D
      stmmac: Fix for higher mtu size handling · 684901a6
      Deepak Sikri 提交于
      For the higher mtu sizes requiring the buffer size greater than 8192,
      the buffers are sent or received using multiple dma descriptors/ same
      descriptor with option of multi buffer handling.
      It was observed during tests that the driver was missing on data
      packets during the normal ping operations if the data buffers being used
      catered to jumbo frame handling.
      
      The memory barrriers are added in between preparation of dma descriptors
      in the jumbo frame handling path to ensure all instructions before
      enabling the dma are complete.
      Signed-off-by: NDeepak Sikri <deepak.sikri@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      684901a6
    • D
      stmmac: Fix for nfs hang on multiple reboot · 8e839891
      Deepak Sikri 提交于
      It was observed that during multiple reboots nfs hangs. The status of
      receive descriptors shows that all the descriptors were in control of
      CPU, and none were assigned to DMA.
      Also the DMA status register confirmed that the Rx buffer is
      unavailable.
      
      This patch adds the fix for the same by adding the memory barriers to
      ascertain that the all instructions before enabling the Rx or Tx DMA are
      completed which involves the proper setting of the ownership bit in DMA
      descriptors.
      Signed-off-by: NDeepak Sikri <deepak.sikri@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e839891
    • J
      Merge branch 'master' of... · c1109736
      John W. Linville 提交于
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
      c1109736
    • E
      iwlegacy: don't mess up the SCD when removing a key · b48d9665
      Emmanuel Grumbach 提交于
      When we remove a key, we put a key index which was supposed
      to tell the fw that we are actually removing the key. But
      instead the fw took that index as a valid index and messed
      up the SRAM of the device.
      
      This memory corruption on the device mangled the data of
      the SCD. The impact on the user is that SCD queue 2 got
      stuck after having removed keys.
      Reported-by: NPaul Bolle <pebolle@tiscali.nl>
      Cc: stable@vger.kernel.org
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b48d9665
    • S
      iwlegacy: always monitor for stuck queues · c2ca7d92
      Stanislaw Gruszka 提交于
      This is iwlegacy version of:
      
      commit 342bbf3f
      Author: Johannes Berg <johannes.berg@intel.com>
      Date:   Sun Mar 4 08:50:46 2012 -0800
      
          iwlwifi: always monitor for stuck queues
      
          If we only monitor while associated, the following
          can happen:
           - we're associated, and the queue stuck check
             runs, setting the queue "touch" time to X
           - we disassociate, stopping the monitoring,
             which leaves the time set to X
           - almost 2s later, we associate, and enqueue
             a frame
           - before the frame is transmitted, we monitor
             for stuck queues, and find the time set to
             X, although it is now later than X + 2000ms,
             so we decide that the queue is stuck and
             erroneously restart the device
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c2ca7d92
    • S
      rt2x00usb: fix indexes ordering on RX queue kick · efd82118
      Stanislaw Gruszka 提交于
      On rt2x00_dmastart() we increase index specified by Q_INDEX and on
      rt2x00_dmadone() we increase index specified by Q_INDEX_DONE. So entries
      between Q_INDEX_DONE and Q_INDEX are those we currently process in the
      hardware. Entries between Q_INDEX and Q_INDEX_DONE are those we can
      submit to the hardware.
      
      According to that fix rt2x00usb_kick_queue(), as we need to submit RX
      entries that are not processed by the hardware. It worked before only
      for empty queue, otherwise was broken.
      
      Note that for TX queues indexes ordering are ok. We need to kick entries
      that have filled skb, but was not submitted to the hardware, i.e.
      started from Q_INDEX_DONE and have ENTRY_DATA_PENDING bit set.
      
      From practical standpoint this fixes RX queue stall, usually reproducible
      in AP mode, like for example reported here:
      https://bugzilla.redhat.com/show_bug.cgi?id=828824Reported-and-tested-by: NFranco Miceli <fmiceli@plan.ceibal.edu.uy>
      Reported-and-tested-by: NTom Horsley <horsley1953@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      efd82118
    • B
      mwifiex: fix Coverity SCAN CID 709078: Resource leak (RESOURCE_LEAK) · b3190466
      Bing Zhao 提交于
      > *. CID 709078: Resource leak (RESOURCE_LEAK)
      > 	- drivers/net/wireless/mwifiex/cfg80211.c, line: 935
      > Assigning: "bss_cfg" = storage returned from "kzalloc(132UL, 208U)"
      > 	- but was not free
      > drivers/net/wireless/mwifiex/cfg80211.c:935
      Signed-off-by: NBing Zhao <bzhao@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b3190466
    • E
      mac80211: destroy assoc_data correctly if assoc fails · 10a9109f
      Eliad Peller 提交于
      If association failed due to internal error (e.g. no
      supported rates IE), we call ieee80211_destroy_assoc_data()
      with assoc=true, while we actually reject the association.
      
      This results in the BSSID not being zeroed out.
      
      After passing assoc=false, we no longer have to call
      sta_info_destroy_addr() explicitly. While on it, move
      the "associated" message after the assoc_success check.
      
      Cc: stable@vger.kernel.org [3.4+]
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      10a9109f
    • S
      NFC: Prevent NULL deref when getting socket name · 147f20e3
      Sasha Levin 提交于
      llcp_sock_getname can be called without a device attached to the nfc_llcp_sock.
      
      This would lead to the following BUG:
      
      [  362.341807] BUG: unable to handle kernel NULL pointer dereference at           (null)
      [  362.341815] IP: [<ffffffff836258e5>] llcp_sock_getname+0x75/0xc0
      [  362.341818] PGD 31b35067 PUD 30631067 PMD 0
      [  362.341821] Oops: 0000 [#627] PREEMPT SMP DEBUG_PAGEALLOC
      [  362.341826] CPU 3
      [  362.341827] Pid: 7816, comm: trinity-child55 Tainted: G      D W    3.5.0-rc4-next-20120628-sasha-00005-g9f23eb7 #479
      [  362.341831] RIP: 0010:[<ffffffff836258e5>]  [<ffffffff836258e5>] llcp_sock_getname+0x75/0xc0
      [  362.341832] RSP: 0018:ffff8800304fde88  EFLAGS: 00010286
      [  362.341834] RAX: 0000000000000000 RBX: ffff880033cb8000 RCX: 0000000000000001
      [  362.341835] RDX: ffff8800304fdec4 RSI: ffff8800304fdec8 RDI: ffff8800304fdeda
      [  362.341836] RBP: ffff8800304fdea8 R08: 7ebcebcb772b7ffb R09: 5fbfcb9c35bdfd53
      [  362.341838] R10: 4220020c54326244 R11: 0000000000000246 R12: ffff8800304fdec8
      [  362.341839] R13: ffff8800304fdec4 R14: ffff8800304fdec8 R15: 0000000000000044
      [  362.341841] FS:  00007effa376e700(0000) GS:ffff880035a00000(0000) knlGS:0000000000000000
      [  362.341843] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  362.341844] CR2: 0000000000000000 CR3: 0000000030438000 CR4: 00000000000406e0
      [  362.341851] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  362.341856] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [  362.341858] Process trinity-child55 (pid: 7816, threadinfo ffff8800304fc000, task ffff880031270000)
      [  362.341858] Stack:
      [  362.341862]  ffff8800304fdea8 ffff880035156780 0000000000000000 0000000000001000
      [  362.341865]  ffff8800304fdf78 ffffffff83183b40 00000000304fdec8 0000006000000000
      [  362.341868]  ffff8800304f0027 ffffffff83729649 ffff8800304fdee8 ffff8800304fdf48
      [  362.341869] Call Trace:
      [  362.341874]  [<ffffffff83183b40>] sys_getpeername+0xa0/0x110
      [  362.341877]  [<ffffffff83729649>] ? _raw_spin_unlock_irq+0x59/0x80
      [  362.341882]  [<ffffffff810f342b>] ? do_setitimer+0x23b/0x290
      [  362.341886]  [<ffffffff81985ede>] ? trace_hardirqs_on_thunk+0x3a/0x3f
      [  362.341889]  [<ffffffff8372a539>] system_call_fastpath+0x16/0x1b
      [  362.341921] Code: 84 00 00 00 00 00 b8 b3 ff ff ff 48 85 db 74 54 66 41 c7 04 24 27 00 49 8d 7c 24 12 41 c7 45 00 60 00 00 00 48 8b 83 28 05 00 00 <8b> 00 41 89 44 24 04 0f b6 83 41 05 00 00 41 88 44 24 10 0f b6
      [  362.341924] RIP  [<ffffffff836258e5>] llcp_sock_getname+0x75/0xc0
      [  362.341925]  RSP <ffff8800304fde88>
      [  362.341926] CR2: 0000000000000000
      [  362.341928] ---[ end trace 6d450e935ee18bf3 ]---
      Signed-off-by: NSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      147f20e3
    • T
      mac80211: correct size the argument to kzalloc in minstrel_ht · 472dd35c
      Thomas Huehn 提交于
      msp has type struct minstrel_ht_sta_priv not struct minstrel_ht_sta.
      
      (This incorporates the fixup originally posted as "mac80211: fix kzalloc
      memory corruption introduced in minstrel_ht". -- JWL)
      Reported-by: NFengguang Wu <wfg@linux.intel.com>
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NThomas Huehn <thomas@net.t-labs.tu-berlin.de>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      472dd35c
  2. 09 7月, 2012 12 次提交
  3. 04 7月, 2012 12 次提交
    • L
      Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux · 9e85a6f9
      Linus Torvalds 提交于
      Pull fix to common clk framework from Michael Turquette:
       "The previous set of common clk fixes for -rc5 left an uninitialized
        int which could lead to bad array indexing when switching clock
        parents.  The issue is fixed with a trivial change to the code flow in
        __clk_set_parent."
      
      * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux:
        clk: fix parent validation in __clk_set_parent()
      9e85a6f9
    • L
      Merge tag 'md-3.5-fixes' of git://neil.brown.name/md · 6c8addcb
      Linus Torvalds 提交于
      Pull raid10 build failure fix from NeilBrown:
       "I really shouldn't do important things late in the day.  It seems that
        I get careless."
      
      * tag 'md-3.5-fixes' of git://neil.brown.name/md:
        md/raid10: fix careless build error
      6c8addcb
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 56728748
      Linus Torvalds 提交于
      Pull networking update from David Miller:
      
       1) Fix RX sequence number handling in mwifiex, from Stone Piao.
      
       2) Netfilter ipset mis-compares device names, fix from Florian
          Westphal.
      
       3) Fix route leak in ipv6 IPVS, from Eric Dumazet.
      
       4) NFS fixes.  Several buffer overflows in NCI layer from Dan
          Rosenberg, and release sock OOPS'er fix from Eric Dumazet.
      
       5) Fix WEP handling ath9k, we started using a bit the chip provides to
          indicate undecrypted packets but that bit turns out to be unreliable
          in certain configurations.  Fix from Felix Fietkau.
      
       6) Fix Kconfig dependency bug in wlcore, from Randy Dunlap.
      
       7) New USB IDs for rtlwifi driver from Larry Finger.
      
       8) Fix crashes in qmi_wwan usbnet driver when disconnecting, from Bjørn
          Mork.
      
       9) Gianfar driver programs coalescing settings properly in single queue
          mode, but does not do so in multi-queue mode.  Fix from Claudiu
          Manoil.
      
      10) Missing module.h include in davinci_cpdma.c, from Daniel Mack.
      
      11) Need dummy handler for IPSET_CMD_NONE otherwise we crash in ipset if
          we get this via nfnetlink, fix from Tomasz Bursztyka.
      
      12) Missing RCU unlock in nfnetlink error path, also from Tomasz.
      
      13) Fix divide by zero in igbvf when the user tries to set an RX
          coalescing value of 0 usecs, from Mitch A Williams.
      
      14) We can process SCTP sacks for the wrong transport, oops.  Fix from
          Neil Horman.
      
      15) Remove hw IP payload checksumming from e1000e driver.  This has zery
          value in our stack, and turning it on creates a very unintuitive
          restriction for users when using jumbo MTUs.
      
          Specifically, when IP payload checksums are on you cannot use both
          receive hashing offload and jumbo MTU.  Fix from Bruce Allan.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
        e1000e: remove use of IP payload checksum
        sctp: be more restrictive in transport selection on bundled sacks
        igbvf: fix divide by zero
        netfilter: nfnetlink: fix missing rcu_read_unlock in nfnetlink_rcv_msg
        netfilter: ipset: fix crash if IPSET_CMD_NONE command is sent
        davinci_cpdma: include linux/module.h
        gianfar: Fix RXICr/TXICr programming for multi-queue mode
        net: Downgrade CAP_SYS_MODULE deprecated message from error to warning.
        net: qmi_wwan: fix Oops while disconnecting
        mwifiex: fix memory leak associated with IE manamgement
        ath9k: fix panic caused by returning a descriptor we have queued for reuse
        mac80211: correct behaviour on unrecognised action frames
        ath9k: enable serialize_regmode for non-PCIE AR9287
        rtlwifi: rtl8192cu: New USB IDs
        NFC: Return from rawsock_release when sk is NULL
        iwlwifi: fix activating inactive stations
        wlcore: drop INET dependency
        ath9k: fix dynamic WEP related regression
        NFC: Prevent multiple buffer overflows in NCI
        netfilter: update location of my trees
        ...
      56728748
    • N
      md/raid10: fix careless build error · 10684112
      NeilBrown 提交于
      build error introduced by commit b357f04a
      
      That function doesn't get extra args until a later patch.  Bother.
      
      Reported-by: Fengguang Wu <wfg@linux.intel.com> 
      Reported-by: NSimon Kirby <sim@hostway.ca>
      Reported-by: NTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      10684112
    • L
      floppy: cancel any pending fd_timeouts before adding a new one · dab058fd
      Linus Torvalds 提交于
      In commit 070ad7e7 ("floppy: convert to delayed work and
      single-thread wq") the 'fd_timeout' timer was converted to a delayed
      work.  However, the "del_timer(&fd_timeout)" was lost in the process,
      and any previous pending timeouts would stay active when we then
      re-queued the timeout.
      
      This resulted in the floppy probe sequence having a (stale) 20s timeout
      rather than the intended 3s timeout, and thus made booting with the
      floppy driver (but no actual floppy controller) take much longer than it
      should.
      
      Of course, there's little reason for most people to compile the floppy
      driver into the kernel at all, which is why most people never noticed.
      
      Canceling the delayed work where we used to do the del_timer() fixes the
      issue, and makes the floppy probing use the proper new timeout instead.
      The three second timeout is still very wasteful, but better than the 20s
      one.
      Reported-and-tested-by: NAndi Kleen <ak@linux.intel.com>
      Reported-and-tested-by: NCalvin Walton <calvin.walton@kepstin.ca>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dab058fd
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · a3da2c69
      Linus Torvalds 提交于
      Pull block bits from Jens Axboe:
       "As vacation is coming up, thought I'd better get rid of my pending
        changes in my for-linus branch for this iteration.  It contains:
      
         - Two patches for mtip32xx.  Killing a non-compliant sysfs interface
           and moving it to debugfs, where it belongs.
      
         - A few patches from Asias.  Two legit bug fixes, and one killing an
           interface that is no longer in use.
      
         - A patch from Jan, making the annoying partition ioctl warning a bit
           less annoying, by restricting it to !CAP_SYS_RAWIO only.
      
         - Three bug fixes for drbd from Lars Ellenberg.
      
         - A fix for an old regression for umem, it hasn't really worked since
           the plugging scheme was changed in 3.0.
      
         - A few fixes from Tejun.
      
         - A splice fix from Eric Dumazet, fixing an issue with pipe
           resizing."
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        scsi: Silence unnecessary warnings about ioctl to partition
        block: Drop dead function blk_abort_queue()
        block: Mitigate lock unbalance caused by lock switching
        block: Avoid missed wakeup in request waitqueue
        umem: fix up unplugging
        splice: fix racy pipe->buffers uses
        drbd: fix null pointer dereference with on-congestion policy when diskless
        drbd: fix list corruption by failing but already aborted reads
        drbd: fix access of unallocated pages and kernel panic
        xen/blkfront: Add WARN to deal with misbehaving backends.
        blkcg: drop local variable @q from blkg_destroy()
        mtip32xx: Create debugfs entries for troubleshooting
        mtip32xx: Remove 'registers' and 'flags' from sysfs
        blkcg: fix blkg_alloc() failure path
        block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
        block: fix return value on cfq_init() failure
        mtip32xx: Remove version.h header file inclusion
        xen/blkback: Copy id field when doing BLKIF_DISCARD.
      a3da2c69
    • R
      clk: fix parent validation in __clk_set_parent() · 863b1327
      Rajendra Nayak 提交于
      The below commit introduced a bug in __clk_set_parent()
      which could cause it to *skip* the parent validation
      which makes sure the parent passed to the api is a valid
      one.
      
          commit 7975059d
          Author: Rajendra Nayak <rnayak@ti.com>
          Date:   Wed Jun 6 14:41:31 2012 +0530
      
              clk: Allow late cache allocation for clk->parents
      
      This was identified by the following compiler warning..
      
          drivers/clk/clk.c: In function '__clk_set_parent':
          drivers/clk/clk.c:1083:5: warning: 'i' may be used uninitialized in this function [-Wuninitialized]
      
      .. as reported by Marc Kleine-Budde.
      
      There were various options discussed on how to fix this, one
      being initing 'i' to clk->num_parents, but the below approach
      was found to be more appropriate as it also makes the 'parent
      validation' code simpler to read.
      Reported-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      Cc: stable@kernel.org
      863b1327
    • L
      Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · ff826b2b
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "Just a few driver-specific fixes for ASoC and HD-audio."
      
      * tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Fix no sound from ALC662 after Windows reboot
        ASoC: tlv320aic3x: Fix codec pll configure bug
        ASoC: wm2200: Add missing BCLK rate
      ff826b2b
    • L
      Merge tag 'dm-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm · 3492ee72
      Linus Torvalds 提交于
      Pull device-mapper fixes from Alasdair G Kergon:
       "Four minor thin provisioning fixes and correct and update dm-verity
        documentation."
      
      * tag 'dm-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
        dm: verity fix documentation
        dm persistent data: fix allocation failure in space map checker init
        dm persistent data: handle space map checker creation failure
        dm persistent data: fix shadow_info_leak on dm_tm_destroy
        dm thin: commit metadata before creating metadata snapshot
      3492ee72
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 73e60805
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "One regression fix, two radeon fixes (one for an oops), and an i915
        fix to unload framebuffers earlier.
      
        We originally were going to leave the i915 fix until -next, but grub2
        in some situations causes vesafb/efifb to be loaded now, and this
        causes big slowdowns, and I have reports in rawhide I'd like to have
        fixed."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: kick any firmware framebuffers before claiming the gtt
        drm: edid: Don't add inferred modes with higher resolution
        drm/radeon: fix rare segfault
        drm/radeon: fix VM page table setup on SI
      73e60805
    • L
      Merge tag 'md-3.5-fixes' of git://neil.brown.name/md · 2fb748d2
      Linus Torvalds 提交于
      Pull md fixes from NeilBrown:
       "md: collection of bug fixes for 3.5
      
        You go away for 2 weeks vacation and what do you get when you come
        back? Piles of bugs :-)
      
        Some found by inspection, some by testing, some during use in the
        field, and some while developing for the next window..."
      
      * tag 'md-3.5-fixes' of git://neil.brown.name/md:
        md: fix up plugging (again).
        md: support re-add of recovering devices.
        md/raid1: fix bug in read_balance introduced by hot-replace
        raid5: delayed stripe fix
        md/raid456: When read error cannot be recovered, record bad block
        md: make 'name' arg to md_register_thread non-optional.
        md/raid10: fix failure when trying to repair a read error.
        md/raid5: fix refcount problem when blocked_rdev is set.
        md:Add blk_plug in sync_thread.
        md/raid5: In ops_run_io, inc nr_pending before calling md_wait_for_blocked_rdev
        md/raid5: Do not add data_offset before call to is_badblock
        md/raid5: prefer replacing failed devices over want-replacement devices.
        md/raid10: Don't try to recovery unmatched (and unused) chunks.
      2fb748d2
    • L
      Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 3bfd2454
      Linus Torvalds 提交于
      Pull security layer fixes from James Morris.
      
      A documentation update, and a nommu build fix.
      
      * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        security: Fix nommu build.
        security: document no_new_privs
      3bfd2454
  4. 03 7月, 2012 5 次提交
    • M
      dm: verity fix documentation · 18068bdd
      Milan Broz 提交于
      Veritysetup is now part of cryptsetup package.
      Remove on-disk header description (which is not parsed in kernel)
      and point users to cryptsetup where it the format is documented.
      Mention units for block size paramaters.
      Fix target line specification and dmsetup parameters.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      18068bdd
    • M
      dm persistent data: fix allocation failure in space map checker init · b0239faa
      Mike Snitzer 提交于
      If CONFIG_DM_DEBUG_SPACE_MAPS is enabled and memory is fragmented and a
      sufficiently-large metadata device is used in a thin pool then the space
      map checker will fail to allocate the memory it requires.
      
      Switch from kmalloc to vmalloc to allow larger virtually contiguous
      allocations for the space map checker's internal count arrays.
      Reported-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      b0239faa
    • M
      dm persistent data: handle space map checker creation failure · 62662303
      Mike Snitzer 提交于
      If CONFIG_DM_DEBUG_SPACE_MAPS is enabled and dm_sm_checker_create()
      fails, dm_tm_create_internal() would still return success even though it
      cleaned up all resources it was supposed to have created.  This will
      lead to a kernel crash:
      
      general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
      ...
      RIP: 0010:[<ffffffff81593659>]  [<ffffffff81593659>] dm_bufio_get_block_size+0x9/0x20
      Call Trace:
        [<ffffffff81599bae>] dm_bm_block_size+0xe/0x10
        [<ffffffff8159b8b8>] sm_ll_init+0x78/0xd0
        [<ffffffff8159c1a6>] sm_ll_new_disk+0x16/0xa0
        [<ffffffff8159c98e>] dm_sm_disk_create+0xfe/0x160
        [<ffffffff815abf6e>] dm_pool_metadata_open+0x16e/0x6a0
        [<ffffffff815aa010>] pool_ctr+0x3f0/0x900
        [<ffffffff8158d565>] dm_table_add_target+0x195/0x450
        [<ffffffff815904c4>] table_load+0xe4/0x330
        [<ffffffff815917ea>] ctl_ioctl+0x15a/0x2c0
        [<ffffffff81591963>] dm_ctl_ioctl+0x13/0x20
        [<ffffffff8116a4f8>] do_vfs_ioctl+0x98/0x560
        [<ffffffff8116aa51>] sys_ioctl+0x91/0xa0
        [<ffffffff81869f52>] system_call_fastpath+0x16/0x1b
      
      Fix the space map checker code to return an appropriate ERR_PTR and have
      dm_sm_disk_create() and dm_tm_create_internal() check for it with
      IS_ERR.
      Reported-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      62662303
    • M
      dm persistent data: fix shadow_info_leak on dm_tm_destroy · 25d7cd6f
      Mike Snitzer 提交于
      Cleanup the shadow table before destroying the transaction manager.
      
      Reference: leak was identified with kmemleak when running
      test_discard_random_sectors in the thinp-test-suite.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      25d7cd6f
    • J
      dm thin: commit metadata before creating metadata snapshot · 0d200aef
      Joe Thornber 提交于
      Userland sometimes sees a corrupt metadata block if metadata is changing
      rapidly when a metadata snapshot is reserved for userland,  To make the
      problem go away, commit before we take the metadata snapshot (which is a
      sensible thing to do anyway).
      
      The checksums mean userland spots this corruption immediately so there's
      no risk of acting on incorrect data.  No corruption exists from the
      kernel's point of view, and thin_check passes after pool shutdown.
      
      I believe this is to do with shared blocks at the first level of the
      {device, mapping} btree.  Prior to the metadata-snap support no sharing
      at this level was possible, so this patch is only required after commit
      cc8394d8 ("dm thin: provide userspace
      access to pool metadata").
      Signed-off-by: NJoe Thornber <ejt@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      0d200aef