LLVM/llvm 337649libcxx/trunk/include fstream, libcxx/trunk/src/experimental/filesystem operations.cpp

Implement a better copy_file.

This patch improves both the performance, and the safety of the
copy_file implementation.

The performance improvements are achieved by using sendfile on
Linux and copyfile on OS X when available.

The TOCTOU hardening is achieved by opening the source and
destination files and then using fstat to check their attributes to
see if we can copy them.

Unfortunately for the destination file, there is no way to open
it without accidentally creating it, so we first have to use
stat to determine if it exists, and if we should copy to it.
Then, once we're sure we should try to copy, we open the dest
file and ensure it names the same entity we previously stat'ed.

FreeBSD/ports 475079head/science/mpqc/files patch-src_lib_util_keyval_ipv2__scan.cc patch-src_lib_util_keyval_ipv2__scan.ll

science/mpqc: Unbreak on CURRENT

For some reason, STL's endl fail and need to be std::endl only on CURRENT.

Linux/linux 45ae4dfarch/arm/boot/dts omap4-droid4-xt894.dts imx6qdl-zii-rdu2.dtsi, drivers/soc/imx gpc.c

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:

 - Fix interrupt type on ethernet switch for i.MX-based RDU2

 - GPC on i.MX exposed too large a register window which resulted in
   userspace being able to crash the machine.

 - Fixup of bad merge resolution moving GPIO DT nodes under pinctrl on
   droid4.

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: dts: imx6: RDU2: fix irq type for mv88e6xxx switch
  soc: imx: gpc: restrict register range for regmap access
  ARM: dts: omap4-droid4: fix dts w.r.t. pwm

Linux/linux ef81e63arch/x86/kernel/cpu/mcheck mce.c

Merge branch 'x86-urgent-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Ingo Molnar:
 "A single fix for a MCE-polling regression, which prevented the
  disabling of polling"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/MCE: Remove min interval polling limitation

Linux/linux 43227e0arch/x86/events/intel ds.c, arch/x86/include/asm apm.h

Merge branch 'x86-pti-urgent-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 pti fixes from Ingo Molnar:
 "An APM fix, and a BTS hardware-tracing fix related to PTI changes"

* 'x86-pti-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/apm: Don't access __preempt_count with zeroed fs
  x86/events/intel/ds: Fix bts_interrupt_threshold alignment

Linux/linux 48b1db7kernel stop_machine.c, kernel/sched deadline.c

Merge branch 'sched-urgent-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Two fixes: a stop-machine preemption fix and a SCHED_DEADLINE fix"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/deadline: Fix switched_from_dl() warning
  stop_machine: Disable preemption when waking two stopper threads

FreeBSD/src 336594head/contrib/netbsd-tests/fs h_funcs.subr

Fix tmpfs detection in the sys/fs/tmpfs tests

This code was originally written for NetBSD.  r306031 tried to adapt it to
FreeBSD, but didn't correctly handle the case that tmpfs was available, but
not already loaded.  Fix the logic to load the module if necessary.  The
tmpfs tests shouldn't be skipped anymore.

Also, fix a comment that was dislocated by r306031.

Reported by:    Jenkins
MFC after:      2 weeks

Linux/linux ea75a2carch/x86 Kconfig, arch/x86/include/asm uaccess_64.h

Merge branch 'core-urgent-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core kernel fixes from Ingo Molnar:
 "This is mostly the copy_to_user_mcsafe() related fixes from Dan
  Williams, and an ORC fix for Clang"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/asm/memcpy_mcsafe: Fix copy_to_user_mcsafe() exception handling
  lib/iov_iter: Fix pipe handling in _copy_to_iter_mcsafe()
  lib/iov_iter: Document _copy_to_iter_flushcache()
  lib/iov_iter: Document _copy_to_iter_mcsafe()
  objtool: Use '.strtab' if '.shstrtab' doesn't exist, to support ORC tables on Clang

Linux/linux ffb48e7arch/powerpc/include/asm mmu_context.h, arch/powerpc/kernel idle_book3s.S

