Files
kernel_google_msm-4.9/scripts/setlocalversion
lucaswei f09d91fe02 Merge android-4.9-q (4.9.248) into android-msm-pixel-4.9-lts
Merge 4.9.248 into android-4.9-q
Linux 4.9.248
    x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes
    Input: i8042 - fix error return code in i8042_setup_aux()
    i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc()
    gfs2: check for empty rgrp tree in gfs2_ri_update
  * tracing: Fix userstacktrace option for instances
      kernel/trace/trace.c
      kernel/trace/trace.h
    spi: bcm2835: Release the DMA channel if probe fails after dma_init
    spi: bcm2835: Fix use-after-free on unbind
    spi: bcm-qspi: Fix use-after-free on unbind
  * spi: Introduce device-managed SPI controller allocation
      drivers/spi/spi.c
      include/linux/spi/spi.h
    iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs
    i2c: imx: Check for I2SR_IAL after every byte
    i2c: imx: Fix reset of I2SR_IAL flag
    cifs: fix potential use-after-free in cifs_echo_request()
    ftrace: Fix updating FTRACE_FL_TRAMP
  * tty: Fix ->session locking
      drivers/tty/tty_io.c
      include/linux/tty.h
    ALSA: hda/generic: Add option to enforce preferred_dacs pairs
    ALSA: hda/realtek - Add new codec supported for ALC897
  * tty: Fix ->pgrp locking in tiocspgrp()
      drivers/tty/tty_io.c
    USB: serial: option: add support for Thales Cinterion EXS82
    USB: serial: option: add Fibocom NL668 variants
    USB: serial: ch341: sort device-id entries
    USB: serial: ch341: add new Product ID for CH341A
    USB: serial: kl5kusb105: fix memleak on open
  * usb: gadget: f_fs: Use local copy of descriptors for userspace copy
      drivers/usb/gadget/function/f_fs.c
  * vlan: consolidate VLAN parsing code and limit max parsing depth
      include/linux/if_vlan.h
      include/net/inet_ecn.h
    pinctrl: baytrail: Fix pin being driven low for a while on gpiod_get(..., GPIOD_OUT_HIGH)
    pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output
    btrfs: sysfs: init devices outside of the chunk_mutex
    RDMA/i40iw: Address an mmap handler exploit in i40iw
  * spi: Fix controller unregister order harder
      drivers/spi/spi.c
    Input: i8042 - add ByteSpeed touchpad to noloop table
  * Input: xpad - support Ardwiino Controllers
      drivers/input/joystick/xpad.c
    dt-bindings: net: correct interrupt flags in examples
    net/mlx5: Fix wrong address reclaim when command interface is down
    net: pasemi: fix error return code in pasemi_mac_open()
    cxgb3: fix error return code in t3_sge_alloc_qset()
    net/x25: prevent a couple of overflows
    ibmvnic: Fix TX completion error handling
    ibmvnic: Ensure that SCRQ entry reads are correctly ordered
    netfilter: bridge: reset skb->pkt_type after NF_INET_POST_ROUTING traversal
  * bonding: wait for sysfs kobject destruction before freeing struct slave
      drivers/net/bonding/bond_main.c
      drivers/net/bonding/bond_sysfs_slave.c
      include/net/bonding.h
    usbnet: ipheth: fix connectivity with iOS 14
    rose: Fix Null pointer dereference in rose_send_frame()
    net/af_iucv: set correct sk_protocol for child sockets
    ANDROID: cuttlefish_defconfig: Disable CONFIG_KSM
    Merge 4.9.247 into android-4.9-q
