Merge 5.10.252 into android13-5.10-lts

Changes in 5.10.252
	RDMA/siw: Fix potential NULL pointer dereference in header processing
	RDMA/umad: Reject negative data_len in ib_umad_write
	auxdisplay: arm-charlcd: fix release_mem_region() size
	hfsplus: return error when node already exists in hfs_bnode_create
	i3c: remove i2c board info from i2c_dev_desc
	i3c: Move device name assignment after i3c_bus_init
	fs: add <linux/init_task.h> for 'init_fs'
	gfs2: Add new gfs2_iomap_get helper
	gfs2: Turn gfs2_extent_map into gfs2_{get,alloc}_extent
	gfs2: Replace gfs2_lblk_to_dblk with gfs2_get_extent
	gfs2: Add wrapper for iomap_file_buffered_write
	gfs2: Move the inode glock locking to gfs2_file_buffered_write
	gfs2: Add metapath_dibh helper
	gfs2: Fix use-after-free in iomap inline data write path
	tpm: tpm_i2c_infineon: Fix locality leak on get_burstcount() failure
	tpm: st33zp24: Fix missing cleanup on get_burstcount() error
	btrfs: qgroup: return correct error when deleting qgroup relation item
	md/raid10: fix any_working flag handling in raid10_sync_request
	iomap: fix submission side handling of completion side errors
	PM: wakeup: Handle empty list in wakeup_sources_walk_start()
	PM: sleep: wakeirq: harden dev_pm_clear_wake_irq() against races
	s390/cio: Fix device lifecycle handling in css_alloc_subchannel()
	ARM: VDSO: Patch out __vdso_clock_getres() if unavailable
	crypto: cavium - fix dma_free_coherent() size
	crypto: octeontx - fix dma_free_coherent() size
	hrtimer: Fix trace oddity
	EDAC/altera: Remove IRQF_ONESHOT
	mfd: wm8350-core: Use IRQF_ONESHOT
	sched/rt: Skip currently executing CPU in rto_next_cpu()
	pstore/ram: fix buffer overflow in persistent_ram_save_old()
	EDAC/i5000: Fix snprintf() size calculation in calculate_dimm_size()
	EDAC/i5400: Fix snprintf() limit calculation in calculate_dimm_size()
	clk: qcom: Return correct error code in qcom_cc_probe_by_index()
	arm64: dts: qcom: sdm630: Add qfprom subnodes
	arm64: dts: qcom: sdm630: correct QFPROM byte offsets
	arm64: dts: qcom: sdm630: fix gpu_speed_bin size
	ARM: dts: allwinner: sun5i-a13-utoo-p66: delete "power-gpios" property
	soc: qcom: cmd-db: Use devm_memremap() to fix memory leak in cmd_db_dev_probe
	powerpc/eeh: fix recursive pci_lock_rescan_remove locking in EEH event handling
	ARM: dts: lpc32xx: Set motor PWM #pwm-cells property value to 3 cells
	arm: dts: lpc32xx: add clocks property to Motor Control PWM device tree node
	arm64: dts: amlogic: axg: assign the MMC signal clocks
	arm64: dts: amlogic: gx: assign the MMC signal clocks
	arm64: dts: amlogic: g12: assign the MMC B and C signal clocks
	arm64: dts: amlogic: g12: assign the MMC A signal clock
	arm64: dts: qcom: sdm845-db845c: specify power for WiFi CH1
	smack: /smack/doi must be > 0
	smack: /smack/doi: accept previously used values
	drm/amdgpu: Use explicit VCN instance 0 in SR-IOV init
	regulator: core: Respect off_on_delay at startup
	regulator: core: Fix off_on_delay handling
	regulator: Flag uncontrollable regulators as always_on
	regulator: core: Fix off-on-delay-us for always-on/boot-on regulators
	regulator: core: Use ktime_get_boottime() to determine how long a regulator was off
	regulator: core: Shorten off-on-delay-us for always-on/boot-on by time since booted
	regulator: core: move supply check earlier in set_machine_constraints()
	platform/chrome: cros_ec_lightbar: Fix response size initialization
	spi: tools: Add include folder to .gitignore
	Revert "hwmon: (ibmpex) fix use-after-free in high/low store"
	PCI: mediatek: Fix IRQ domain leak when MSI allocation fails
	PCI: Do not attempt to set ExtTag for VFs
	PCI/portdrv: Fix potential resource leak
	wifi: cfg80211: stop NAN and P2P in cfg80211_leave
	netfilter: nf_conncount: make nf_conncount_gc_list() to disable BH
	netfilter: nf_conncount: increase the connection clean up limit to 64
	netfilter: nf_conncount: fix tracking of connections from localhost
	PCI: Mark 3ware-9650SA Root Port Extended Tags as broken
	iommu/vt-d: Flush cache for PASID table before using it
	nfsd: never defer requests during idmap lookup
	fat: avoid parent link count underflow in rmdir
	tcp: tcp_tx_timestamp() must look at the rtx queue
	wifi: ath10k: sdio: add missing lock protection in ath10k_sdio_fw_crashed_dump()
	PCI: Initialize RCB from pci_configure_device()
	ucount: check for CAP_SYS_RESOURCE using ns_capable_noaudit()
	octeontx2-af: Fix PF driver crash with kexec kernel booting
	bonding: only set speed/duplex to unknown, if getting speed failed
	netfilter: nft_set_hash: fix get operation on big endian
	netfilter: nft_set_rbtree: check for partial overlaps in anonymous sets
	procfs: fix missing RCU protection when reading real_parent in do_task_stat()
	net: atm: fix crash due to unvalidated vcc pointer in sigd_send()
	serial: caif: fix use-after-free in caif_serial ldisc_close()
	ionic: Rate limit unknown xcvr type messages
	RDMA/rtrs: server: remove dead code
	power: supply: act8945a: Fix use-after-free in power_supply_changed()
	power: supply: bq25980: Fix use-after-free in power_supply_changed()
	power: supply: cpcap-battery: Fix use-after-free in power_supply_changed()
	power: supply: goldfish: Fix use-after-free in power_supply_changed()
	power: supply: rt9455: Fix use-after-free in power_supply_changed()
	power: supply: sbs-battery: Fix use-after-free in power_supply_changed()
	power: reset: nvmem-reboot-mode: respect cell size for nvmem_cell_write
	power: supply: bq27xxx: fix wrong errno when bus ops are unsupported
	power: supply: wm97xx_battery: Convert to GPIO descriptor
	power: supply: wm97xx: Fix NULL pointer dereference in power_supply_changed()
	RDMA/rxe: Fix double free in rxe_srq_from_init
	mtd: rawnand: cadence: Fix return type of CDMA send-and-wait helper
	PM: core: Redefine pm_ptr() macro
	PM: core: Add new *_PM_OPS macros, deprecate old ones
	crypto: ccp - Add an S4 restore flow
	RDMA/uverbs: Validate wqe_size before using it in ib_uverbs_post_send
	svcrdma: Add a batch Receive posting mechanism
	svcrdma: Use svc_rdma_refresh_recvs() in wc_receive
	svcrdma: Maintain a Receive water mark
	RDMA/core: Fix a couple of obvious typos in comments
	svcrdma: Remove queue-shortening warnings
	svcrdma: Clean up comment in svc_rdma_accept()
	svcrdma: Increase the per-transport rw_ctx count
	svcrdma: Reduce the number of rdma_rw contexts per-QP
	RDMA/core: add rdma_rw_max_sge() helper for SQ sizing
	RDMA/uverbs: Add __GFP_NOWARN to ib_uverbs_unmarshall_recv() kmalloc
	pNFS: fix a missing wake up while waiting on NFS_LAYOUT_DRAIN
	scsi: csiostor: Fix dereference of null pointer rn
	nvdimm: virtio_pmem: serialize flush requests
	tracing: Remove duplicate ENABLE_EVENT_STR and DISABLE_EVENT_STR macros
	fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe()
	clk: meson: gxbb: Limit the HDMI PLL OD to /4 on GXL/GXM SoCs
	clk: Move clk_{save,restore}_context() to COMMON_CLK section
	clk: qcom: dispcc-sdm845: convert to parent data
	clk: qcom: dispcc-sdm845: Enable parents for pixel clocks
	dmaengine: mediatek: uart-apdma: Fix above 4G addressing TX/RX
	dma: dma-axi-dmac: fix SW cyclic transfers
	staging: greybus: lights: avoid NULL deref
	serial: imx: change SERIAL_IMX_CONSOLE to bool
	serial: SH_SCI: improve "DMA support" prompt
	mmc: core: Initial support for SD express card/host
	misc: rtsx: Add SD Express mode support for RTS5261
	mmc: rtsx_pci_sdmmc: increase power-on settling delay to 5ms
	coresight: etm3x: Fix cpulocked warning on cpuhp
	Revert "mmc: rtsx_pci_sdmmc: increase power-on settling delay to 5ms"
	mfd: arizona: Fix regulator resource leak on wm5102_clear_write_sequencer() failure
	drivers: iio: mpu3050: use dev_err_probe for regulator request
	usb: bdc: fix sleep during atomic
	pinctrl: equilibrium: Fix device node reference leak in pinbank_init()
	ovl: Fix uninit-value in ovl_fill_real
	iio: sca3000: Fix a resource leak in sca3000_probe()
	pinctrl: single: fix refcount leak in pcs_add_gpio_func()
	cpuidle: Skip governor when only one idle state is available
	selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2
	usbb: catc: use correct API for MAC addresses
	net: usb: catc: enable basic endpoint checking
	xen-netback: reject zero-queue configuration from guest
	net/rds: rds_sendmsg should not discard payload_len
	selftests: forwarding: vxlan_bridge_1d: fix test failure with br_netfilter enabled
	netfilter: nf_conntrack_h323: don't pass uninitialised l3num value
	ipv6: fix a race in ip6_sock_set_v6only()
	selftests: forwarding: tc_actions: cleanup temporary files when test is aborted
	selftests: forwarding: tc_actions: Use ncat instead of nc
	macvlan: observe an RCU grace period in macvlan_common_newlink() error path
	bonding: alb: fix UAF in rlb_arp_recv during bond up/down
	apparmor: fix NULL sock in aa_sock_file_perm
	apparmor: fix rlimit for posix cpu timers
	apparmor: fix invalid deref of rawdata when export_binary is unset
	drm/i915/acpi: free _DSM package when no connectors
	btrfs: fix invalid leaf access in btrfs_quota_enable() if ref key not found
	MIPS: Work around LLVM bug when gp is used as global register variable
	ext4: don't cache extent during splitting extent
	ext4: fix memory leak in ext4_ext_shift_extents()
	ata: pata_ftide010: Fix some DMA timings
	SUNRPC: auth_gss: fix memory leaks in XDR decoding error paths
	SUNRPC: fix gss_auth kref leak in gss_alloc_msg error path
	perf callchain: Fix srcline printing with inlines
	rtc: interface: Alarm race handling should not discard preceding error
	audit: add fchmodat2() to change attributes class
	hfsplus: fix volume corruption issue for generic/498
	audit: add missing syscalls to read class
	hfsplus: pretend special inodes as regular files
	minix: Add required sanity checking to minix_check_superblock()
	tools/power cpupower: Reset errno before strtoull()
	s390/purgatory: Add -Wno-default-const-init-unsafe to KBUILD_CFLAGS
	arm64: Add support for TSV110 Spectre-BHB mitigation
	rnbd-srv: Zero the rsp buffer before using it
	x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set
	EFI/CPER: don't dump the entire memory region
	APEI/GHES: ensure that won't go past CPER allocated record
	EFI/CPER: don't go past the ARM processor CPER record buffer
	ACPICA: Abort AML bytecode execution when executing AML_FATAL_OP
	s390/perf: Disable register readout on sampling events
	xenbus: Use .freeze/.thaw to handle xenbus devices
	blk-mq-debugfs: add missing debugfs_mutex in blk_mq_debugfs_register_hctxs()
	sparc: Synchronize user stack on fork and clone
	sparc: don't reference obsolete termio struct for TC* constants
	bpf: verifier improvement in 32bit shift sign extension pattern
	clocksource/drivers/sh_tmu: Always leave device running after probe
	clocksource/drivers/timer-integrator-ap: Add missing Kconfig dependency on OF
	mailbox: bcm-ferxrm-mailbox: Use default primary handler
	pstore: ram_core: fix incorrect success return when vmap() fails
	arm64: tegra: smaug: Add usb-role-switch support
	parisc: Prevent interrupts during reboot
	media: dvb-core: dmxdevfilter must always flush bufs
	media: omap3isp: isp_video_mbus_to_pix/pix_to_mbus fixes
	media: omap3isp: isppreview: always clamp in preview_try_format()
	media: omap3isp: set initial format
	ASoC: wm8962: Add WM8962_ADC_MONOMIX to "3D Coefficients" mask
	ASoC: wm8962: Don't report a microphone if it's shorted to ground on plug
	media: adv7180: fix frame interval in progressive mode
	media: pvrusb2: fix URB leak in pvr2_send_request_ex
	media: solo6x10: Check for out of bounds chip_id
	media: cx25821: Fix a resource leak in cx25821_dev_setup()
	drm: Account property blob allocations to memcg
	hyper-v: Mark inner union in hv_kvp_exchg_msg_value as packed
	virt: vbox: uapi: Mark inner unions in packed structs as packed
	drm/atmel-hlcdc: fix memory leak from the atomic_destroy_state callback
	drm/atmel-hlcdc: fix use-after-free of drm_crtc_commit after release
	HID: multitouch: add eGalaxTouch EXC3188 support
	gpio: aspeed-sgpio: Change the macro to support deferred probe
	spi: spi-mem: Protect dirmap_create() with spi_mem_access_start/end
	ASoC: es8328: Add error unwind in resume
	modpost: Amend ppc64 save/restfpr symnames for -Os build
	jfs: Add missing set_freezable() for freezable kthread
	jfs: nlink overflow in jfs_rename
	dm: remove fake timeout to avoid leak request
	iommu/arm-smmu-v3: Improve CMDQ lock fairness and efficiency
	wifi: libertas: fix WARNING in usb_tx_block
	netfilter: nf_conntrack: Add allow_clash to generic protocol handler
	netfilter: xt_tcpmss: check remaining length before reading optlen
	openrisc: define arch-specific version of nop()
	net: usb: r8152: fix transmit queue timeout
	net/rds: No shortcut out of RDS_CONN_ERROR
	wifi: iwlegacy: add missing mutex protection in il4965_store_tx_power()
	wifi: iwlegacy: add missing mutex protection in il3945_store_measurement()
	ipv4: fib: Annotate access to struct fib_alias.fa_state.
	Bluetooth: hci_conn: use mod_delayed_work for active mode timeout
	Bluetooth: btusb: Add device ID for Realtek RTL8761BU
	octeontx2-af: Workaround SQM/PSE stalls by disabling sticky
	wifi: ath10k: fix lock protection in ath10k_wmi_event_peer_sta_ps_state_chg()
	net: usb: sr9700: remove code to drive nonexistent multicast filter
	vmw_vsock: bypass false-positive Wnonnull warning with gcc-16
	net/rds: Clear reconnect pending bit
	PCI: Mark ASM1164 SATA controller to avoid bus reset
	PCI: Fix pci_slot_lock () device locking
	PCI: Enable ACS after configuring IOMMU for OF platforms
	PCI: Add ACS quirk for Qualcomm Hamoa & Glymur
	PCI: Mark Nvidia GB10 to avoid bus reset
	myri10ge: avoid uninitialized variable use
	nfc: nxp-nci: remove interrupt trigger type
	mailbox: sprd: clear delivery flag before handling TX done
	clk: microchip: core: correct return value on *_get_parent()
	m68k: nommu: fix memmove() with differently aligned src and dest for 68000
	serial: 8250_dw: handle clock enable errors in runtime_resume
	serial: 8250: 8250_omap.c: Clear DMA RX running status only after DMA termination is done
	fix it87_wdt early reboot by reporting running timer
	binder: don't use %pK through printk
	phy: fsl-imx8mq-usb: disable bind/unbind platform driver feature
	Revert "mfd: da9052-spi: Change read-mask to write-mask"
	iio: magnetometer: Remove IRQF_ONESHOT
	MIPS: Loongson: Make cpumask_of_node() robust against NUMA_NO_NODE
	include: uapi: netfilter_bridge.h: Cover for musl libc
	ARM: 9467/1: mm: Don't use %pK through printk
	drm/amd/display: Avoid updating surface with the same surface under MPO
	drm/amdgpu: Add HAINAN clock adjustment
	drm/radeon: Add HAINAN clock adjustment
	ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access
	ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut
	xfrm6: fix uninitialized saddr in xfrm6_get_saddr()
	net: usb: kaweth: remove TX queue manipulation in kaweth_set_rx_mode
	lan78xx: Remove unused pause frame queue
	lan78xx: Fix race condition in disconnect handling
	lan78xx: Fix memory allocation bug
	net: usb: lan78xx: scan all MDIO addresses on LAN7801
	wifi: cfg80211: wext: fix IGTK key ID off-by-one
	Bluetooth: L2CAP: Fix invalid response to L2CAP_ECRED_RECONF_REQ
	Bluetooth: L2CAP: Fix response to L2CAP_ECRED_CONN_REQ
	Bluetooth: Enforce key size of 16 bytes on FIPS level
	Bluetooth: l2cap: Check encryption key size on incoming connection
	Bluetooth: L2CAP: Fix not checking l2cap_chan security level
	Bluetooth: L2CAP: Fix missing key size check for L2CAP_LE_CONN_REQ
	RDMA/core: device: Fix formatting in worthy kernel-doc header and demote another
	RDMA/core: Fix stale RoCE GIDs during netdev events at registration
	net: wan: farsync: Fix use-after-free bugs caused by unfinished tasklets
	RDMA/efa: Fix typo in efa_alloc_mr()
	net: usb: pegasus: enable basic endpoint checking
	net: consume xmit errors of GSO frames
	netfilter: nf_conntrack_h323: fix OOB read in decode_choice()
	rpmsg: core: fix race in driver_override_show() and use core helper
	fpga: dfl: use subsys_initcall to allow built-in drivers to be added
	dm-verity: correctly handle dm_bufio_client_create() failure
	media: mtk-mdp: Fix error handling in probe function
	media: mtk-mdp: Fix a reference leak bug in mtk_mdp_remove()
	HID: hid-pl: handle probe errors
	HID: magicmouse: Do not crash on missing msc->input
	HID: prodikeys: Check presence of pm->input_ep82
	HID: logitech-hidpp: Check maxfield in hidpp_get_report_length()
	media: radio-keene: fix memory leak in error path
	media: cx88: Add missing unmap in snd_cx88_hw_params()
	media: cx23885: Add missing unmap in snd_cx23885_hw_params()
	media: cx25821: Add missing unmap in snd_cx25821_hw_params()
	media: i2c/tw9903: Fix potential memory leak in tw9903_probe()
	media: i2c/tw9906: Fix potential memory leak in tw9906_probe()
	dm-integrity: fix a typo in the code for write/discard race
	dm: clear cloned request bio pointer when last clone bio completes
	soc: ti: k3-socinfo: Fix regmap leak on probe failure
	soc: ti: pruss: Fix double free in pruss_clk_mux_setup()
	clk: tegra: tegra124-emc: Fix potential memory leak in tegra124_clk_register_emc()
	dm-unstripe: fix mapping bug when there are multiple targets in a table
	arm64: dts: rockchip: Do not enable hdmi_sound node on Pinebook Pro
	media: venus: vdec: fix error state assignment for zero bytesused
	drm: of: drm_of_panel_bridge_remove(): fix device_node leak
	mm, page_alloc, thp: prevent reclaim for __GFP_THISNODE THP allocations
	selftests/mm/charge_reserved_hugetlb: drop mount size for hugetlbfs
	xfs: mark data structures corrupt on EIO and ENODATA
	iommu/vt-d: Flush dev-IOTLB only when PCIe device is accessible in scalable mode
	xfs: delete attr leaf freemap entries when empty
	xfs: fix freemap adjustments when adding xattrs to leaf blocks
	xfs: fix remote xattr valuelblk check
	md/bitmap: fix GPF in write_page caused by resize race
	nfsd: fix return error code for nfsd_map_name_to_[ug]id
	usb: gadget: tegra-xudc: Add handling for BLCG_COREPLL_PWRDN
	bus: fsl-mc: fix an error handling in fsl_mc_device_add()
	dm mpath: make pg_init_delay_msecs settable
	iio: gyro: itg3200: Fix unchecked return value in read_raw
	rapidio: replace rio_free_net() with kfree() in rio_scan_alloc_net()
	ocfs2: fix reflink preserve cleanup issue
	kexec: derive purgatory entry from symbol
	Revert "PCI/IOV: Add PCI rescan-remove locking when enabling/disabling SR-IOV"
	PCI/IOV: Fix race between SR-IOV enable/disable and hotplug
	btrfs: continue trimming remaining devices on failure
	usb: dwc2: fix resume failure if dr_mode is host
	tipc: fix RCU dereference race in tipc_aead_users_dec()
	drm/amdkfd: Fix out-of-bounds write in kfd_event_page_set()
	net: cpsw_new: Fix unnecessary netdev unregistration in cpsw_probe() error path
	PCI: Fix pci_slot_trylock() error handling
	parisc: kernel: replace kfree() with put_device() in create_tree_node()
	MIPS: rb532: Fix MMIO UART resource registration
	ceph: supply snapshot context in ceph_zero_partial_object()
	net: ethernet: marvell: skge: remove incorrect conflicting PCI ID
	net: wan/fsl_ucc_hdlc: Fix dma_free_coherent() in uhdlc_memclean()
	net: intel: fix PCI device ID conflict between i40e and ipw2200
	atm: fore200e: fix use-after-free in tasklets during device removal
	fbdev: vt8500lcdfb: fix missing dma_free_coherent()
	fbdev: of: display_timing: fix refcount leak in of_get_display_timings()
	fbdev: ffb: fix corrupted video output on Sun FFB1
	net: ethernet: ec_bhf: Fix dma_free_coherent() dma handle
	drm/amdgpu: keep vga memory on MacBooks with switchable graphics
	NTB: ntb_transport: Fix too small buffer for debugfs_name
	Linux 5.10.252