Merge tag 'powerpc-4.18-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 "Two regression fixes, one for xmon disassembly formatting and the
  other to fix the E500 build.

  Two commits to fix a potential security issue in the VFIO code under
  obscure circumstances.

  And finally a fix to the Power9 idle code to restore SPRG3, which is
  user visible and used for sched_getcpu().

  Thanks to: Alexey Kardashevskiy, David Gibson. Gautham R. Shenoy,
  James Clarke"

* tag 'powerpc-4.18-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/powernv: Fix save/restore of SPRG3 on entry/exit from stop (idle)
  powerpc/Makefile: Assemble with -me500 when building for E500
  KVM: PPC: Check if IOMMU page is contained in the pinned physical page
  vfio/spapr: Use IOMMU pageshift rather than pagesize
  powerpc/xmon: Fix disassembly since printf changes

Linux/linux 55b636bfs/btrfs extent_io.c

Merge tag 'for-4.18-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fix from David Sterba:
 "A fix of a corruption regarding fsync and clone, under some very
  specific conditions explained in the patch.

  The fix is marked for stable 3.16+ so I'd like to get it merged now
  given the impact"

* tag 'for-4.18-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  Btrfs: fix file data corruption after cloning a range and fsync

NetBSD/pkgsrc 0n4ZDJmham/predict Makefile

   ham/predict: fix MASTER_SITES
VersionDeltaFile
1.2+2-3ham/predict/Makefile
+2-31 files

FreeBSD/src 336593head/release Makefile.ec2

Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch
and revision number announced in SNS notifications about new EC2 AMIs.

While I'm here, incorporate that information into the AMI "description"
fields, since it's more useful than simply echoing the information
already provided via the AMI "name".

Approved by:    gjb

NetBSD/pkgsrc yTGxi5gdoc CHANGES-2018

   doc: Updated devel/go-pflag to 1.0.1
VersionDeltaFile
1.3295+2-1doc/CHANGES-2018
+2-11 files

Linux/linux 490fc05arch/ia64/kernel perfmon.c, arch/ia64/mm init.c

mm: make vm_area_alloc() initialize core fields

Like vm_area_dup(), it initializes the anon_vma_chain head, and the
basic mm pointer.

The rest of the fields end up being different for different users,
although the plan is to also initialize the 'vm_ops' field to a dummy
entry.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>

HardenedBSD/hardenedbsd 93670c2sys/cam cam_periph.c, tests/sys/audit administrative.c network.c

Merge remote-tracking branch 'origin/hardened/current/master' into 
hardened/current/unstable

* origin/hardened/current/master:
  Stop further SCSI recovery attempts after one has failed.
  Eliminate a comment that doesn't apply to this pmap implementation.
  Fix sys.fs.tmpfs.mknod_test.{char, block} by reverting r321967
  tftpd(8): when completing an WRQ, flush the file before acknowleding receipt
  Clear expected failures for aesni_aes_gcm tests
  Use the correct DOT language syntax for an ID with a leading digit (0mp).
  Mention the Linux compatibility layer instead of the Linux emulator in the BUGS section.
  Add option MAC to armv6 and armv7 kernels by default, it needs to be compiled-in to 
allow loading policy modules at runtime.
  makefs(8): add test case for PR 229929
  Revert r336572 and wrap them in machine checks so they are only installed on i386.
  audit(4): add test cases for chflagsat(2), lgetfh(2), setfib(2)
  audit(4): add more test cases for auditon(2)
  run(4): Support the D-Link DWA-125 rev A3
  Raise "Report Count" value limit in HID descriptor parser.

FreeBSD/src 336592head/lib/libproc proc_sym.c

Take the mapping's segment offset into account when resolving symbols.

Reported by:    Jenkins, via asomers
MFC after:      2 weeks

HardenedBSD/hardenedbsd 4740c9dsys/cam cam_periph.c, tests/sys/audit administrative.c network.c

