remoteproc: Fix NULL pointer dereference in rproc_virtio_notify
Nikita Shubin authored
commit 791c13b7 upstream.

Undefined rproc_ops .kick method in remoteproc driver will result in
"Unable to handle kernel NULL pointer dereference" in rproc_virtio_notify,
after firmware loading if:

 1) .kick method wasn't defined in driver
 2) resource_table exists in firmware and has "Virtio device entry" defined

Let's refuse to register an rproc-induced virtio device if no kick method was
defined for rproc.

[   13.180049][  T415] 8<--- cut here ---
[   13.190558][  T415] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[   13.212544][  T415] pgd = (ptrval)
[   13.217052][  T415] [00000000] *pgd=00000000
[   13.224692][  T415] Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
[   13.231318][  T415] Modules linked in: rpmsg_char imx_rproc virtio_rpmsg_bus rpmsg_core [last unloaded: imx_rproc]
[   13.241687][  T415] CPU: 0 PID: 415 Comm: unload-load.sh Not tainted 5.5.2-00002-g70...
438d3d80
Name Last commit Last update
Documentation ALSA: hda/realtek - Remove now-unnecessary XPS 13 headphone noise fixups
LICENSES LICENSES: Rename other to deprecated
arch KVM: VMX: fix crash cleanup when KVM wasn't used
block block, bfq: fix use-after-free in bfq_idle_slice_timer_body
certs certs: Add wrapper function to check blacklisted binary hash
crypto Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity
drivers remoteproc: Fix NULL pointer dereference in rproc_virtio_notify
fs btrfs: use nofs allocations for running delayed items
include signal: Extend exec_id to 64bits
init int128: fix __uint128_t compiler test in Kconfig
ipc Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()"
kernel signal: Extend exec_id to 64bits
lib XArray: Fix xa_find_next for large multi-index entries
mm slub: improve bit diffusion for freelist ptr obfuscation
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/x86/ptrace_syscall_32: Fix no-vDSO segfault
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.