Change-Id: I1fe5055b42385aaa3f7c5472a17baff682d56dcb
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
tree: 0d68f46a52d18704627ae15152020b5891993a88
  1. android/
  2. arch/
  3. block/
  4. certs/
  5. crypto/
  6. Documentation/
  7. drivers/
  8. fs/
  9. include/
  10. init/
  11. io_uring/
  12. ipc/
  13. kernel/
  14. lib/
  15. LICENSES/
  16. mm/
  17. net/
  18. samples/
  19. scripts/
  20. security/
  21. sound/
  22. tools/
  23. usr/
  24. virt/
  25. .clang-format
  26. .cocciconfig
  27. .get_maintainer.ignore
  28. .gitattributes
  29. .gitignore
  30. .mailmap
  31. BUILD.bazel
  32. build.config.aarch64
  33. build.config.allmodconfig
  34. build.config.allmodconfig.aarch64
  35. build.config.allmodconfig.arm
  36. build.config.allmodconfig.x86_64
  37. build.config.amlogic
  38. build.config.arm
  39. build.config.common
  40. build.config.constants
  41. build.config.db845c
  42. build.config.gki
  43. build.config.gki-debug.aarch64
  44. build.config.gki-debug.x86_64
  45. build.config.gki.aarch64
  46. build.config.gki.aarch64.fips140
  47. build.config.gki.x86_64
  48. build.config.gki_kasan
  49. build.config.gki_kasan.aarch64
  50. build.config.gki_kasan.x86_64
  51. build.config.gki_kprobes
  52. build.config.gki_kprobes.aarch64
  53. build.config.gki_kprobes.x86_64
  54. build.config.hikey960
  55. build.config.khwasan
  56. build.config.rockchip
  57. build.config.rockpi4
  58. build.config.x86_64
  59. COPYING
  60. CREDITS
  61. Kbuild
  62. Kconfig
  63. MAINTAINERS
  64. Makefile
  65. OWNERS
  66. README
  67. README.md