Merge branch 'freebsd/current/master' into hardened/current/master

* freebsd/current/master:
  Stop further SCSI recovery attempts after one has failed.
  Eliminate a comment that doesn't apply to this pmap implementation.
  Fix sys.fs.tmpfs.mknod_test.{char, block} by reverting r321967
  tftpd(8): when completing an WRQ, flush the file before acknowleding receipt
  Clear expected failures for aesni_aes_gcm tests
  Use the correct DOT language syntax for an ID with a leading digit (0mp).
  Mention the Linux compatibility layer instead of the Linux emulator in the BUGS section.
  Add option MAC to armv6 and armv7 kernels by default, it needs to be compiled-in to 
allow loading policy modules at runtime.
  makefs(8): add test case for PR 229929
  Revert r336572 and wrap them in machine checks so they are only installed on i386.
  audit(4): add test cases for chflagsat(2), lgetfh(2), setfib(2)
  audit(4): add more test cases for auditon(2)

FreeBSD/src 336591head/lib/libproc/tests Makefile

Disable optimization of the libproc test program.

Dead code elimination may remove symbols that are required by the tests.

Reported by:    Jenkins, via asomers
MFC after:      1 week

NetBSD/pkgsrc lFivOmddoc CHANGES-2018

   doc: Added devel/go-goreturns version 0.0.20180301
VersionDeltaFile
1.3294+2-1doc/CHANGES-2018
+2-11 files

NetBSD/pkgsrc iEF3Kzgdevel Makefile

   devel/Makefile: Add go-goreturns
VersionDeltaFile
1.2704+2-1devel/Makefile
+2-11 files

NetBSD/pkgsrc JddLdEjdevel/go-goreturns Makefile PLIST

   devel/go-goreturns: Import version 0.0.20180301

   A gofmt/goimports-like tool for Go programmers that fills in Go return
   statements with zero values to match the func return types. This tool
   adds zero-value return values to incomplete Go return statements, to
   save you time when writing Go. It is inspired by and based on
   goimports.

NetBSD/pkgsrc O52RfMWdevel/go-pflag distinfo PLIST

   devel/go-pflag: Update to 1.0.1

   Changes:
   - Includes new ParseErrorsWhitelist API definition

Linux/linux 95faf69kernel fork.c, mm mmap.c nommu.c

mm: make vm_area_dup() actually copy the old vma data

.. and re-initialize th eanon_vma_chain head.

This removes some boiler-plate from the users, and also makes it clear
why it didn't need use the 'zalloc()' version.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
DeltaFile
+7-3kernel/fork.c
+0-7mm/mmap.c
+0-1mm/nommu.c
+7-113 files

HardenedBSD/hardenedbsd ae5d1fbsys/cam cam_periph.c

Stop further SCSI recovery attempts after one has failed.

We've got a set of probably damaged hard disks, reporting 0x04,0x02
("Logical unit not ready, initializing command required") in response
to READ CAPACITY(16), where attempts to use START STOP UNIT for recovery
results in 0x44,0x00 ("Internal target failure") after ~1 second delay.
As result of all recovery retries, device open attempt took ~3 seconds
before finally reporting to GEOM that device is opened, but has no media.
If the open was for writing and since it hasn't formally failed, following
close triggered GEOM retaste, opening device few more times with respective
delays.

This change reduces whole time of this cycle from ~12 seconds to ~3 by
giving up on recovery after the first failure.

Reviewed by:    ken
MFC after:      2 weeks
Sponsored by:   iXsystems, Inc.
DeltaFile
+13-5sys/cam/cam_periph.c
+13-51 files

FreeBSD/src 336590head/sys/cam cam_periph.c

Stop further SCSI recovery attempts after one has failed.

We've got a set of probably damaged hard disks, reporting 0x04,0x02
("Logical unit not ready, initializing command required") in response
to READ CAPACITY(16), where attempts to use START STOP UNIT for recovery
results in 0x44,0x00 ("Internal target failure") after ~1 second delay.
As result of all recovery retries, device open attempt took ~3 seconds
before finally reporting to GEOM that device is opened, but has no media.
If the open was for writing and since it hasn't formally failed, following
close triggered GEOM retaste, opening device few more times with respective
delays.

