powerpc/pseries: Avoid NULL pointer dereference when drmem is unavailable
Libor Pechacek authored
commit a83836db upstream.

In guests without hotplugagble memory drmem structure is only zero
initialized. Trying to manipulate DLPAR parameters results in a crash.

  $ echo "memory add count 1" > /sys/kernel/dlpar
  Oops: Kernel access of bad area, sig: 11 [#1]
  LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
  ...
  NIP:  c0000000000ff294 LR: c0000000000ff248 CTR: 0000000000000000
  REGS: c0000000fb9d3880 TRAP: 0300   Tainted: G            E      (5.5.0-rc6-2-default)
  MSR:  8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 28242428  XER: 20000000
  CFAR: c0000000009a6c10 DAR: 0000000000000010 DSISR: 40000000 IRQMASK: 0
  ...
  NIP dlpar_memory+0x6e4/0xd00
  LR  dlpar_memory+0x698/0xd00
  Call Trace:
    dlpar_memory+0x698/0xd00 (unreliable)
    handle_dlpar_errorlog+0xc0/0x190
    dlpar_store+0x198/0x4a0
    kobj_attr_store+0x30/0x50
    sysfs_kf_write+0x64/0x90
    kernfs_fop_write+0x1b0/0x2...
7a76c7d6
Name Last commit Last update
Documentation time/namespace: Add max_time_namespaces ucount
LICENSES LICENSES: Rename other to deprecated
arch powerpc/pseries: Avoid NULL pointer dereference when drmem is unavailable
block block, bfq: fix use-after-free in bfq_idle_slice_timer_body
certs certs: Add wrapper function to check blacklisted binary hash
crypto crypto: rng - Fix a refcounting bug in crypto_rng_reset()
drivers drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode
fs io_uring: honor original task RLIMIT_FSIZE
include xarray: Fix early termination of xas_for_each_marked
init int128: fix __uint128_t compiler test in Kconfig
ipc Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()"
kernel sched/core: Remove duplicate assignment in sched_tick_remote()
lib xarray: Fix early termination of xas_for_each_marked
mm mm, memcg: do not high throttle allocators based on wraparound
net Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
samples Merge tag 'kbuild-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
scripts Merge tag 'devicetree-fixes-for-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
security KEYS: reaching the keys quotas correctly
sound ALSA: hda/realtek - Add quirk for MSI GL63
tools selftests/powerpc: Fix try-run when source tree is not writable
usr initramfs: restore default compression behavior
virt Merge tag 'kvmarm-fixes-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes .gitattributes: use 'dts' diff driver for dts files
.gitignore selftest/lkdtm: Use local .gitignore
.mailmap mailmap: Update email address
COPYING COPYING: state that all contributions really are covered by this file
CREDITS MAINTAINERS: Hand MIPS over to Thomas
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst
MAINTAINERS MAINTAINERS: fix bad file pattern
Makefile Linux 5.6.4
README Drop all 00-INDEX files from Documentation/
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.