Linux 4.9.247
  * USB: core: Fix regression in Hercules audio card
      drivers/usb/core/quirks.c
  * USB: core: add endpoint-blacklist quirk
      drivers/usb/core/config.c
      drivers/usb/core/quirks.c
      drivers/usb/core/usb.h
      include/linux/usb/quirks.h
  * regulator: workaround self-referent regulators
      drivers/regulator/core.c
  * regulator: avoid resolve_supply() infinite recursion
      drivers/regulator/core.c
    x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb
    usb: gadget: Fix memleak in gadgetfs_fill_super
  * usb: gadget: f_midi: Fix memleak in f_midi_alloc
      drivers/usb/gadget/function/f_midi.c
  * USB: core: Change %pK for __user pointers to %px
      drivers/usb/core/devio.c
    perf probe: Fix to die_entrypc() returns error correctly
    platform/x86: toshiba_acpi: Fix the wrong variable assignment
    can: gs_usb: fix endianess problem with candleLight firmware
    efivarfs: revert "fix memory leak in efivarfs_create()"
    ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq
    net: ena: set initial DMA width to avoid intel iommu issue
    nfc: s3fwrn5: use signed integer for parsing GPIO numbers
    IB/mthca: fix return value of error branch in mthca_init_cq()
    bnxt_en: Release PCI regions when DMA mask setup fails during probe.
    video: hyperv_fb: Fix the cache type when mapping the VRAM
    bnxt_en: fix error return code in bnxt_init_board()
  * scsi: ufs: Fix race between shutdown and runtime resume flow
      drivers/scsi/ufs/ufshcd.c
    batman-adv: set .owner to THIS_MODULE
    phy: tegra: xusb: Fix dangling pointer on probe failure
    perf/x86: fix sysfs type mismatches
    scsi: target: iscsi: Fix cmd abort fabric stop race
    scsi: libiscsi: Fix NOP race condition
    dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size
  * proc: don't allow async path resolution of /proc/self components
      fs/proc/self.c
    x86/xen: don't unbind uninitialized lock_kicker_irq
    dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant
    HID: hid-sensor-hub: Fix issue with devices with no report ID
    Input: i8042 - allow insmod to succeed on devices without an i8042 controller
  * HID: cypress: Support Varmilo Keyboards' media hotkeys
      drivers/hid/hid-ids.h
    ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close
    ALSA: hda/hdmi: Use single mutex unlock in error paths
  * arm64: pgtable: Fix pte_accessible()
      arch/arm64/include/asm/pgtable.h
    btrfs: inode: Verify inode mode to avoid NULL pointer dereference
    btrfs: tree-checker: Enhance chunk checker to validate chunk profile
  * PCI: Add device even if driver attach failed
      drivers/pci/bus.c
    btrfs: fix lockdep splat when reading qgroup config on mount
    mm/userfaultfd: do not access vma->vm_mm after calling handle_userfault()
    perf event: Check ref_reloc_sym before using it
  * BACKPORT: arm64: SW PAN: Point saved ttbr0 at the zero page when switching to init_mm
      arch/arm64/include/asm/efi.h
      arch/arm64/include/asm/mmu_context.h
    Merge 4.9.246 into android-4.9-q