This change reduces whole time of this cycle from ~12 seconds to ~3 by
giving up on recovery after the first failure.

Reviewed by:    ken
MFC after:      2 weeks
Sponsored by:   iXsystems, Inc.

FreeBSD/ports 475078head/www/node distinfo Makefile

www/node: Update 10.6.0 -> 10.7.0

https://nodejs.org/en/blog/release/v10.7.0/

Sponsored by:   Miles AS

NetBSD/pkgsrc XnE5f2Xaudio/vorbis-tools distinfo, audio/vorbis-tools/patches patch-configure

   vorbis-tools: don't special case sparc sun hosts.
   GCC doesn't have -mv8.

   PR pkg/37180.

FreeBSD/src 336589head/sys/arm64/arm64 pmap.c

Eliminate a comment that doesn't apply to this pmap implementation.

Coalesce the variable definitions for PV entry management.

MFC after:      3 weeks

HardenedBSD/hardenedbsd c962905sys/arm64/arm64 pmap.c

Eliminate a comment that doesn't apply to this pmap implementation.

Coalesce the variable definitions for PV entry management.

MFC after:      3 weeks

NetBSD/src a6yo2iesys/arch/x86/x86 pmap.c

   I realized the changes I made broke the !aslr conf, so enable aslr by
   default now rather than later (and rather than adding more ifdefs).

   Now the location of the direct map is randomized at boot time in GENERIC.
VersionDeltaFile
1.293+3-7sys/arch/x86/x86/pmap.c
+3-71 files

NetBSD/pkgsrc kgJHjlPdoc CHANGES-2018

   doc: Updated sysutils/extipl to 5.04nb2
VersionDeltaFile
1.3293+2-1doc/CHANGES-2018
+2-11 files

NetBSD/pkgsrc 83m8Zx0sysutils/extipl Makefile distinfo, sysutils/extipl/patches patch-extipl.h

   extipl: 64bit support, from Kimura Fuyuki in PR pkg/35955.

FreeBSD/ports 475077head/devel/awscli distinfo Makefile

devel/awscli: Update 1.15.59 -> 1.15.63

Sponsored by:   Miles AS

FreeBSD/ports 475076head/devel/py-botocore distinfo Makefile

devel/py-botocore: Update 1.10.58 -> 1.10.62

Sponsored by:   Miles AS

FreeBSD/ports 475075head/net-im/tox distinfo Makefile

Upgrade to v0.2.4.

Release notes at <https://github.com/TokTok/c-toxcore/releases/tag/v0.2.4>.

Linux/linux 3928d4farch/ia64/mm init.c, fs exec.c

mm: use helper functions for allocating and freeing vm_area structs

The vm_area_struct is one of the most fundamental memory management
objects, but the management of it is entirely open-coded evertwhere,
ranging from allocation and freeing (using kmem_cache_[z]alloc and
kmem_cache_free) to initializing all the fields.

We want to unify this in order to end up having some unified
initialization of the vmas, and the first step to this is to at least
have basic allocation functions.

Right now those functions are literally just wrappers around the
kmem_cache_*() calls.  This is a purely mechanical conversion:

    # new vma:
    kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL) -> vm_area_alloc()

    # copy old vma
    kmem_cache_alloc(vm_area_cachep, GFP_KERNEL) -> vm_area_dup(old)

    # free vma
    kmem_cache_free(vm_area_cachep, vma) -> vm_area_free(vma)

to the point where the old vma passed in to the vm_area_dup() function
isn't even used yet (because I've left all the old manual initialization

    [3 lines not shown]

FreeBSD/doc 52040head/de_DE.ISO8859-1/books/handbook/x11 chapter.xml

Update to r51980:

Correct directories in the X Display Manager session and
update description of Xsession.

