Changes in 4.9.251 kbuild: don't hardcode depmod path workqueue: Kick a worker based on the actual activation of delayed works lib/genalloc: fix the overflow when size is too big depmod: handle the case of /sbin/depmod without /sbin in PATH ethernet: ucc_geth: fix use-after-free in ucc_geth_remove() atm: idt77252: call pci_disable_device() on error path net/ncsi: Use real net-device for response handler net: ethernet: Fix memleak in ethoc_probe ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst() net: hns: fix return value check in __lb_other_process() net: hdlc_ppp: Fix issues when mod_timer is called while timer is running CDC-NCM: remove "connected" log message vhost_net: fix ubuf refcount incorrectly when sendmsg fails net: sched: prevent invalid Scell_log shift count virtio_net: Fix recursive call to cpus_read_lock() scripts/gdb: make lx-dmesg command work (reliably) scripts/gdb: lx-dmesg: cast log_buf to void* for addr fetch scripts/gdb: lx-dmesg: use explicit encoding=utf8 errors=replace scripts/gdb: fix lx-version string output video: hyperv_fb: Fix the mmap() regression for v5.4.y and older usb: gadget: enable super speed plus USB: cdc-acm: blacklist another IR Droid device usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set usb: uas: Add PNY USB Portable SSD to unusual_uas USB: serial: iuu_phoenix: fix DMA from stack USB: serial: option: add LongSung M5710 module support USB: yurex: fix control-URB timeout handling USB: usblp: fix DMA to stack ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks usb: gadget: select CONFIG_CRC32 usb: gadget: f_uac2: reset wMaxPacketSize usb: gadget: function: printer: Fix a memory leak for interface descriptor USB: gadget: legacy: fix return error code in acm_ms_bind() usb: gadget: Fix spinlock lockup on usb_function_deactivate usb: gadget: configfs: Preserve function ordering after bind failure usb: gadget: configfs: Fix use-after-free issue with udc_name USB: serial: keyspan_pda: remove unused variable x86/mm: Fix leak of pmd ptlock ALSA: hda/conexant: add a new hda codec CX11970 Revert "device property: Keep secondary firmware node secondary by type" netfilter: ipset: fix shift-out-of-bounds in htable_bits() netfilter: xt_RATEEST: reject non-null terminated string from userspace x86/mtrr: Correct the range check before performing MTRR type lookups Linux 4.9.251 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ie0c2d970d2e42e8ffbc17d1e35deb63d7aaef961
73 lines
1.9 KiB
Bash
Executable File
73 lines
1.9 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# A depmod wrapper used by the toplevel Makefile
|
|
|
|
if test $# -ne 3; then
|
|
echo "Usage: $0 /sbin/depmod <kernelrelease> <symbolprefix>" >&2
|
|
exit 1
|
|
fi
|
|
DEPMOD=$1
|
|
KERNELRELEASE=$2
|
|
SYMBOL_PREFIX=$3
|
|
|
|
if ! test -r System.map ; then
|
|
exit 0
|
|
fi
|
|
|
|
# legacy behavior: "depmod" in /sbin, no /sbin in PATH
|
|
PATH="$PATH:/sbin"
|
|
if [ -z $(command -v $DEPMOD) ]; then
|
|
echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
|
|
echo "This is probably in the kmod package." >&2
|
|
exit 0
|
|
fi
|
|
|
|
# older versions of depmod don't support -P <symbol-prefix>
|
|
# support was added in module-init-tools 3.13
|
|
if test -n "$SYMBOL_PREFIX"; then
|
|
release=$("$DEPMOD" --version)
|
|
package=$(echo "$release" | cut -d' ' -f 1)
|
|
if test "$package" = "module-init-tools"; then
|
|
version=$(echo "$release" | cut -d' ' -f 2)
|
|
later=$(printf '%s\n' "$version" "3.13" | sort -V | tail -n 1)
|
|
if test "$later" != "$version"; then
|
|
# module-init-tools < 3.13, drop the symbol prefix
|
|
SYMBOL_PREFIX=""
|
|
fi
|
|
fi
|
|
if test -n "$SYMBOL_PREFIX"; then
|
|
SYMBOL_PREFIX="-P $SYMBOL_PREFIX"
|
|
fi
|
|
fi
|
|
|
|
# older versions of depmod require the version string to start with three
|
|
# numbers, so we cheat with a symlink here
|
|
depmod_hack_needed=true
|
|
tmp_dir=$(mktemp -d ${TMPDIR:-/tmp}/depmod.XXXXXX)
|
|
mkdir -p "$tmp_dir/lib/modules/$KERNELRELEASE"
|
|
if "$DEPMOD" -b "$tmp_dir" $KERNELRELEASE 2>/dev/null; then
|
|
if test -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep" -o \
|
|
-e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep.bin"; then
|
|
depmod_hack_needed=false
|
|
fi
|
|
fi
|
|
rm -rf "$tmp_dir"
|
|
if $depmod_hack_needed; then
|
|
symlink="$INSTALL_MOD_PATH/lib/modules/99.98.$KERNELRELEASE"
|
|
ln -s "$KERNELRELEASE" "$symlink"
|
|
KERNELRELEASE=99.98.$KERNELRELEASE
|
|
fi
|
|
|
|
set -- -ae -F System.map
|
|
if test -n "$INSTALL_MOD_PATH"; then
|
|
set -- "$@" -b "$INSTALL_MOD_PATH"
|
|
fi
|
|
"$DEPMOD" "$@" "$KERNELRELEASE" $SYMBOL_PREFIX
|
|
ret=$?
|
|
|
|
if $depmod_hack_needed; then
|
|
rm -f "$symlink"
|
|
fi
|
|
|
|
exit $ret
|