Linux 4.9.246
    x86/microcode/intel: Check patch signature before saving microcode for early loading
    s390/cpum_sf.c: fix file permission for cpum_sfb_size
    mac80211: free sta in sta_info_insert_finish() on errors
    mac80211: minstrel: fix tx status processing corner case
    mac80211: minstrel: remove deferred sampling code
    xtensa: disable preemption around cache alias management calls
  * regulator: fix memory leak with repeated set_machine_constraints()
      drivers/regulator/core.c
    iio: accel: kxcjk1013: Replace is_smo8500_device with an acpi_type enum
  * ext4: fix bogus warning in ext4_update_dx_flag()
      fs/ext4/ext4.h
    efivarfs: fix memory leak in efivarfs_create()
    tty: serial: imx: keep console clocks always on
    ALSA: mixart: Fix mutex deadlock
  * ALSA: ctl: fix error path at adding user-defined element set
      sound/core/control.c
    powerpc/uaccess-flush: fix missing includes in kup-radix.h
  * libfs: fix error cast of negative value in simple_attr_write()
      fs/libfs.c
    xfs: revert "xfs: fix rmap key and record comparison functions"
    regulator: ti-abb: Fix array out of bound read access on the first transition
    MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu
    can: m_can: m_can_handle_state_change(): fix state change
    can: peak_usb: fix potential integer overflow on shift of a int
    can: dev: can_restart(): post buffer from the right context
    perf lock: Don't free "lock_seq_stat" if read_count isn't zero
    ARM: dts: imx50-evk: Fix the chip select 1 IOMUX
    arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy
    MIPS: export has_transparent_hugepage() for modules
    Input: adxl34x - clean up a data type in adxl34x_probe()
  * vfs: remove lockdep bogosity in __sb_start_write
      fs/super.c
  * arm64: psci: Avoid printing in cpu_psci_cpu_die()
      arch/arm64/kernel/psci.c
    pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq
    mlxsw: core: Use variable timeout for EMAD retries
    net: ftgmac100: Fix crash when removing driver
    tcp: only postpone PROBE_RTT if RTT is < current min_rtt estimate
    net: usb: qmi_wwan: Set DTR quirk for MR400
    sctp: change to hold/put transport for proto_unreach_timer
    qlcnic: fix error return code in qlcnic_83xx_restart_hw()
    net: x25: Increase refcnt of "struct x25_neigh" in x25_rx_call_request
    net/mlx4_core: Fix init_hca fields offset
  * netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist()
      net/netlabel/netlabel_unlabeled.c
  * netlabel: fix our progress tracking in netlbl_unlabel_staticlist()
      net/netlabel/netlabel_unlabeled.c
    net: Have netpoll bring-up DSA management interface
  * net: bridge: add missing counters to ndo_get_stats64 callback
      net/bridge/br_device.c
    net: b44: fix error return code in b44_init_one()
  * inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()
      net/ipv4/inet_diag.c
    devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill()
    bnxt_en: read EEPROM A2h address using page 0
    atm: nicstar: Unmap DMA on send error
  * ah6: fix error return code in ah6_input()
      net/ipv6/ah6.c
    Merge 4.9.245 into android-4.9-q
Linux 4.9.245
    ACPI: GED: fix -Wformat
    KVM: x86: clflushopt should be treated as a no-op by emulation
    mac80211: always wind down STA state
    Input: sunkbd - avoid use-after-free in teardown paths
    powerpc/8xx: Always fault when _PAGE_ACCESSED is not set
    i2c: mux: pca954x: Add missing pca9546 definition to chip_desc
    i2c: imx: Fix external abort on interrupt in exit paths
    i2c: imx: use clk notifier for rate changes
    powerpc/64s: flush L1D after user accesses
    powerpc/uaccess: Evaluate macro arguments once, before user access is allowed
    powerpc: Fix __clear_user() with KUAP enabled
    powerpc: Implement user_access_begin and friends
    powerpc: Add a framework for user access tracking
    powerpc/64s: flush L1D on kernel entry
    powerpc/64s: move some exception handlers out of line
    powerpc/64s: Define MASKABLE_RELON_EXCEPTION_PSERIES_OOL