Linux/linux 191a3af. MAINTAINERS, fs/fat inode.c

Merge branch 'akpm' (patches from Andrew)

Merge fixes from Andrew Morton:
 "5 fixes"

* emailed patches from Andrew Morton <akpm at linux-foundation.org>:
  mm: memcg: fix use after free in mem_cgroup_iter()
  mm/huge_memory.c: fix data loss when splitting a file pmd
  fat: fix memory allocation failure handling of match_strdup()
  MAINTAINERS: Peter has moved
  mm/memblock: add missing include <linux/bootmem.h>

HardenedBSD/hardenedbsd 64f767ftests/sys/fs/tmpfs Makefile

Fix sys.fs.tmpfs.mknod_test.{char, block} by reverting r321967

In r321967 ngie "fixed" these tests by changing their expectations to match
the device numbers produced by the new ino64 code.  But it wasn't the tests
that were broken, it was the kernel.  bde fixed the kernel in r335053.

Reported by:    Jenkins
MFC after:      Never (only applies to >= 12)

FreeBSD/src 336588head/tests/sys/fs/tmpfs Makefile

Fix sys.fs.tmpfs.mknod_test.{char, block} by reverting r321967

In r321967 ngie "fixed" these tests by changing their expectations to match
the device numbers produced by the new ino64 code.  But it wasn't the tests
that were broken, it was the kernel.  bde fixed the kernel in r335053.

Reported by:    Jenkins
MFC after:      Never (only applies to >= 12)

FreeBSD/ports 475074head/emulators/wine-devel distinfo Makefile

Update to Wine 3.13.  This includes the following changes:
 - Initial support for performance data in the registry.
 - Mono engine updated with some bug fixes.
 - Improvements in the standard Task Dialog.
 - Various bug fixes.

Make the dependency on devel/autoconf more general. [1]

Reviewed by:    tijl [1]

FreeBSD/ports 475073head/emulators/wine-mono-devel distinfo Makefile

Update wine-mono-devel from upstream 4.7.1 to 4.7.3 with minor fixes.

Approved by:    dbn (maintainer, pre-approval)

HardenedBSD/tools 00c8083. hardenedBSD_branches.txt

HBSD: stop to sync hardenedbsd-10-{libressl,unstable}

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>

OpenBSD/ports vmn3y8hproductivity/vym Makefile

   Fix path to manual in, err, manual page and in vym itself.

   okay jasper@
VersionDeltaFile
1.28+6-2productivity/vym/Makefile
+6-21 files

Linux/linux 5a69649. MAINTAINERS

MAINTAINERS: Peter has moved

Update my E-mail address in the MAINTAINERS file.

Link: http://lkml.kernel.org/r/20180710144702.1308-1-peter.senna at gmail.com
Signed-off-by: Peter Senna Tschudin <peter.senna at gmail.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.co.uk>
Acked-by: Martyn Welch <martyn.welch at collabora.co.uk>
Cc: David S. Miller <davem at davemloft.net>
Cc: Mauro Carvalho Chehab <mchehab+samsung at kernel.org>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: Randy Dunlap <rdunlap at infradead.org>
Cc: Martin Donnelly <martin.donnelly at ge.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
DeltaFile
+1-1MAINTAINERS
+1-11 files

Linux/linux 1937367mm memblock.c

mm/memblock: add missing include <linux/bootmem.h>

Commit 26f09e9b3a06 ("mm/memblock: add memblock memory allocation apis")
introduced two new function definitions:

  memblock_virt_alloc_try_nid_nopanic()
  memblock_virt_alloc_try_nid()

and commit ea1f5f3712af ("mm: define memblock_virt_alloc_try_nid_raw")
introduced the following function definition:

  memblock_virt_alloc_try_nid_raw()

This commit adds an include of header file <linux/bootmem.h> to provide
the missing function prototypes.  This silences the following gcc warning
(W=1):

  mm/memblock.c:1334:15: warning: no previous prototype for 
