Skip to content
  1. Mar 10, 2016
    • Hugh Dickins's avatar
      mm: __delete_from_page_cache show Bad page if mapped · 06b241f3
      Hugh Dickins authored
      Commit e1534ae9
      
       ("mm: differentiate page_mapped() from
      page_mapcount() for compound pages") changed the famous
      BUG_ON(page_mapped(page)) in __delete_from_page_cache() to
      VM_BUG_ON_PAGE(page_mapped(page)): which gives us more info when
      CONFIG_DEBUG_VM=y, but nothing at all when not.
      
      Although it has not usually been very helpul, being hit long after the
      error in question, we do need to know if it actually happens on users'
      systems; but reinstating a crash there is likely to be opposed :)
      
      In the non-debug case, pr_alert("BUG: Bad page cache") plus dump_page(),
      dump_stack(), add_taint() - I don't really believe LOCKDEP_NOW_UNRELIABLE,
      but that seems to be the standard procedure now.  Move that, or the
      VM_BUG_ON_PAGE(), up before the deletion from tree: so that the
      unNULLified page->mapping gives a little more information.
      
      If the inode is being evicted (rather than truncated), it won't have any
      vmas left, so it's safe(ish) to assume that the raised mapcount is
      erroneous, and we can discount it from page_count to avoid leaking the
      page (I'm less worried by leaking the occasional 4kB, than losing a
      potential 2MB page with each 4kB page leaked).
      
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Sasha Levin <sasha.levin@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      06b241f3
    • Geoffrey Thomas's avatar
      mm/hugetlb: hugetlb_no_page: rate-limit warning message · 910154d5
      Geoffrey Thomas authored
      
      
      The warning message "killed due to inadequate hugepage pool" simply
      indicates that SIGBUS was sent, not that the process was forcibly killed.
      If the process has a signal handler installed does not fix the problem,
      this message can rapidly spam the kernel log.
      
      On my amd64 dev machine that does not have hugepages configured, I can
      reproduce the repeated warnings easily by setting vm.nr_hugepages=2 (i.e.,
      4 megabytes of huge pages) and running something that sets a signal
      handler and forks, like
      
        #include <sys/mman.h>
        #include <signal.h>
        #include <stdlib.h>
        #include <unistd.h>
      
        sig_atomic_t counter = 10;
        void handler(int signal)
        {
            if (counter-- == 0)
               exit(0);
        }
      
        int main(void)
        {
            int status;
            char *addr = mmap(NULL, 4 * 1048576, PROT_READ | PROT_WRITE,
                    MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
            if (addr == MAP_FAILED) {perror("mmap"); return 1;}
            *addr = 'x';
            switch (fork()) {
               case -1:
                  perror("fork"); return 1;
               case 0:
                  signal(SIGBUS, handler);
                  *addr = 'x';
                  break;
               default:
                  *addr = 'x';
                  wait(&status);
                  if (WIFSIGNALED(status)) {
                     psignal(WTERMSIG(status), "child");
                  }
                  break;
            }
        }
      
      Signed-off-by: default avatarGeoffrey Thomas <geofft@ldpreload.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      910154d5
  2. Mar 09, 2016
    • Linus Torvalds's avatar
      Merge tag 'sound-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 7f02bf6b
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "It's always an ambivalent feeling to send a large pull request at the
        late stage like this, especially when most of patches came from me.
        Anyway, this is a collection of lots of small fixes that slipped from
        the previous pull request.
      
        All fixes are about ASoC, and the majority of changes are corrections
        of the wrong access types in ALSA ctl enum items.  They are mostly
        harmless on 32bit architectures, but actually buggy on 64bit.  So we
        addressed all these now in a shot.  The rest are various small ASoC
        driver fixes.
      
        Among them, only two changes have been done to ASoC core, and both of
        them are trivial.  The rest are all device-specific.  So overall, they
        should be safe to apply"
      
      * tag 'sound-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (33 commits)
        ASoC: wm_adsp: Fix enum ctl accesses in a wrong type
        ASoC: wm9081: Fix enum ctl accesses in a wrong type
        ASoC: wm8996: Fix enum ctl accesses in a wrong type
        ASoC: wm8994: Fix enum ctl accesses in a wrong type
        ASoC: wm8985: Fix enum ctl accesses in a wrong type
        ASoC: wm8983: Fix enum ctl accesses in a wrong type
        ASoC: wm8958: Fix enum ctl accesses in a wrong type
        ASoC: wm8904: Fix enum ctl accesses in a wrong type
        ASoC: wm8753: Fix enum ctl accesses in a wrong type
        ASoC: wl1273: Fix enum ctl accesses in a wrong type
        ASoC: tlv320dac33: Fix enum ctl accesses in a wrong type
        ASoC: max98095: Fix enum ctl accesses in a wrong type
        ASoC: max98088: Fix enum ctl accesses in a wrong type
        ASoC: ab8500: Fix enum ctl accesses in a wrong type
        ASoC: da732x: Fix enum ctl accesses in a wrong type
        ASoC: cs42l51: Fix enum ctl accesses in a wrong type
        ASoC: intel: mfld: Fix enum ctl accesses in a wrong type
        ASoC: omap: rx51: Fix enum ctl accesses in a wrong type
        ASoC: omap: n810: Fix enum ctl accesses in a wrong type
        ASoC: pxa: tosa: Fix enum ctl accesses in a wrong type
        ...
      7f02bf6b
    • Linus Torvalds's avatar
      Merge tag 'edac_fix_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · 1e2a4c7a
      Linus Torvalds authored
      Pull EDAC fix from Borislav Petkov:
       "Last minute fix for sb_edac which fixes DIMM detection on certain Xeon
        Phi configurations:
      
        A single fix to the Xeon Phi section of sb_edac.  The issue was
        introduced during this merge window"
      
      * tag 'edac_fix_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
        EDAC, sb_edac: Fix logic when computing DIMM sizes on Xeon Phi
      1e2a4c7a
  3. Mar 08, 2016
  4. Mar 07, 2016