Linux 4.9.244
    Convert trailing spaces and periods in path components
  * ext4: fix leaking sysfs kobject after failed mount
      fs/ext4/super.c
  * reboot: fix overflow parsing reboot cpu number
      kernel/reboot.c
  * Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"
      kernel/reboot.c
  * perf/core: Fix race in the perf_mmap_close() function
      kernel/events/core.c
    xen/events: block rogue events for some time
    xen/events: defer eoi in case of excessive number of events
    xen/events: use a common cpu hotplug hook for event channels
    xen/events: switch user event channels to lateeoi model
    xen/pciback: use lateeoi irq binding
    xen/scsiback: use lateeoi irq binding
    xen/netback: use lateeoi irq binding
    xen/blkback: use lateeoi irq binding
    xen/events: add a new "late EOI" evtchn framework
    xen/events: fix race in evtchn_fifo_unmask()
    xen/events: add a proper barrier to 2-level uevent unmasking
    xen/events: avoid removing an event channel while handling it
  * perf/core: Fix a memory leak in perf_event_parse_addr_filter()
      kernel/events/core.c
  * perf/core: Fix crash when using HW tracing kernel filters
      kernel/events/core.c
  * perf/core: Fix bad use of igrab()
      include/linux/perf_event.h
      kernel/events/core.c
    x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP
  * random32: make prandom_u32() output unpredictable
      drivers/char/random.c
      include/linux/prandom.h
      kernel/time/timer.c
      lib/random32.c
    net: Update window_clamp if SOCK_RCVBUF is set
    net/x25: Fix null-ptr-deref in x25_connect
    net/af_iucv: fix null pointer dereference on shutdown
  * IPv6: Set SIT tunnel hard_header_len to zero
      net/ipv6/sit.c
  * swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb"
      lib/swiotlb.c
    pinctrl: amd: fix incorrect way to disable debounce filter
    pinctrl: amd: use higher precision for 512 RtcClk
    drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]
  * don't dump the threads that had been already exiting when zapped.
      kernel/exit.c
    ocfs2: initialize ip_next_orphan
    mei: protect mei_cl_mtu from null dereference
    usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode
  * ext4: unlock xattr_sem properly in ext4_inline_data_truncate()
      fs/ext4/inline.c
  * ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA
      fs/ext4/super.c
  * perf: Fix get_recursion_context()
      kernel/events/internal.h
    cosa: Add missing kfree in error path of cosa_write
  * of/address: Fix of_node memory leak in of_dma_is_coherent
      drivers/of/address.c
    xfs: fix a missing unlock on error in xfs_fs_map_blocks
    xfs: fix rmap key and record comparison functions
    xfs: fix flags argument to rmap lookup when converting shared file rmaps
    pinctrl: aspeed: Fix GPI only function problem.
    iommu/amd: Increase interrupt remapping table limit to 512 entries
    scsi: scsi_dh_alua: Avoid crash during alua_bus_detach()
  * cfg80211: regulatory: Fix inconsistent format argument
      net/wireless/reg.c
    mac80211: fix use of skb payload instead of header
    drm/amdgpu: perform srbm soft reset always on SDMA resume
    scsi: hpsa: Fix memory leak in hpsa_init_one()
    gfs2: check for live vs. read-only file system in gfs2_fitrim
    gfs2: Free rd_bits later in gfs2_clear_rgrpd to fix use-after-free
    usb: gadget: goku_udc: fix potential crashes in probe
    ath9k_htc: Use appropriate rs_datalen type
    geneve: add transport ports in route lookup for geneve
    i40e: Memory leak in i40e_config_iwarp_qvlist
    i40e: Fix of memory leak and integer truncation in i40e_virtchnl.c
    i40e: Wrong truncation from u16 to u8
    i40e: add num_vectors checker in iwarp handler
    i40e: Fix a potential NULL pointer dereference
  * pinctrl: devicetree: Avoid taking direct reference to device name string
      drivers/pinctrl/devicetree.c
    Btrfs: fix missing error return if writeback for extent buffer never started
    xfs: flush new eof page on truncate to avoid post-eof corruption
    can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping
    can: peak_usb: add range checking in decode operations
    can: can_create_echo_skb(): fix echo skb generation: always use skb_clone()
    can: dev: __can_get_echo_skb(): fix real payload length return value for RTR frames
    can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context
    ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link()
    perf tools: Add missing swap for ino_generation
  * net: xfrm: fix a race condition during allocing spi
      net/xfrm/xfrm_state.c
  * genirq: Let GENERIC_IRQ_IPI select IRQ_DOMAIN_HIERARCHY
      kernel/irq/Kconfig
    btrfs: reschedule when cloning lots of extents
  * time: Prevent undefined behaviour in timespec64_to_ns()
      include/linux/time64.h
    mm: mempolicy: fix potential pte_unmap_unlock pte error
    gfs2: Wake up when sd_glock_disposal becomes zero
  * ring-buffer: Fix recursion protection transitions between interrupt context
      kernel/trace/ring_buffer.c
  * regulator: defer probe when trying to get voltage from unresolved supply
      drivers/regulator/core.c
    UPSTREAM: thermal/drivers/hisi: Remove bogus const from function return type
  * UPSTREAM: net/ipv6: don't reinitialize ndev->cnf.addr_gen_mode on new inet6_dev
      net/ipv6/addrconf.c
    UPSTREAM: tee: shm: fix use-after-free via temporarily dropped reference
    UPSTREAM: Documentation: ip-sysctl.txt: document addr_gen_mode
    UPSTREAM: net: crypto set sk to NULL when af_alg_release.
  * UPSTREAM: ipv6: don't auto-add link-local address to lag ports
      net/ipv6/addrconf.c
  * UPSTREAM: ipv6: ndisc: RFC-ietf-6man-ra-pref64-09 is now published as RFC8781
      include/net/ndisc.h
  * UPSTREAM: binder: fix incorrect cmd to binder_stat_br
      drivers/android/binder.c
  * UPSTREAM: arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb
      arch/arm64/include/asm/mmu_context.h
    UPSTREAM: staging: android: vsoc: fix copy_from_user overrun
    Merge 4.9.243 into android-4.9-q