`memblock_virt_alloc_try_nid_raw' [-Wmissing-prototypes]
  mm/memblock.c:1371:15: warning: no previous prototype for 
`memblock_virt_alloc_try_nid_nopanic' [-Wmissing-prototypes]
  mm/memblock.c:1407:15: warning: no previous prototype for `memblock_virt_alloc_try_nid' 
[-Wmissing-prototypes]

Also adds #ifdef blockers to prevent compilation failure on mips/ia64

    [22 lines not shown]
DeltaFile
+3-0mm/memblock.c
+3-01 files

Linux/linux e1f1b15mm huge_memory.c

mm/huge_memory.c: fix data loss when splitting a file pmd

__split_huge_pmd_locked() must check if the cleared huge pmd was dirty,
and propagate that to PageDirty: otherwise, data may be lost when a huge
tmpfs page is modified then split then reclaimed.

How has this taken so long to be noticed?  Because there was no problem
when the huge page is written by a write system call (shmem_write_end()
calls set_page_dirty()), nor when the page is allocated for a write fault
(fault_dirty_shared_page() calls set_page_dirty()); but when allocated for
a read fault (which MAP_POPULATE simulates), no set_page_dirty().

Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1807111741430.1106 at eggly.anvils
Fixes: d21b9e57c74c ("thp: handle file pages in split_huge_pmd()")
Signed-off-by: Hugh Dickins <hughd at google.com>
Reported-by: Ashwin Chaugule <ashwinch at google.com>
Reviewed-by: Yang Shi <yang.shi at linux.alibaba.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov at linux.intel.com>
Cc: "Huang, Ying" <ying.huang at intel.com>
Cc: <stable at vger.kernel.org>    [4.8+]
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
DeltaFile
+2-0mm/huge_memory.c
+2-01 files

Linux/linux 35033abfs/fat inode.c

fat: fix memory allocation failure handling of match_strdup()

In parse_options(), if match_strdup() failed, parse_options() leaves
opts->iocharset in unexpected state (i.e.  still pointing the freed
string).  And this can be the cause of double free.

To fix, this initialize opts->iocharset always when freeing.

Link: http://lkml.kernel.org/r/8736wp9dzc.fsf at mail.parknet.co.jp
Signed-off-by: OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
Reported-by: syzbot+90b8e10515ae88228a92 at syzkaller.appspotmail.com
Cc: <stable at vger.kernel.org>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
DeltaFile
+13-7fs/fat/inode.c
+13-71 files

Linux/linux 9f15bdemm memcontrol.c

mm: memcg: fix use after free in mem_cgroup_iter()

It was reported that a kernel crash happened in mem_cgroup_iter(), which
can be triggered if the legacy cgroup-v1 non-hierarchical mode is used.

Unable to handle kernel paging request at virtual address 6b6b6b6b6b6b8f
......
Call trace:
  mem_cgroup_iter+0x2e0/0x6d4
  shrink_zone+0x8c/0x324
  balance_pgdat+0x450/0x640
  kswapd+0x130/0x4b8
  kthread+0xe8/0xfc
  ret_from_fork+0x10/0x20

  mem_cgroup_iter():
      ......
      if (css_tryget(css))    <-- crash here
            break;
      ......

The crashing reason is that mem_cgroup_iter() uses the memcg object whose
pointer is stored in iter->position, which has been freed before and
filled with POISON_FREE(0x6b).


    [15 lines not shown]
DeltaFile
+1-1mm/memcontrol.c
+1-11 files

HardenedBSD/hardenedbsd 7fada83libexec/tftpd tftp-transfer.c

tftpd(8): when completing an WRQ, flush the file before acknowleding receipt

tftpd(8) should flush a newly written file to disk before ACKing the final DATA
packet.  Otherwise there is a narrow race window when a subsequent read may not
see the file.  This is somewhat related to r330710, but the race window is much
smaller.  Hopefully this will fix the intermittent tests in Jenkins.

Reported by:    Jenkins
MFC after:      2 weeks