12 Aug, 2011

1 commit


11 Aug, 2011

6 commits

  • This reverts commit af9d220bac41dc3201893e1601cc7c44f7da4498.

    It turns out that one was meant to be applied on top of the edac.git
    tree in -next that has more i7core_edac changes, but that wasn't clear
    in the original email.

    Reported-by: Stephen Rothwell
    Acked-by: Borislav Petkov
    Cc: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • PNFS_BLOCK needs BLK_DEV_DM/MD, which is not a dependency for other
    pnfs layout drivers. Seperate it out so others can still build when
    BLK_DEV_DM/MD is not enabled.

    Also change select to depends on to avoid build failures.

    Reported-and-tested-by: Randy Dunlap
    Signed-off-by: Peng Tao
    Acked-by: Benny Halevy
    Signed-off-by: Linus Torvalds

    Peng Tao
     
  • * 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: drop experimental status for ARM_PATCH_PHYS_VIRT
    ARM: 7008/1: alignment: Make SIGBUS sent to userspace POSIXly correct
    ARM: 7007/1: alignment: Prevent ignoring of faults with ARMv6 unaligned access model
    ARM: 7010/1: mm: fix invalid loop for poison_init_mem
    ARM: 7005/1: freshen up mm/proc-arm946.S
    dmaengine: PL08x: Fix trivial build error
    ARM: Fix build error for SMP=n builds

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc: Really fix build without CONFIG_PCI
    powerpc: Fix build without CONFIG_PCI
    powerpc/4xx: Fix build of PCI code on 405
    powerpc/pseries: Simplify vpa deregistration functions
    powerpc/pseries: Cleanup VPA registration and deregistration errors
    powerpc/pseries: Fix kexec on recent firmware versions
    MAINTAINERS: change maintainership of mpc5xxx
    powerpc: Make KVM_GUEST default to n
    powerpc/kvm: Fix build errors with older toolchains
    powerpc: Lack of ibm,io-events not that important!
    powerpc: Move kdump default base address to half RMO size on 64bit
    powerpc/perf: Disable pagefaults during callchain stack read
    ppc: Remove duplicate definition of PV_POWER7
    powerpc: pseries: Fix kexec on machines with more than 4TB of RAM
    powerpc: Jump label misalignment causes oops at boot
    powerpc: Clean up some panic messages in prom_init
    powerpc: Fix device tree claim code
    powerpc: Return the_cpu_ spec from identify_cpu
    powerpc: mtspr/mtmsr should take an unsigned long

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
    Ecryptfs: Add mount option to check uid of device being mounted = expect uid
    eCryptfs: Fix payload_len unitialized variable warning
    eCryptfs: fix compile error
    eCryptfs: Return error when lower file pointer is NULL

    Linus Torvalds
     
  • Both AMD and Intel i7 EDAC drivers use MCE features and are thus
    dependent of this functionality present in the kernel. Express this in
    Kconfig so that randconfig builds don't break.

    Reported-by: Randy Dunlap
    Signed-off-by: Borislav Petkov
    Acked-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Borislav Petkov
     

10 Aug, 2011