Linux 4.9.243
    powercap: restrict energy meter to root access
    Merge 4.9.242 into android-4.9-q
Linux 4.9.242
    Revert "ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE"
    ARC: stack unwinding: avoid indefinite looping
  * USB: Add NO_LPM quirk for Kingston flash drive
      drivers/usb/core/quirks.c
    USB: serial: option: add Telit FN980 composition 0x1055
    USB: serial: option: add LE910Cx compositions 0x1203, 0x1230, 0x1231
    USB: serial: cyberjack: fix write-URB completion race
    serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init
    serial: 8250_mtk: Fix uart_get_baud_rate warning
  * fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
      kernel/fork.c
  * vt: Disable KD_FONT_OP_COPY
      drivers/tty/vt/vt.c
    ACPI: NFIT: Fix comparison to '-ENXIO'
    vsock: use ns_capable_noaudit() on socket create
  * scsi: core: Don't start concurrent async scan on same host
      drivers/scsi/scsi_scan.c
  * of: Fix reserved-memory overlap detection
      drivers/of/of_reserved_mem.c
    x86/kexec: Use up-to-dated screen_info copy to fill boot params
    ARM: dts: sun4i-a10: fix cpu_alert temperature
  * tracing: Fix out of bounds write in get_trace_buf
      kernel/trace/trace.c
  * ftrace: Handle tracing when switching between context
      kernel/trace/trace.h
  * ftrace: Fix recursion check for NMI test
      kernel/trace/trace.h
  * kthread_worker: prevent queuing delayed work from timer_fn when it is being canceled
      kernel/kthread.c
  * ALSA: usb-audio: Add implicit feedback quirk for Qu-16
      sound/usb/pcm.c
    Fonts: Replace discarded const qualifier
    gianfar: Account for Tx PTP timestamp in the skb headroom
    gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP
    tipc: fix use-after-free in tipc_bcast_get_mode
    xen/events: don't use chip_data for legacy IRQs
    staging: octeon: Drop on uncorrectable alignment or FCS error
    staging: octeon: repair "fixed-link" support
    staging: comedi: cb_pcidas: Allow 2-channel commands for AO subdevice
  * KVM: arm64: Fix AArch32 handling of DBGD{CCINT,SCRext} and DBGVCR
      arch/arm64/include/asm/kvm_host.h
  * device property: Don't clear secondary pointer for shared primary firmware node
      drivers/base/core.c
  * device property: Keep secondary firmware node secondary by type
      drivers/base/core.c
    ARM: s3c24xx: fix missing system reset
    ARM: samsung: fix PM debug build with DEBUG_LL but !MMU
    hil/parisc: Disable HIL driver when it gets stuck
    cachefiles: Handle readpage error correctly
  * arm64: berlin: Select DW_APB_TIMER_OF
      arch/arm64/Kconfig.platforms
  * tty: make FONTX ioctl use the tty pointer they were actually passed
      drivers/tty/vt/vt_ioctl.c
    rtc: rx8010: don't modify the global rtc ops
    vringh: fix __vringh_iov() when riov and wiov are different
  * ring-buffer: Return 0 on success from ring_buffer_resize()
      kernel/trace/ring_buffer.c
    9P: Cast to loff_t before multiplying
    libceph: clear con->out_msg on Policy::stateful_server faults
    ceph: promote to unsigned long long before shifting
    ia64: fix build error with !COREDUMP
    ubi: check kthread_should_stop() after the setting of task state
    ubifs: dent: Fix some potential memory leaks while iterating entries
    powerpc/powernv/elog: Fix race while processing OPAL error log event.
    powerpc: Warn about use of smt_snooze_delay
    iio:gyro:itg3200: Fix timestamp alignment and prevent data leak.
    iio:adc:ti-adc12138 Fix alignment issue with timestamp
    iio:light:si1145: Fix timestamp alignment and prevent data leak.
    dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status
  * vt: keyboard, extend func_buf_lock to readers
      drivers/tty/vt/keyboard.c
  * vt: keyboard, simplify vt_kdgkbsent
      drivers/tty/vt/keyboard.c
    usb: host: fsl-mph-dr-of: check return of dma_set_mask()
  * usb: dwc3: core: don't trigger runtime pm when remove driver
      drivers/usb/dwc3/core.c
  * usb: dwc3: core: add phy cleanup for probe error handling
      drivers/usb/dwc3/core.c
    btrfs: fix use-after-free on readahead extent after failure to create it
    btrfs: cleanup cow block on error
    btrfs: reschedule if necessary when logging directory items
    scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove()
    w1: mxc_w1: Fix timeout resolution problem leading to bus error
    acpi-cpufreq: Honor _PSD table setting on new AMD CPUs
    ACPI: debug: don't allow debugging when ACPI is disabled
    ACPI: video: use ACPI backlight for HP 635 Notebook
    ACPI / extlog: Check for RDMSR failure
    NFS: fix nfs_path in case of a rename retry
  * fs: Don't invalidate page buffers in block_write_full_page()
      fs/buffer.c
    leds: bcm6328, bcm6358: use devres LED registering function
    perf/x86/amd/ibs: Fix raw sample data accumulation
    perf/x86/amd/ibs: Don't include randomized bits in get_ibs_op_count()
    md/raid5: fix oops during stripe resizing
    ARM: dts: s5pv210: remove dedicated 'audio-subsystem' node
    ARM: dts: s5pv210: move PMU node out of clock controller
    ARM: dts: s5pv210: remove DMA controller bus node name to fix dtschema warnings
    memory: emif: Remove bogus debugfs error handling
    gfs2: add validation checks for size of superblock
  * ext4: Detect already used quota file early
      fs/ext4/super.c
    drivers: watchdog: rdc321x_wdt: Fix race condition bugs
    net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid
    clk: ti: clockdomain: fix static checker warning
    md/bitmap: md_bitmap_get_counter returns wrong blocks
    power: supply: test_power: add missing newlines when printing parameters by sysfs
    bus/fsl_mc: Do not rely on caller to provide non NULL mc_io
    drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values
  * arm64/mm: return cpu_all_mask when node is NUMA_NO_NODE
      arch/arm64/include/asm/numa.h
    USB: adutux: fix debugging
    cpufreq: sti-cpufreq: add stih418 support
  * kgdb: Make "kgdbcon" work properly with "kgdb_earlycon"
      kernel/debug/debug_core.c
  * printk: reduce LOG_BUF_SHIFT range for H8300
      init/Kconfig
    mmc: via-sdmmc: Fix data race bug
    media: tw5864: check status of tw5864_frameinterval_get
    ath10k: fix VHT NSS calculation when STBC is enabled
    video: fbdev: pvr2fb: initialize variables
    xfs: fix realtime bitmap/summary file truncation when growing rt volume
    ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses
    um: change sigio_spinlock to a mutex
  * f2fs: fix to check segment boundary during SIT page readahead
      fs/f2fs/checkpoint.c
  * f2fs: add trace exit in exception path
      fs/f2fs/checkpoint.c
    sparc64: remove mm_cpumask clearing to fix kthread_use_mm race
    powerpc/powernv/smp: Fix spurious DBG() warning
    mlxsw: core: Fix use-after-free in mlxsw_emad_trans_finish()
  * fscrypt: use EEXIST when file already uses different policy
      fs/crypto/policy.c
  * fscrypto: move ioctl processing more fully into common code
      fs/crypto/policy.c
      fs/ext4/ext4.h
      fs/ext4/ioctl.c
      fs/f2fs/f2fs.h
      fs/f2fs/file.c
  * fscrypt: return -EXDEV for incompatible rename or link into encrypted dir
      fs/crypto/policy.c
      fs/ext4/namei.c
      fs/f2fs/namei.c
    ata: sata_rcar: Fix DMA boundary mask
    mtd: lpddr: Fix bad logic in print_drs_error
    p54: avoid accessing the data mapped to streaming DMA
  * fuse: fix page dereference after free
      fs/fuse/dev.c
    arch/x86/amd/ibs: Fix re-arming IBS Fetch
    tipc: fix memory leak caused by tipc_buf_append()
    ravb: Fix bit fields checking in ravb_hwtstamp_get()
    efivarfs: Replace invalid slashes with exclamation marks in dentries.
    powerpc/powernv/opal-dump : Use IRQ_HANDLED instead of numbers in interrupt handler
  * scripts/setlocalversion: make git describe output more reliable
      scripts/setlocalversion
    SUNRPC: ECONNREFUSED should cause a rebind.
  * ANDROID: Temporarily disable XFRM_USER_COMPAT filtering
      net/xfrm/xfrm_state.c
      net/xfrm/xfrm_user.c
  * BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
      include/net/xfrm.h
      net/xfrm/xfrm_state.c
  * BACKPORT: xfrm/compat: Add 32=>64-bit messages translator
      include/net/xfrm.h
      net/xfrm/Kconfig
      net/xfrm/xfrm_user.c
  * UPSTREAM: xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
      net/xfrm/xfrm_user.c
  * BACKPORT: xfrm/compat: Add 64=>32-bit messages translator
      include/net/xfrm.h
      net/xfrm/xfrm_user.c
  * BACKPORT: xfrm: Provide API to register translator module
      include/net/xfrm.h
      net/xfrm/Kconfig
      net/xfrm/Makefile
      net/xfrm/xfrm_state.c
  * UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller
      mm/slub.c
    ANDROID: Publish uncompressed Image on aarch64
  * ANDROID: Makefile: append BUILD_NUMBER to version string when defined
      Makefile