README.md

How do I submit patches to Android Common Kernels

  1. BEST: Make all of your changes to upstream Linux. If appropriate, backport to the stable releases. These patches will be merged automatically in the corresponding common kernels. If the patch is already in upstream Linux, post a backport of the patch that conforms to the patch requirements below.

    • Do not send patches upstream that contain only symbol exports. To be considered for upstream Linux, additions of EXPORT_SYMBOL_GPL() require an in-tree modular driver that uses the symbol -- so include the new driver or changes to an existing driver in the same patchset as the export.
    • When sending patches upstream, the commit message must contain a clear case for why the patch is needed and beneficial to the community. Enabling out-of-tree drivers or functionality is not not a persuasive case.
  2. LESS GOOD: Develop your patches out-of-tree (from an upstream Linux point-of-view). Unless these are fixing an Android-specific bug, these are very unlikely to be accepted unless they have been coordinated with kernel-team@android.com. If you want to proceed, post a patch that conforms to the patch requirements below.

Common Kernel patch requirements

  • All patches must conform to the Linux kernel coding standards and pass script/checkpatch.pl
  • Patches shall not break gki_defconfig or allmodconfig builds for arm, arm64, x86, x86_64 architectures (see https://source.android.com/setup/build/building-kernels)
  • If the patch is not merged from an upstream branch, the subject must be tagged with the type of patch: UPSTREAM:, BACKPORT:, FROMGIT:, FROMLIST:, or ANDROID:.
  • All patches must have a Change-Id: tag (see https://gerrit-review.googlesource.com/Documentation/user-changeid.html)
  • If an Android bug has been assigned, there must be a Bug: tag.
  • All patches must have a Signed-off-by: tag by the author and the submitter

Additional requirements are listed below based on patch type

Requirements for backports from mainline Linux: UPSTREAM:, BACKPORT:

  • If the patch is a cherry-pick from Linux mainline with no changes at all
    • tag the patch subject with UPSTREAM:.
    • add upstream commit information with a (cherry picked from commit ...) line
    • Example:
      • if the upstream commit message is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>
  • then Joe Smith would upload the patch for the common kernel as
        UPSTREAM: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry picked from commit c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch requires any changes from the upstream version, tag the patch with BACKPORT: instead of UPSTREAM:.
    • use the same tags as UPSTREAM:
    • add comments about the changes under the (cherry picked from commit ...) line
    • Example:
        BACKPORT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry picked from commit c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        [joe: Resolved minor conflict in drivers/foo/bar.c ]
        Signed-off-by: Joe Smith <joe.smith@foo.org>

Requirements for other backports: FROMGIT:, FROMLIST:,

  • If the patch has been merged into an upstream maintainer tree, but has not yet been merged into Linux mainline
    • tag the patch subject with FROMGIT:
    • add info on where the patch came from as (cherry picked from commit <sha1> <repo> <branch>). This must be a stable maintainer branch (not rebased, so don't use linux-next for example).
    • if changes were required, use BACKPORT: FROMGIT:
    • Example:
      • if the commit message in the maintainer tree is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>
  • then Joe Smith would upload the patch for the common kernel as
        FROMGIT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        (cherry picked from commit 878a2fd9de10b03d11d2f622250285c7e63deace
         https://git.kernel.org/pub/scm/linux/kernel/git/foo/bar.git test-branch)
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch has been submitted to LKML, but not accepted into any maintainer tree
    • tag the patch subject with FROMLIST:
    • add a Link: tag with a link to the submittal on lore.kernel.org
    • add a Bug: tag with the Android bug (required for patches not accepted into a maintainer tree)
    • if changes were required, use BACKPORT: FROMLIST:
    • Example:
        FROMLIST: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Link: https://lore.kernel.org/lkml/20190619171517.GA17557@someone.com/
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>

Requirements for Android-specific patches: ANDROID:

  • If the patch is fixing a bug to Android-specific code
    • tag the patch subject with ANDROID:
    • add a Fixes: tag that cites the patch with the bug
    • Example:
        ANDROID: fix android-specific bug in foobar.c

        This is the detailed description of the important fix

        Fixes: 1234abcd2468 ("foobar: add cool feature")
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch is a new feature
    • tag the patch subject with ANDROID:
    • add a Bug: tag with the Android bug (required for android-specific features)