10 commits

  • Brown paper bag day, previous commit wouldn't work very well with modules
    enabled. Move the exports into the ifdef.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • This has now been well tested, and several platforms are now selecting
    this directly. It's time to drop its experimental status.

    Signed-off-by: Russell King

    Russell King
     
  • Close a TOCTOU race for mounts done via ecryptfs-mount-private. The mount
    source (device) can be raced when the ownership test is done in userspace.
    Provide Ecryptfs a means to force the uid check at mount time.

    Signed-off-by: John Johansen
    Cc:
    Signed-off-by: Tyler Hicks

    John Johansen
     
  • syslog-ng versions before 3.3.0beta1 (2011-05-12) assume that
    CAP_SYS_ADMIN is sufficient to access syslog, so ever since CAP_SYSLOG
    was introduced (2010-11-25) they have triggered a warning.

    Commit ee24aebffb75 ("cap_syslog: accept CAP_SYS_ADMIN for now")
    improved matters a little by making syslog-ng work again, just keeping
    the WARN_ONCE(). But still, this is a warning that writes a stack trace
    we don't care about to syslog, sets a taint flag, and alarms sysadmins
    when nothing worse has happened than use of an old userspace with a
    recent kernel.

    Convert the WARN_ONCE to a printk_once to avoid that while continuing to
    give userspace developers a hint that this is an unwanted
    backward-compatibility feature and won't be around forever.

    Reported-by: Ralf Hildebrandt
    Reported-by: Niels
    Reported-by: Paweł Sikora
    Signed-off-by: Jonathan Nieder
    Liked-by: Gergely Nagy
    Acked-by: Serge Hallyn
    Acked-by: James Morris
    Signed-off-by: Linus Torvalds

    Jonathan Nieder
     
  • This reverts commit 8521fc50d433507a7cdc96bec280f9e5888a54cc.

    The patch incorrectly assumes that using atomic FLUSHING_CACHED_CHARGE
    bit operations is sufficient but that is not true. Johannes Weiner has
    reported a crash during parallel memory cgroup removal:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
    IP: [] css_is_ancestor+0x20/0x70
    Oops: 0000 [#1] PREEMPT SMP
    Pid: 19677, comm: rmdir Tainted: G W 3.0.0-mm1-00188-gf38d32b #35 ECS MCP61M-M3/MCP61M-M3
    RIP: 0010:[] css_is_ancestor+0x20/0x70
    RSP: 0018:ffff880077b09c88 EFLAGS: 00010202
    Process rmdir (pid: 19677, threadinfo ffff880077b08000, task ffff8800781bb310)
    Call Trace:
    [] mem_cgroup_same_or_subtree+0x33/0x40
    [] drain_all_stock+0x11f/0x170
    [] mem_cgroup_force_empty+0x231/0x6d0
    [] mem_cgroup_pre_destroy+0x14/0x20
    [] cgroup_rmdir+0xb9/0x500
    [] vfs_rmdir+0x86/0xe0
    [] do_rmdir+0xfb/0x110
    [] sys_rmdir+0x16/0x20
    [] system_call_fastpath+0x16/0x1b

    We are crashing because we try to dereference cached memcg when we are
    checking whether we should wait for draining on the cache. The cache is
    already cleaned up, though.

    There is also a theoretical chance that the cached memcg gets freed
    between we test for the FLUSHING_CACHED_CHARGE and dereference it in
    mem_cgroup_same_or_subtree:

    CPU0 CPU1 CPU2
    mem=stock->cached
    stock->cached=NULL
    clear_bit
    test_and_set_bit
    test_bit() ...
    mem_cgroup_destroy
    use after free

    The percpu_charge_mutex protected from this race because sync draining
    is exclusive.

    It is safer to revert now and come up with a more parallel
    implementation later.

    Signed-off-by: Michal Hocko
    Reported-by: Johannes Weiner
    Acked-by: Johannes Weiner
    Acked-by: KAMEZAWA Hiroyuki
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Michal Hocko
     
  • * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
    slub: Fix partial count comparison confusion

    Linus Torvalds
     
  • fs/ecryptfs/keystore.c: In function ‘ecryptfs_generate_key_packet_set’:
    fs/ecryptfs/keystore.c:1991:28: warning: ‘payload_len’ may be used uninitialized in this function [-Wuninitialized]
    fs/ecryptfs/keystore.c:1976:9: note: ‘payload_len’ was declared here

    Signed-off-by: Tyler Hicks

    Tyler Hicks
     
  • This patch fixes the compile error reported at the address:

    https://bugzilla.kernel.org/show_bug.cgi?id=40292

    The problem arises when compiling eCryptfs as built-in and the 'encrypted'
    key type as a module. The patch prevents this combination from being set in
    the kernel configuration, by fixing the eCryptfs dependencies.

    Signed-off-by: Roberto Sassu
    Reported-by: David Hill
    Signed-off-by: Tyler Hicks

    Roberto Sassu
     
  • When an eCryptfs inode's lower file has been closed, and the pointer has
    been set to NULL, return an error when trying to do a lower read or
    write rather than calling BUG().

    https://bugzilla.kernel.org/show_bug.cgi?id=37292

    Signed-off-by: Tyler Hicks
    Cc:

    Tyler Hicks
     
  • deactivate_slab() has the comparison if more than the minimum number of
    partial pages are in the partial list wrong. An effect of this may be that
    empty pages are not freed from deactivate_slab(). The result could be an
    OOM due to growth of the partial slabs per node. Frees mostly occur from
    __slab_free which is okay so this would only affect use cases where a lot
    of switching around of per cpu slabs occur.

    Switching per cpu slabs occurs with high frequency if debugging options are
    enabled.

    Reported-and-tested-by: Xiaotian Feng
    Signed-off-by: Christoph Lameter
    Signed-off-by: Pekka Enberg

    Christoph Lameter
     

09 Aug, 2011

16 commits

  • * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
    slub: fix check_bytes() for slub debugging
    slub: Fix full list corruption if debugging is on

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    sound: pss - don't use the deprecated function check_region
    ALSA: timer - Add NULL-check for invalid slave timer
    ALSA: timer - Fix Oops at closing slave timer
    ASoC: Acknowledge WM8996 interrupts before acting on them
    ASoC: Rename WM8915 to WM8996
    ALSA: Fix dependency of CONFIG_SND_TEA575X
    ALSA: asihpi - use kzalloc()
    ALSA: snd-usb-caiaq: Fix keymap for RigKontrol3
    ALSA: snd-usb: Fix uninitialized variable usage
    ALSA: hda - Fix a complile warning in patch_via.c
    ALSA: hdspm - Fix uninitialized compile warnings
    ALSA: usb-audio - add quirk for Keith McMillen StringPort
    ALSA: snd-usb: operate on given mixer interface only
    ALSA: snd-usb: avoid dividing by zero on invalid input
    ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6
    sound: oss/pas2: Remove CLOCK_TICK_RATE dependency from PAS16 driver
    ALSA: hda - Use auto-parser for ASUS UX50, Eee PC P901, S101 and P1005
    ALSA: hda - Fix digital-mic mono recording on ASUS Eee PC
    ASoC: sgtl5000: fix cache handling
    ASoC: Disable wm_hubs periodic DC servo update

    Linus Torvalds
     
  • The private object support has migrated from gma500 into the DRM core,
    remove our now clashing copy.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • The check_bytes() function is used by slub debugging. It returns a pointer
    to the first unmatching byte for a character in the given memory area.

    If the character for matching byte is greater than 0x80, check_bytes()
    doesn't work. Becuase 64-bit pattern is generated as below.

    value64 = value | value << 8 | value << 16 | value << 24;
    value64 = value64 | value64 << 32;

    The integer promotions are performed and sign-extended as the type of value
    is u8. The upper 32 bits of value64 is 0xffffffff in the first line, and
    the second line has no effect.

    This fixes the 64-bit pattern generation.

    Signed-off-by: Akinobu Mita
    Cc: Christoph Lameter
    Cc: Matt Mackall
    Reviewed-by: Marcin Slusarz
    Acked-by: Eric Dumazet
    Signed-off-by: Pekka Enberg

    Akinobu Mita
     
  • When a slab is freed by __slab_free() and the slab can only contain a
    single object ever then it was full (and therefore not on the partial
    lists but on the full list in the debug case) before we reached
    slab_empty.

    This caused the following full list corruption when SLUB debugging was enabled:

    [ 5913.233035] ------------[ cut here ]------------
    [ 5913.233097] WARNING: at lib/list_debug.c:53 __list_del_entry+0x8d/0x98()
    [ 5913.233101] Hardware name: Adamo 13
    [ 5913.233105] list_del corruption. prev->next should be ffffea000434fd20, but was ffffea0004199520
    [ 5913.233108] Modules linked in: nfs fscache fuse ebtable_nat ebtables ppdev parport_pc lp parport ipt_MASQUERADE iptable_nat nf_nat nfsd lockd nfs_acl auth_rpcgss xt_CHECKSUM sunrpc iptable_mangle bridge stp llc cpufreq_ondemand acpi_cpufreq freq_table mperf ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables rfcomm bnep arc4 iwlagn snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel btusb mac80211 snd_hda_codec bluetooth snd_hwdep snd_seq snd_seq_device snd_pcm usb_debug dell_wmi sparse_keymap cdc_ether usbnet cdc_acm uvcvideo cdc_wdm mii cfg80211 snd_timer dell_laptop videodev dcdbas snd microcode v4l2_compat_ioctl32 soundcore joydev tg3 pcspkr snd_page_alloc iTCO_wdt i2c_i801 rfkill iTCO_vendor_support wmi virtio_net kvm_intel kvm ipv6 xts gf128mul dm_crypt i915 drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: scsi_wait_scan]
    [ 5913.233213] Pid: 0, comm: swapper Not tainted 3.0.0+ #127
    [ 5913.233213] Call Trace:
    [ 5913.233213] [] warn_slowpath_common+0x83/0x9b
    [ 5913.233213] [] warn_slowpath_fmt+0x46/0x48
    [ 5913.233213] [] __list_del_entry+0x8d/0x98
    [ 5913.233213] [] list_del+0xe/0x2d
    [ 5913.233213] [] __slab_free+0x1db/0x235
    [ 5913.233213] [] ? bvec_free_bs+0x35/0x37
    [ 5913.233213] [] ? bvec_free_bs+0x35/0x37
    [ 5913.233213] [] ? bvec_free_bs+0x35/0x37
    [ 5913.233213] [] kmem_cache_free+0x88/0x102
    [ 5913.233213] [] bvec_free_bs+0x35/0x37
    [ 5913.233213] [] bio_free+0x34/0x64
    [ 5913.233213] [] dm_bio_destructor+0x12/0x14
    [ 5913.233213] [] bio_put+0x2b/0x2d
    [ 5913.233213] [] clone_endio+0x9e/0xb4
    [ 5913.233213] [] bio_endio+0x2d/0x2f
    [ 5913.233213] [] crypt_dec_pending+0x5c/0x8b [dm_crypt]
    [ 5913.233213] [] crypt_endio+0x78/0x81 [dm_crypt]

    [ Full discussion here: https://lkml.org/lkml/2011/8/4/375 ]

    Make sure that we remove such a slab also from the full lists.

    Reported-and-tested-by: Dave Jones
    Reported-and-tested-by: Xiaotian Feng
    Signed-off-by: Christoph Lameter
    Signed-off-by: Pekka Enberg

    Christoph Lameter
     
  • With the UM_SIGNAL alignment fault mode, no siginfo structure is
    passed to userspace.

    POSIX specifies how siginfo_t should be populated for alignment
    faults, so this patch does just that:

    * si_signo = SIGBUS
    * si_code = BUS_ADRALN
    * si_addr = misaligned data address at which access was attempted

    Signed-off-by: Dave Martin
    Acked-by: Nicolas Pitre
    Acked-by: Kirill A. Shutemov
    Reviewed-by: Will Deacon
    Signed-off-by: Russell King

    Dave Martin
     
  • Currently, it's possible to set the kernel to ignore alignment
    faults when changing the alignment fault handling mode at runtime
    via /proc/sys/alignment, even though this is undesirable on ARMv6
    and above, where it can result in infinite spins where an un-fixed-
    up instruction repeatedly faults.

    In addition, the kernel clobbers any alignment mode specified on
    the command-line if running on ARMv6 or above.

    This patch factors out the necessary safety check into a couple of
    new helper functions, and checks and modifies the fault handling
    mode as appropriate on boot and on writes to /proc/cpu/alignment.

    Prior to ARMv6, the behaviour is unchanged.

    For ARMv6 and above, the behaviour changes as follows:

    * Attempting to ignore faults on ARMv6 results in the mode being
    forced to UM_FIXUP instead. A warning is printed if this
    happened as a result of a write to /proc/cpu/alignment. The
    user's UM_WARN bit (if present) is still honoured.

    * An alignment= argument from the kernel command-line is now
    honoured, except that the kernel will modify the specified mode
    as described above. This is allows modes such as UM_SIGNAL and
    UM_WARN to be active immediately from boot, which is useful for
    debugging purposes.

    Signed-off-by: Dave Martin
    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King

    Dave Martin
     
  • poison_init_mem() used a loop of:

    while ((count = count - 4))

    which has 2 problems - an off by one error so that we do one less word
    than we should, and the other is that if count == 0 then we loop forever
    and poison too much. On a platform with HAVE_TCM=y but nothing in the
    TCM's, this caused corruption and the platform failed to boot.

    Acked-by: Stephen Boyd
    Acked-by: Nicolas Pitre
    Signed-off-by: Jamie Iles
    Signed-off-by: Russell King

    Jamie Iles
     
  • The file mm/proc-arm946.S contains a typo and is missing a structure
    member in __arm946_proc_info. The former prevents compilation
    and the latter causes problems during boot. It is likely this
    file was manually copied from a similar file and not tested, then
    later updates to the *_proc_info structures missed this file.

    This patch will apply (with offset) with or without the
    recent macro unification work that has been done in this directory.
    This was verified against linux-next/stable last week.

    See arm-linux-kernel thread:
    http://lists.arm.linux.org.uk/lurker/message/20110718.103237.0106d468.en.html

    Signed-off-by: Brian S. Julin
    Signed-off-by: Russell King

    Brian S. Julin
     
  • Something changed during the 3.1 merge window in the include files
    which now causes the pl08x DMA engine driver to fail to build. Fix
    this by adding the now necessary dma-mapping.h include:

    drivers/dma/amba-pl08x.c: In function ■pl08x_unmap_buffers■:
    drivers/dma/amba-pl08x.c:1524: error: implicit declaration of function ■dma_unmap_single■
    drivers/dma/amba-pl08x.c:1527: error: implicit declaration of function ■dma_unmap_page■

    Acked-by: Vinod Koul
    Acked-by: Linus Walleij
    Signed-off-by: Russell King

    Russell King
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
    TOMOYO: Fix incomplete read of /sys/kernel/security/tomoyo/profile

    Linus Torvalds
     
  • In commit 2efaca927f5c ("mm/futex: fix futex writes on archs with SW
    tracking of dirty & young") we forgot about MMU=n. This patch fixes
    that.

    Signed-off-by: Peter Zijlstra
    Acked-by: Benjamin Herrenschmidt
    Acked-by: David Howells
    Link: http://lkml.kernel.org/r/1311761831.24752.413.camel@twins
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • The previous comit made the autofs4 debug printouts check types against
    the printout format, and uncovered this bug:

    fs/autofs4/waitq.c:106:2: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 4 has type ‘autofs_wqt_t’

    which is due to the insane type for wait_queue_token. That thing should
    be some fixed well-defined size (preferably just 'unsigned int' or
    'u32') but for unexplained reasons it is randomly either 'unsigned long'
    or 'unsigned int' depending on the architecture.

    For now, cast it to 'unsigned long' for printing, the way we do
    elsewhere. Somebody else can try to explain the typedef mess.

    (There's a reason we don't support excessive use of typedefs in the
    kernel: it's usually just a good way of confusing yourself).

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Use 'pr_debug()' for DPRINTK, which will do the proper type checking on
    the arguments (without generating code) even when DEBUG isn't #defined.

    Also, use the standard __VA_ARGS__ for the macros, and stop the
    pointless abuse of 'do { xyz } while (0)' when the macro is already a
    perfectly well-formed single statement.

    Reported-by: David Howells
    Suggested-by: Joe Perches
    Cc: Ian Kent
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Avoid annoying warnings from these functions ("discards qualifiers")
    because they assign 'current_cred()' to a non-const pointer.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Commit 3295514841c2 ("fix rcu annotations noise in cred.h") accidentally
    dropped the const of current->cred inside current_cred() by the
    insertion of a cast to deal with an RCU annotation loss warning from
    sparce.

    Use an appropriate RCU wrapper instead so as not to lose the const.

    Signed-off-by: David Howells
    Reviewed-by: Paul E. McKenney
    cc: Al Viro
    Signed-off-by: Linus Torvalds

    David Howells
     

08 Aug, 2011

7 commits