Change-Id: I345c9bde484cf008679253982f61b2a833527c3e
Signed-off-by: Lucas Wei <lucaswei@google.com>
2021-01-25 15:50:07 +08:00

216 lines
5.1 KiB
Bash
Executable File

#!/bin/sh
#
# This scripts adds local version information from the version
# control systems git, mercurial (hg) and subversion (svn).
#
# If something goes wrong, send a mail the kernel build mailinglist
# (see MAINTAINERS) and CC Nico Schottelius
# <nico-linuxsetlocalversion -at- schottelius.org>.
#
#
usage() {
echo "Usage: $0 [--save-scmversion] [srctree]" >&2
exit 1
}
scm_only=false
srctree=.
if test "$1" = "--save-scmversion"; then
scm_only=true
shift
fi
if test $# -gt 0; then
srctree=$1
shift
fi
if test $# -gt 0 -o ! -d "$srctree"; then
usage
fi
_scm_version()
{
local short
short=false
if test "$1" = "--short"; then
short=true
fi
# Check for git and a git repo.
if test -z "$(git rev-parse --show-cdup 2>/dev/null)" &&
head=$(git rev-parse --verify HEAD 2>/dev/null); then
# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
# it, because this version is defined in the top level Makefile.
if [ -z "`git describe --exact-match 2>/dev/null`" ]; then
# If only the short version is requested, don't bother
# running further git commands
if $short; then
echo "+"
return
fi
# If we are past a tagged commit (like
# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
#
# Ensure the abbreviated sha1 has exactly 12
# hex characters, to make the output
# independent of git version, local
# core.abbrev settings and/or total number of
# objects in the current repository - passing
# --abbrev=12 ensures a minimum of 12, and the
# awk substr() then picks the 'g' and first 12
# hex chars.
if atag="$(git describe --abbrev=12 2>/dev/null)"; then
echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),substr($(NF),0,13))}'
# If we don't have a tag at all we print -g{commitish},
# again using exactly 12 hex chars.
else
head="$(echo $head | cut -c1-12)"
printf '%s%s' -g $head
fi
fi
# Is this git on svn?
if git config --get svn-remote.svn.url >/dev/null; then
printf -- '-svn%s' "`git svn find-rev $head`"
fi
# Check for uncommitted changes.
# First, with git-status, but --no-optional-locks is only
# supported in git >= 2.14, so fall back to git-diff-index if
# it fails. Note that git-diff-index does not refresh the
# index, so it may give misleading results. See
# git-update-index(1), git-diff-index(1), and git-status(1).
if {
git --no-optional-locks status -uno --porcelain 2>/dev/null ||
git diff-index --name-only HEAD
} | grep -qvE '^(.. )?scripts/package'; then
printf '%s' -dirty
fi
# All done with git
return
fi
# Check for mercurial and a mercurial repo.
if test -d .hg && hgid=`hg id 2>/dev/null`; then
# Do we have an tagged version? If so, latesttagdistance == 1
if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
id=`hg log -r . --template '{latesttag}'`
printf '%s%s' -hg "$id"
else
tag=`printf '%s' "$hgid" | cut -d' ' -f2`
if [ -z "$tag" -o "$tag" = tip ]; then
id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
printf '%s%s' -hg "$id"
fi
fi
# Are there uncommitted changes?
# These are represented by + after the changeset id.
case "$hgid" in
*+|*+\ *) printf '%s' -dirty ;;
esac
# All done with mercurial
return
fi
# Check for svn and a svn repo.
if rev=`LANG= LC_ALL= LC_MESSAGES=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then
rev=`echo $rev | awk '{print $NF}'`
printf -- '-svn%s' "$rev"
# All done with svn
return
fi
}
scm_version()
{
local git_path res git_all_proj name
cd "$srctree"
if test -e .scmversion; then
cat .scmversion
return
fi
git_all_proj=$(find . -name .git -type d | sort)
if [ ! -z "$git_all_proj" ] ; then
res=""
for git_path in $git_all_proj; do
git_path=${git_path%.git}
name=$(basename ${git_path})
if [ $name = "." ] ; then
name=""
else
name="_$name"
fi
res="$res$name$(cd $git_path;_scm_version)"
done
printf -- '%s' "$res"
else
_scm_version
fi
}
collect_files()
{
local file res
for file; do
case "$file" in
*\~*)
continue
;;
esac
if test -e "$file"; then
res="$res$(cat "$file")"
fi
done
echo "$res"
}
if $scm_only; then
if test ! -e .scmversion; then
res=$(scm_version)
echo "$res" >.scmversion
fi
exit
fi
if test -e include/config/auto.conf; then
. include/config/auto.conf
else
echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
exit 1
fi
# localversion* files in the build and source directory
res="$(collect_files localversion*)"
if test ! "$srctree" -ef .; then
res="$res$(collect_files "$srctree"/localversion*)"
fi
# CONFIG_LOCALVERSION and LOCALVERSION (if set)
res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"
# scm version string if not at a tagged commit
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
# full scm version string
res="$res$(scm_version)"
else
# append a plus sign if the repository is not in a clean
# annotated or signed tagged state (as git describe only
# looks at signed or annotated tags - git tag -a/-s) and
# LOCALVERSION= is not specified
if test "${LOCALVERSION+set}" != "set"; then
scm=$(scm_version --short)
res="$res${scm:++}"
fi
fi
echo "$res"