[PATCH v6 2/5] mm: hugetlbfs: fix cannot migrate the fallocated HugeTLB page

2021-01-15 Thread Muchun Song
If a new hugetlb page is allocated during fallocate it will not be marked as active (set_page_huge_active) which will result in a later isolate_huge_page failure when the page migration code would like to move that page. Such a failure would be unexpected and wrong. Only export set_page_huge_activ

[PATCH net-next 6/7] net: ipa: clean up interconnect initialization

2021-01-15 Thread Alex Elder
Pass an the address of an IPA interconnect structure and its configuration data to ipa_interconnect_init_one() and have that function initialize all the structure's fields. Change the function to simply return an error code. Introduce ipa_interconnect_exit_one() to encapsulate the cleanup of an I

[PATCH v6 4/5] mm: hugetlb: fix a race between isolating and freeing page

2021-01-15 Thread Muchun Song
There is a race between isolate_huge_page() and __free_huge_page(). CPU0: CPU1: if (PageHuge(page)) put_page(page) __free_huge_page(page)

[PATCH v6 5/5] mm: hugetlb: remove VM_BUG_ON_PAGE from page_huge_active

2021-01-15 Thread Muchun Song
The page_huge_active() can be called from scan_movable_pages() which do not hold a reference count to the HugeTLB page. So when we call page_huge_active() from scan_movable_pages(), the HugeTLB page can be freed parallel. Then we will trigger a BUG_ON which is in the page_huge_active() when CONFIG_

[PATCH v6 0/5] Fix some bugs about HugeTLB code

2021-01-15 Thread Muchun Song
This patch series aims to fix some bugs and add some improvements. Changelog since v5 -> v6: - Simplify patch #3 and update commit changelog. Changelog since v4 -> v5: - Squash "mm: hugetlb: retry dissolve page when hitting race" to "mm: hugetlb: fix a race between freeing and dissolving the

[PATCH net-next 4/7] net: ipa: store average and peak interconnect bandwidth

2021-01-15 Thread Alex Elder
Add fields in the ipa_interconnect structure to hold the average and peak bandwidth values for the interconnect. Pass the configuring data for interconnects to ipa_interconnect_init() so these values can be recorded, and use them when enabling the interconnects. There's no longer any need to keep

[PATCH net-next 1/7] net: ipa: rename interconnect settings

2021-01-15 Thread Alex Elder
Use "bandwidth" rather than "rate" in describing the average and peak values to use for IPA interconnects. They should have been named that way to begin with. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 20 ++-- drivers/net/ipa/ipa_data-sc7180.c | 16 ++

[PATCH net-next 5/7] net: ipa: add interconnect name to configuration data

2021-01-15 Thread Alex Elder
Add the name to the configuration data for each interconnect. Use this information rather than a constant string during initialization. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 6 +++--- drivers/net/ipa/ipa_data-sc7180.c | 3 +++ drivers/net/ipa/ipa_data-sdm845.c | 3 ++

[PATCH v6 1/5] mm: migrate: do not migrate HugeTLB page whose refcount is one

2021-01-15 Thread Muchun Song
All pages isolated for the migration have an elevated reference count and therefore seeing a reference count equal to 1 means that the last user of the page has dropped the reference and the page has became unused and there doesn't make much sense to migrate it anymore. This has been done for regul

[PATCH net-next 3/7] net: ipa: introduce an IPA interconnect structure

2021-01-15 Thread Alex Elder
Rather than having separate pointers for the memory, imem, and config interconnect paths, maintain an array of ipa_interconnect structures each of which contains a pointer to a path. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_clock.c | 59 + 1 file chan

[PATCH 5.4 14/62] octeontx2-af: fix memory leak of lmac and lmac->name

2021-01-15 Thread Greg Kroah-Hartman
From: Colin Ian King [ Upstream commit ac7996d680d8b4a51bb99bbdcee3dc838b985498 ] Currently the error return paths don't kfree lmac and lmac->name leading to some memory leaks. Fix this by adding two error return paths that kfree these objects Addresses-Coverity: ("Resource leak") Fixes: 1463f

[PATCH 5.4 58/62] net: mvpp2: disable force link UP during port init procedure

2021-01-15 Thread Greg Kroah-Hartman
From: Stefan Chulski commit 87508224485323ce2d4e7fb929ec80f51adcc238 upstream. Force link UP can be enabled by bootloader during tftpboot and breaks NFS support. Force link UP disabled during port init procedure. Fixes: f84bf386f395 ("net: mvpp2: initialize the GoP") Signed-off-by: Stefan Chuls

Re: [PATCH v3 02/21] x86/fpu/xstate: Modify state copy helpers to handle both static and dynamic buffers

2021-01-15 Thread Borislav Petkov
On Wed, Dec 23, 2020 at 07:56:58AM -0800, Chang S. Bae wrote: > In preparation for dynamic xstate buffer expansion, update the xstate > copy function parameters to equally handle static in-line buffer, as well > as dynamically allocated xstate buffer. This is repeated from the previous patch. I'm

[PATCH 5.4 17/62] s390/qeth: fix L2 header access in qeth_l3_osa_features_check()

2021-01-15 Thread Greg Kroah-Hartman
From: Julian Wiedmann [ Upstream commit f9c4845385c8f6631ebd5dddfb019ea7a285fba4 ] ip_finish_output_gso() may call .ndo_features_check() even before the skb has a L2 header. This conflicts with qeth_get_ip_version()'s attempt to inspect the L2 header via vlan_eth_hdr(). Switch to vlan_get_proto

[PATCH 5.4 15/62] nexthop: Fix off-by-one error in error path

2021-01-15 Thread Greg Kroah-Hartman
From: Ido Schimmel [ Upstream commit 07e61a979ca4dddb3661f59328b3cd109f6b0070 ] A reference was not taken for the current nexthop entry, so do not try to put it in the error path. Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Signed-off-by: Ido Schimmel Reviewed-by: Petr Mach

[PATCH 5.4 56/62] wan: ds26522: select CONFIG_BITREVERSE

2021-01-15 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 69931e11288520c250152180ecf9b6ac5e6e40ed upstream. Without this, the driver runs into a link failure arm-linux-gnueabi-ld: drivers/net/wan/slic_ds26522.o: in function `slic_ds26522_probe': slic_ds26522.c:(.text+0x100c): undefined reference to `byte_rev_table' arm-lin

Re: [PATCH 1/4] tracing: add error_report trace points

2021-01-15 Thread Alexander Potapenko
On Thu, Jan 14, 2021 at 3:52 PM Steven Rostedt wrote: > > On Thu, 14 Jan 2021 08:49:57 +0100 > Alexander Potapenko wrote: > > > We'll need to explicitly list the enum values once again in > > __print_symbolic(), right? E.g.: > > > > enum debugging_tool { > > TOOL_KFENCE, > > TOO

[PATCH 5.4 42/62] i2c: i801: Fix the i2c-mux gpiod_lookup_table not being properly terminated

2021-01-15 Thread Greg Kroah-Hartman
From: Hans de Goede commit 0b3ea2a06de1f52ea30865e227e109a5fd3b6214 upstream. gpiod_add_lookup_table() expects the gpiod_lookup_table->table passed to it to be terminated with a zero-ed out entry. So we need to allocate one more entry then we will use. Fixes: d308dfbf62ef ("i2c: mux/i801: Swit

OK.........................

2021-01-15 Thread Mohammed Saad
Dear Friend, An oil business man made a fixed deposit of €15 MILLION Euros in my bank branch where I am a director and he died with his entire family in a plane crash leaving behind no next of kin. I Propose to present you as next of kin to claim the funds,if interested contact me with your full

[PATCH 5.4 36/62] can: tcan4x5x: fix bittiming const, use common bittiming from m_can driver

2021-01-15 Thread Greg Kroah-Hartman
From: Marc Kleine-Budde commit aee2b3ccc8a63d1cd7da6a8a153d1f3712d40826 upstream. According to the TCAN4550 datasheet "SLLSF91 - DECEMBER 2018" the tcan4x5x has the same bittiming constants as a m_can revision 3.2.x/3.3.0. The tcan4x5x chip I'm using identifies itself as m_can revision 3.2.1, s

[PATCH 5.4 54/62] net/mlx5e: Fix two double free cases

2021-01-15 Thread Greg Kroah-Hartman
From: Dinghao Liu commit 7a6eb072a9548492ead086f3e820e9aac71c7138 upstream. mlx5e_create_ttc_table_groups() frees ft->g on failure of kvzalloc(), but such failure will be caught by its caller in mlx5e_create_ttc_table() and ft->g will be freed again in mlx5e_destroy_flow_table(). The same issue

[PATCH 5.4 41/62] spi: stm32: FIFO threshold level - fix align packet size

2021-01-15 Thread Greg Kroah-Hartman
From: Roman Guskov commit a590370d918fc66c62df6620445791fbe840344a upstream. if cur_bpw <= 8 and xfer_len < 4 then the value of fthlv will be 1 and SPI registers content may have been lost. * If SPI data register is accessed as a 16-bit register and DSIZE <= 8bit, better to select FTHLV = 2,

[PATCH 5.4 34/62] i2c: sprd: use a specific timeout to avoid system hang up issue

2021-01-15 Thread Greg Kroah-Hartman
From: Chunyan Zhang commit 0b884fe71f9ee6a5df35e677154256ea2099ebb8 upstream. If the i2c device SCL bus being pulled up due to some exception before message transfer done, the system cannot receive the completing interrupt signal any more, it would not exit waiting loop until MAX_SCHEDULE_TIMEOU

[PATCH 5.4 45/62] dmaengine: xilinx_dma: fix incompatible param warning in _child_probe()

2021-01-15 Thread Greg Kroah-Hartman
From: Shravya Kumbham commit faeb0731be0a31e2246b21a85fa7dabbd750101d upstream. In xilinx_dma_child_probe function, the nr_channels variable is passed to of_property_read_u32() which expects an u32 return value pointer. Modify the nr_channels variable type from int to u32 to fix the incompatible

[PATCH 5.4 38/62] can: kvaser_pciefd: select CONFIG_CRC32

2021-01-15 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 1d48595c786b1b9dc6be301e8d7f6fc74e9882aa upstream. Without crc32, this driver fails to link: arm-linux-gnueabi-ld: drivers/net/can/kvaser_pciefd.o: in function `kvaser_pciefd_probe': kvaser_pciefd.c:(.text+0x2b0): undefined reference to `crc32_be' Fixes: 26ad340e582

[PATCH 5.4 18/62] net: dsa: lantiq_gswip: Exclude RMII from modes that report 1 GbE

2021-01-15 Thread Greg Kroah-Hartman
From: Aleksander Jan Bajkowski [ Upstream commit 3545454c7801e391b0d966f82c98614d45394770 ] Exclude RMII from modes that report 1 GbE support. Reduced MII supports up to 100 MbE. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Aleksander Jan Bajkowski

[PATCH 5.4 37/62] can: m_can: m_can_class_unregister(): remove erroneous m_can_clk_stop()

2021-01-15 Thread Greg Kroah-Hartman
From: Marc Kleine-Budde commit c4aec381ab98c9189d47b935832541d520f1f67f upstream. In m_can_class_register() the clock is started, but stopped on exit. When calling m_can_class_unregister(), the clock is stopped a second time. This patch removes the erroneous m_can_clk_stop() in m_can_class_unr

[PATCH 5.4 39/62] cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get()

2021-01-15 Thread Greg Kroah-Hartman
From: Colin Ian King commit 943bdd0cecad06da8392a33093230e30e501eccc upstream. Currently there is an unlikely case where cpufreq_cpu_get() returns a NULL policy and this will cause a NULL pointer dereference later on. Fix this by passing the policy to transition_frequency_fidvid() from the call

[PATCH 5.4 24/62] chtls: Replace skb_dequeue with skb_peek

2021-01-15 Thread Greg Kroah-Hartman
From: Ayush Sawal [ Upstream commit a84b2c0d5fa23da6d6c8c0d5f5c93184a2744d3e ] The skb is unlinked twice, one in __skb_dequeue in function chtls_reset_synq() and another in cleanup_syn_rcv_conn(). So in this patch using skb_peek() instead of __skb_dequeue(), so that unlink will be handled only i

[PATCH 5.4 35/62] dmaengine: dw-edma: Fix use after free in dw_edma_alloc_chunk()

2021-01-15 Thread Greg Kroah-Hartman
From: Dan Carpenter commit 595a334148449bd1d27cf5d6fcb3b0d718cb1b9f upstream. If the dw_edma_alloc_burst() function fails then we free "chunk" but it's still on the "desc->chunk->list" list so it will lead to a use after free. Also the "->chunks_alloc" count is incremented when it shouldn't be.

Re: [PATCH v10 0/8] IMA: support for measuring kernel integrity critical data

2021-01-15 Thread Mimi Zohar
On Thu, 2021-01-07 at 20:07 -0800, Tushar Sugandhi wrote: > IMA measures files and buffer data such as keys, command-line arguments > passed to the kernel on kexec system call, etc. While these measurements > are necessary for monitoring and validating the integrity of the system, > they are not s

[PATCH 5.4 13/62] net: ip: always refragment ip defragmented packets

2021-01-15 Thread Greg Kroah-Hartman
From: Florian Westphal [ Upstream commit bb4cc1a18856a73f0ff5137df0c2a31f4c50f6cf ] Conntrack reassembly records the largest fragment size seen in IPCB. However, when this gets forwarded/transmitted, fragmentation will only be forced if one of the fragmented packets had the DF bit set. In that

[PATCH 5.4 30/62] vmlinux.lds.h: Add PGO and AutoFDO input sections

2021-01-15 Thread Greg Kroah-Hartman
From: Nick Desaulniers commit eff8728fe69880d3f7983bec3fb6cea4c306261f upstream. Basically, consider .text.{hot|unlikely|unknown}.* part of .text, too. When compiling with profiling information (collected via PGO instrumentations or AutoFDO sampling), Clang will separate code into .text.hot, .t

[PATCH 5.4 28/62] x86/resctrl: Dont move a task to the same resource group

2021-01-15 Thread Greg Kroah-Hartman
From: Fenghua Yu commit a0195f314a25582b38993bf30db11c300f4f4611 upstream Shakeel Butt reported in [1] that a user can request a task to be moved to a resource group even if the task is already in the group. It just wastes time to do the move operation which could be costly to send IPI to a diff

[PATCH 5.4 27/62] x86/resctrl: Use an IPI instead of task_work_add() to update PQR_ASSOC MSR

2021-01-15 Thread Greg Kroah-Hartman
From: Fenghua Yu commit ae28d1aae48a1258bd09a6f707ebb4231d79a761 upstream Currently, when moving a task to a resource group the PQR_ASSOC MSR is updated with the new closid and rmid in an added task callback. If the task is running, the work is run as soon as possible. If the task is not running

[PATCH 5.4 32/62] HID: wacom: Fix memory leakage caused by kfifo_alloc

2021-01-15 Thread Greg Kroah-Hartman
From: Ping Cheng commit 37309f47e2f5674f3e86cb765312ace42cfcedf5 upstream. As reported by syzbot below, kfifo_alloc'd memory would not be freed if a non-zero return value is triggered in wacom_probe. This patch creates and uses devm_kfifo_alloc to allocate and free itself. BUG: memory leak unre

[PATCH 5.4 31/62] iio: imu: st_lsm6dsx: fix edge-trigger interrupts

2021-01-15 Thread Greg Kroah-Hartman
From: Lorenzo Bianconi commit 3f9bce7a22a3f8ac9d885c9d75bc45569f24ac8b upstream If we are using edge IRQs, new samples can arrive while processing current interrupt since there are no hw guarantees the irq line stays "low" long enough to properly detect the new interrupt. In this case the new sa

[PATCH 5.4 07/62] net: stmmac: dwmac-sun8i: Balance internal PHY power

2021-01-15 Thread Greg Kroah-Hartman
From: Samuel Holland [ Upstream commit b8239638853e3e37b287e4bd4d57b41f14c78550 ] sun8i_dwmac_exit calls sun8i_dwmac_unpower_internal_phy, but sun8i_dwmac_init did not call sun8i_dwmac_power_internal_phy. This caused PHY power to remain off after a suspend/resume cycle. Fix this by recording if

[PATCH 5.4 08/62] net: vlan: avoid leaks on register_vlan_dev() failures

2021-01-15 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 55b7ab1178cbf41f979ff83236d3321ad35ed2ad ] VLAN checks for NETREG_UNINITIALIZED to distinguish between registration failure and unregistration in progress. Since commit cb626bf566eb ("net-sysfs: Fix reference count leak") registration failure may, however,

[PATCH 5.4 05/62] net: hns3: fix a phy loopback fail issue

2021-01-15 Thread Greg Kroah-Hartman
From: Yonglong Liu [ Upstream commit f04bbcbf1e38d192e94bbfa126731a52332c40b1 ] When phy driver does not implement the set_loopback interface, phy loopback test will return -EOPNOTSUPP, and the loopback test will fail. So when phy driver does not implement the set_loopback interface, don't do ph

[PATCH 4.19 34/43] lightnvm: select CONFIG_CRC32

2021-01-15 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 19cd3403cb0d522dd5e10188eef85817de29e26e upstream. Without CRC32 support, this fails to link: arm-linux-gnueabi-ld: drivers/lightnvm/pblk-init.o: in function `pblk_init': pblk-init.c:(.text+0x2654): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/light

[PATCH 5.4 23/62] chtls: Fix panic when route to peer not configured

2021-01-15 Thread Greg Kroah-Hartman
From: Ayush Sawal [ Upstream commit 5a5fac9966bb6d513198634b0b1357be7e8447d2 ] If route to peer is not configured, we might get non tls devices from dst_neigh_lookup() which is invalid, adding a check to avoid it. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Ro

[PATCH 4.19 25/43] i2c: sprd: use a specific timeout to avoid system hang up issue

2021-01-15 Thread Greg Kroah-Hartman
From: Chunyan Zhang commit 0b884fe71f9ee6a5df35e677154256ea2099ebb8 upstream. If the i2c device SCL bus being pulled up due to some exception before message transfer done, the system cannot receive the completing interrupt signal any more, it would not exit waiting loop until MAX_SCHEDULE_TIMEOU

[PATCH 5.4 12/62] net: fix pmtu check in nopmtudisc mode

2021-01-15 Thread Greg Kroah-Hartman
From: Florian Westphal [ Upstream commit 50c661670f6a3908c273503dfa206dfc7aa54c07 ] For some reason ip_tunnel insist on setting the DF bit anyway when the inner header has the DF bit set, EVEN if the tunnel was configured with 'nopmtudisc'. This means that the script added in the previous commi

[PATCH 4.19 33/43] block: rsxx: select CONFIG_CRC32

2021-01-15 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 36a106a4c1c100d55ba3d32a21ef748cfcd4fa99 upstream. Without crc32, the driver fails to link: arm-linux-gnueabi-ld: drivers/block/rsxx/config.o: in function `rsxx_load_config': config.c:(.text+0x124): undefined reference to `crc32_le' Fixes: 8722ff8cdbfa ("block: IBM

drivers/net/ethernet/sfc/farch.c:1257:5: warning: stack frame size of 1072 bytes in function 'efx_farch_ev_process'

2021-01-15 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5ee88057889bbca5f5bb96031b62b3756b33e164 commit: 35ff765f8d508e56d09ef470395324298550c415 sfc: fix W=1 warnings in efx_farch_handle_rx_not_ok date: 5 months ago config: powerpc64-randconfig-r025-20210115

[PATCH 5.4 06/62] net: stmmac: dwmac-sun8i: Balance internal PHY resource references

2021-01-15 Thread Greg Kroah-Hartman
From: Samuel Holland [ Upstream commit 529254216773acd5039c07aa18cf06fd1f9fccdd ] While stmmac_pltfr_remove calls sun8i_dwmac_exit, the sun8i_dwmac_init and sun8i_dwmac_exit functions are also called by the stmmac_platform suspend/resume callbacks. They may be called many times during the device

[PATCH 5.4 02/62] vfio iommu: Add dma available capability

2021-01-15 Thread Greg Kroah-Hartman
From: Matthew Rosato [ Upstream commit 7d6e1329652ed971d1b6e0e7bea66fba5044e271 ] The following functional changes were needed for backport: - vfio_iommu_type1_get_info doesn't exist, call vfio_iommu_dma_avail_build_caps from vfio_iommu_type1_ioctl. - As further fallout from this, vfio_iommu_d

[PATCH 02/10] drm: Rename plane atomic_check state names

2021-01-15 Thread Maxime Ripard
Most drivers call the argument to the plane atomic_check hook simply state, which is going to conflict with the global atomic state in a later rework. Let's rename it to new_plane_state (or new_state depending on the convention used in the driver). This was done using the coccinelle script below,

[PATCH 05/10] drm: Use the state pointer directly in planes atomic_check

2021-01-15 Thread Maxime Ripard
Now that atomic_check takes the global atomic state as a parameter, we don't need to go through the pointer in the plane state. This was done using the following coccinelle script: @ plane_atomic_func @ identifier helpers; identifier func; @@ static struct drm_plane_helper_funcs helpers = {

[PATCH 04/10] drm/atomic: Pass the full state to planes atomic_check

2021-01-15 Thread Maxime Ripard
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's start convert all the remaining helpers to provide a consiste

[PATCH 03/10] drm/atmel-hlcdc: Rename custom plane state variable

2021-01-15 Thread Maxime Ripard
Subsequent reworks will pass the global atomic state in the function prototype, and atomic_check and atomic_update already have such a variable already. Let's change them to ease the rework. Signed-off-by: Maxime Ripard --- .../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 118 +-

[PATCH 06/10] drm: Use state helper instead of plane state pointer in atomic_check

2021-01-15 Thread Maxime Ripard
Many drivers reference the plane->state pointer in order to get the current plane state in their atomic_check hook, which would be the old plane state in the global atomic state since _swap_state hasn't happened when atomic_check is run. Use the drm_atomic_get_old_plane_state helper to get that st

[PATCH 01/10] drm/atomic: Pass the full state to planes async atomic check and update

2021-01-15 Thread Maxime Ripard
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's start convert all the remaining helpers to provide a consiste

[PATCH 4.19 43/43] regmap: debugfs: Fix a reversed if statement in regmap_debugfs_init()

2021-01-15 Thread Greg Kroah-Hartman
From: Dan Carpenter commit f6bcb4c7f366905b66ce8ffca7190118244bb642 upstream. This code will leak "map->debugfs_name" because the if statement is reversed so it only frees NULL pointers instead of non-NULL. In fact the if statement is not required and should just be removed because kfree() acce

[PATCH 10/10] drm: Use state helper instead of the plane state pointer

2021-01-15 Thread Maxime Ripard
Many drivers reference the plane->state pointer in order to get the current plane state in their atomic_update or atomic_disable hooks, which would be the new plane state in the global atomic state since _swap_state happened when those hooks are run. Use the drm_atomic_get_new_plane_state helper t

[PATCH 08/10] drm: Rename plane->state variables in atomic update and disable

2021-01-15 Thread Maxime Ripard
Some drivers are storing the plane->state pointer in atomic_update and atomic_disable in a variable simply called state, while the state passed as an argument is called old_state. In order to ease subsequent reworks and to avoid confusing or inconsistent names, let's rename those variables to new_

[PATCH 4.19 30/43] dmaengine: xilinx_dma: fix incompatible param warning in _child_probe()

2021-01-15 Thread Greg Kroah-Hartman
From: Shravya Kumbham commit faeb0731be0a31e2246b21a85fa7dabbd750101d upstream. In xilinx_dma_child_probe function, the nr_channels variable is passed to of_property_read_u32() which expects an u32 return value pointer. Modify the nr_channels variable type from int to u32 to fix the incompatible

[PATCH 09/10] drm/atomic: Pass the full state to planes atomic disable and update

2021-01-15 Thread Maxime Ripard
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's start convert all the remaining helpers to provide a consiste

[PATCH 07/10] drm: Store new plane state in a variable for atomic_update and disable

2021-01-15 Thread Maxime Ripard
In order to store the new plane state in a subsequent helper, let's move the plane->state dereferences into a variable. This was done using the following coccinelle script, plus some hand changes for vmwgfx: @ plane_atomic_func @ identifier helpers; identifier func; @@ ( static const struct drm

[PATCH 4.19 22/43] iio: imu: st_lsm6dsx: fix edge-trigger interrupts

2021-01-15 Thread Greg Kroah-Hartman
From: Lorenzo Bianconi commit 3f9bce7a22a3f8ac9d885c9d75bc45569f24ac8b upstream If we are using edge IRQs, new samples can arrive while processing current interrupt since there are no hw guarantees the irq line stays "low" long enough to properly detect the new interrupt. In this case the new sa

[PATCH 4.19 39/43] wan: ds26522: select CONFIG_BITREVERSE

2021-01-15 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 69931e11288520c250152180ecf9b6ac5e6e40ed upstream. Without this, the driver runs into a link failure arm-linux-gnueabi-ld: drivers/net/wan/slic_ds26522.o: in function `slic_ds26522_probe': slic_ds26522.c:(.text+0x100c): undefined reference to `byte_rev_table' arm-lin

[PATCH 4.19 42/43] net: drop bogus skb with CHECKSUM_PARTIAL and offset beyond end of trimmed packet

2021-01-15 Thread Greg Kroah-Hartman
From: Vasily Averin commit 54970a2fbb673f090b7f02d7f57b10b2e0707155 upstream. syzbot reproduces BUG_ON in skb_checksum_help(): tun creates (bogus) skb with huge partial-checksummed area and small ip packet inside. Then ip_rcv trims the skb based on size of internal ip packet, after that csum off

Re: [PATCH v1 0/5] Clock and reset improvements for Tegra ALSA drivers

2021-01-15 Thread Dmitry Osipenko
15.01.2021 13:52, Ben Dooks пишет: > On 12/01/2021 12:58, Dmitry Osipenko wrote: >> This series improves the handling of clock and reset controls of >> NVIDA Tegra ALSA drivers. Tegra HDA and AHUB drivers aren't handling >> resets properly, which needs to be fixed in order to unblock other >> patch

[PATCH 4.19 38/43] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev

2021-01-15 Thread Greg Kroah-Hartman
From: Xiaolei Wang commit cffa4b2122f5f3e53cf3d529bbc74651f95856d5 upstream. After initializing the regmap through syscon_regmap_lookup_by_compatible, then regmap_attach_dev to the device, because the debugfs_name has been allocated, there is no need to redistribute it again unreferenced object

Re: [PATCH] driver core: Extend device_is_dependent()

2021-01-15 Thread Rafael J. Wysocki
On Thu, Jan 14, 2021 at 8:59 PM Saravana Kannan wrote: > > On Thu, Jan 14, 2021 at 11:38 AM Rafael J. Wysocki wrote: > > > > On Thu, Jan 14, 2021 at 8:32 PM Saravana Kannan > > wrote: > > > > > > On Thu, Jan 14, 2021 at 10:41 AM Rafael J. Wysocki > > > wrote: > > > > > > > > From: Rafael J. W

[PATCH 4.19 36/43] net/mlx5e: Fix memleak in mlx5e_create_l2_table_groups

2021-01-15 Thread Greg Kroah-Hartman
From: Dinghao Liu commit 5b0bb12c58ac7d22e05b5bfdaa30a116c8c32e32 upstream. When mlx5_create_flow_group() fails, ft->g should be freed just like when kvzalloc() fails. The caller of mlx5e_create_l2_table_groups() does not catch this issue on failure, which leads to memleak. Fixes: 33cfaaa8f36f

[PATCH 4.19 24/43] ARM: OMAP2+: omap_device: fix idling of devices during probe

2021-01-15 Thread Greg Kroah-Hartman
From: Andreas Kemnade commit ec76c2eea903947202098090bbe07a739b5246e9 upstream. On the GTA04A5 od->_driver_status was not set to BUS_NOTIFY_BIND_DRIVER during probe of the second mmc used for wifi. Therefore omap_device_late_idle idled the device during probing causing oopses when accessing the

[PATCH 4.19 37/43] net/mlx5e: Fix two double free cases

2021-01-15 Thread Greg Kroah-Hartman
From: Dinghao Liu commit 7a6eb072a9548492ead086f3e820e9aac71c7138 upstream. mlx5e_create_ttc_table_groups() frees ft->g on failure of kvzalloc(), but such failure will be caught by its caller in mlx5e_create_ttc_table() and ft->g will be freed again in mlx5e_destroy_flow_table(). The same issue

[PATCH 4.19 20/43] spi: pxa2xx: Fix use-after-free on unbind

2021-01-15 Thread Greg Kroah-Hartman
From: Lukas Wunner commit 5626308bb94d9f930aa5f7c77327df4c6daa7759 upstream pxa2xx_spi_remove() accesses the driver's private data after calling spi_unregister_controller() even though that function releases the last reference on the spi_controller and thereby frees the private data. Fix by swi

[PATCH 4.19 09/43] net: ipv6: fib: flush exceptions when purging route

2021-01-15 Thread Greg Kroah-Hartman
From: Sean Tranchetti [ Upstream commit d8f5c29653c3f6995e8979be5623d263e92f6b86 ] Route removal is handled by two code paths. The main removal path is via fib6_del_route() which will handle purging any PMTU exceptions from the cache, removing all per-cpu copies of the DST entry used by the rout

[PATCH 4.19 17/43] x86/resctrl: Dont move a task to the same resource group

2021-01-15 Thread Greg Kroah-Hartman
From: Fenghua Yu commit a0195f314a25582b38993bf30db11c300f4f4611 upstream Shakeel Butt reported in [1] that a user can request a task to be moved to a resource group even if the task is already in the group. It just wastes time to do the move operation which could be costly to send IPI to a diff

[PATCH 4.19 00/43] 4.19.168-rc1 review

2021-01-15 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.168 release. There are 43 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Sun, 17 Jan 2021 12:19:42 +. Anything re

[PATCH 4.19 02/43] net: hns3: fix the number of queues actually used by ARQ

2021-01-15 Thread Greg Kroah-Hartman
From: Yufeng Mo [ Upstream commit 65e61e3c2a619c4d4b873885b2d5394025ed117b ] HCLGE_MBX_MAX_ARQ_MSG_NUM is used to apply memory for the number of queues used by ARQ(Asynchronous Receive Queue), so the head and tail pointers should also use this macro. Fixes: 07a0556a3a73 ("net: hns3: Changes to

[PATCH 4.19 19/43] drm/i915: Fix mismatch between misplaced vma check and vma insert

2021-01-15 Thread Greg Kroah-Hartman
From: Chris Wilson commit 0e53656ad8abc99e0a80c3de611e593ebbf55829 upstream When inserting a VMA, we restrict the placement to the low 4G unless the caller opts into using the full range. This was done to allow usersapce the opportunity to transition slowly from a 32b address space, and to avoid

[PATCH 4.19 15/43] chtls: Fix chtls resources release sequence

2021-01-15 Thread Greg Kroah-Hartman
From: Ayush Sawal [ Upstream commit 15ef6b0e30b354253e2c10b3836bc59767eb162b ] CPL_ABORT_RPL is sent after releasing the resources by calling chtls_release_resources(sk); and chtls_conn_done(sk); eventually causing kernel panic. Fixing it by calling release in appropriate order. Fixes: cc35c88a

[PATCH 4.19 08/43] net: fix pmtu check in nopmtudisc mode

2021-01-15 Thread Greg Kroah-Hartman
From: Florian Westphal [ Upstream commit 50c661670f6a3908c273503dfa206dfc7aa54c07 ] For some reason ip_tunnel insist on setting the DF bit anyway when the inner header has the DF bit set, EVEN if the tunnel was configured with 'nopmtudisc'. This means that the script added in the previous commi

[PATCH 4.19 35/43] iommu/intel: Fix memleak in intel_irq_remapping_alloc

2021-01-15 Thread Greg Kroah-Hartman
From: Dinghao Liu commit ff2b46d7cff80d27d82f7f3252711f4ca1666129 upstream. When irq_domain_get_irq_data() or irqd_cfg() fails at i == 0, data allocated by kzalloc() has not been freed before returning, which leads to memleak. Fixes: b106ee63abcc ("irq_remapping/vt-d: Enhance Intel IR driver to

[PATCH 4.19 18/43] vmlinux.lds.h: Add PGO and AutoFDO input sections

2021-01-15 Thread Greg Kroah-Hartman
From: Nick Desaulniers commit eff8728fe69880d3f7983bec3fb6cea4c306261f upstream. Basically, consider .text.{hot|unlikely|unknown}.* part of .text, too. When compiling with profiling information (collected via PGO instrumentations or AutoFDO sampling), Clang will separate code into .text.hot, .t

[PATCH 4.19 06/43] net/sonic: Fix some resource leaks in error handling paths

2021-01-15 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 0f7ba7bc46fa0b574ccacf5672991b321e028492 ] A call to dma_alloc_coherent() is wrapped by sonic_alloc_descriptors(). This is correctly freed in the remove function, but not in the error handling path of the probe function. Fix this by adding the missing

[PATCH 4.19 05/43] net: vlan: avoid leaks on register_vlan_dev() failures

2021-01-15 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 55b7ab1178cbf41f979ff83236d3321ad35ed2ad ] VLAN checks for NETREG_UNINITIALIZED to distinguish between registration failure and unregistration in progress. Since commit cb626bf566eb ("net-sysfs: Fix reference count leak") registration failure may, however,

[PATCH 4.19 21/43] iio: imu: st_lsm6dsx: flip irq return logic

2021-01-15 Thread Greg Kroah-Hartman
From: Sean Nyekjaer commit ec76d918f23034f9f662539ca9c64e2ae3ba9fba upstream No need for using reverse logic in the irq return, fix this by flip things around. Signed-off-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.19 13/43] chtls: Replace skb_dequeue with skb_peek

2021-01-15 Thread Greg Kroah-Hartman
From: Ayush Sawal [ Upstream commit a84b2c0d5fa23da6d6c8c0d5f5c93184a2744d3e ] The skb is unlinked twice, one in __skb_dequeue in function chtls_reset_synq() and another in cleanup_syn_rcv_conn(). So in this patch using skb_peek() instead of __skb_dequeue(), so that unlink will be handled only i

[PATCH 4.19 04/43] net: stmmac: dwmac-sun8i: Balance internal PHY power

2021-01-15 Thread Greg Kroah-Hartman
From: Samuel Holland [ Upstream commit b8239638853e3e37b287e4bd4d57b41f14c78550 ] sun8i_dwmac_exit calls sun8i_dwmac_unpower_internal_phy, but sun8i_dwmac_init did not call sun8i_dwmac_power_internal_phy. This caused PHY power to remain off after a suspend/resume cycle. Fix this by recording if

[PATCH 4.19 23/43] HID: wacom: Fix memory leakage caused by kfifo_alloc

2021-01-15 Thread Greg Kroah-Hartman
From: Ping Cheng commit 37309f47e2f5674f3e86cb765312ace42cfcedf5 upstream. As reported by syzbot below, kfifo_alloc'd memory would not be freed if a non-zero return value is triggered in wacom_probe. This patch creates and uses devm_kfifo_alloc to allocate and free itself. BUG: memory leak unre

[PATCH 4.14 19/28] dmaengine: xilinx_dma: fix mixed_enum_type coverity warning

2021-01-15 Thread Greg Kroah-Hartman
From: Shravya Kumbham commit 2d5efea64472469117dc1a9a39530069e95b21e9 upstream. Typecast the fls(width -1) with (enum dmaengine_alignment) in xilinx_dma_chan_probe function to fix the coverity warning. Addresses-Coverity: Event mixed_enum_type. Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Di

[PATCH 4.19 10/43] chtls: Fix hardware tid leak

2021-01-15 Thread Greg Kroah-Hartman
From: Ayush Sawal [ Upstream commit 717df0f4cdc9044c415431a3522b3e9ccca5b4a3 ] send_abort_rpl() is not calculating cpl_abort_req_rss offset and ends up sending wrong TID with abort_rpl WR causng tid leaks. Replaced send_abort_rpl() with chtls_send_abort_rpl() as it is redundant. Fixes: cc35c88a

[PATCH 4.14 26/28] KVM: arm64: Dont access PMCR_EL0 when no PMU is available

2021-01-15 Thread Greg Kroah-Hartman
From: Marc Zyngier commit 2a5f1b67ec577fb1544b563086e0377f095f88e2 upstream. We reset the guest's view of PMCR_EL0 unconditionally, based on the host's view of this register. It is however legal for an implementation not to provide any PMU, resulting in an UNDEF. The obvious fix is to skip the

[PATCH 4.14 21/28] block: rsxx: select CONFIG_CRC32

2021-01-15 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 36a106a4c1c100d55ba3d32a21ef748cfcd4fa99 upstream. Without crc32, the driver fails to link: arm-linux-gnueabi-ld: drivers/block/rsxx/config.o: in function `rsxx_load_config': config.c:(.text+0x124): undefined reference to `crc32_le' Fixes: 8722ff8cdbfa ("block: IBM

[PATCH 4.14 24/28] net/mlx5e: Fix two double free cases

2021-01-15 Thread Greg Kroah-Hartman
From: Dinghao Liu commit 7a6eb072a9548492ead086f3e820e9aac71c7138 upstream. mlx5e_create_ttc_table_groups() frees ft->g on failure of kvzalloc(), but such failure will be caught by its caller in mlx5e_create_ttc_table() and ft->g will be freed again in mlx5e_destroy_flow_table(). The same issue

[PATCH 4.14 22/28] iommu/intel: Fix memleak in intel_irq_remapping_alloc

2021-01-15 Thread Greg Kroah-Hartman
From: Dinghao Liu commit ff2b46d7cff80d27d82f7f3252711f4ca1666129 upstream. When irq_domain_get_irq_data() or irqd_cfg() fails at i == 0, data allocated by kzalloc() has not been freed before returning, which leads to memleak. Fixes: b106ee63abcc ("irq_remapping/vt-d: Enhance Intel IR driver to

Re: [PATCH V2 08/11] coresight: core: Add support for dedicated percpu sinks

2021-01-15 Thread Suzuki K Poulose
On 1/15/21 2:36 AM, Anshuman Khandual wrote: On 1/13/21 3:13 PM, Suzuki K Poulose wrote: On 1/13/21 4:18 AM, Anshuman Khandual wrote: Add support for dedicated sinks that are bound to individual CPUs. (e.g, TRBE). To allow quicker access to the sink for a given CPU bound source, keep a percpu

[PATCH 4.19 11/43] chtls: Remove invalid set_tcb call

2021-01-15 Thread Greg Kroah-Hartman
From: Ayush Sawal [ Upstream commit 827d329105bfde6701f0077e34a09c4a86e27145 ] At the time of SYN_RECV, connection information is not initialized at FW, updating tcb flag over uninitialized connection causes adapter crash. We don't need to update the flag during SYN_RECV state, so avoid this. F

[PATCH 4.14 03/28] net: vlan: avoid leaks on register_vlan_dev() failures

2021-01-15 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit 55b7ab1178cbf41f979ff83236d3321ad35ed2ad ] VLAN checks for NETREG_UNINITIALIZED to distinguish between registration failure and unregistration in progress. Since commit cb626bf566eb ("net-sysfs: Fix reference count leak") registration failure may, however,

[PATCH 4.14 07/28] x86/resctrl: Dont move a task to the same resource group

2021-01-15 Thread Greg Kroah-Hartman
From: Fenghua Yu commit a0195f314a25582b38993bf30db11c300f4f4611 upstream Shakeel Butt reported in [1] that a user can request a task to be moved to a resource group even if the task is already in the group. It just wastes time to do the move operation which could be costly to send IPI to a diff

Re: [PATCH 2/4] clk: qcom: clk-alpha-pll: Add support for Lucid 5LPE PLL

2021-01-15 Thread Vinod Koul
On 13-01-21, 23:39, AngeloGioacchino Del Regno wrote: > Il 05/01/21 16:46, Vinod Koul ha scritto: > > From: Vivek Aknurwar > > > > Lucid 5LPE is a slightly different Lucid PLL with different offsets and > > porgramming sequence so add support for these > > > > Signed-off-by: Vivek Aknurwar > >

[PATCH 4.14 20/28] wil6210: select CONFIG_CRC32

2021-01-15 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit e186620d7bf11b274b985b839c38266d7918cc05 upstream. Without crc32, the driver fails to link: arm-linux-gnueabi-ld: drivers/net/wireless/ath/wil6210/fw.o: in function `wil_fw_verify': fw.c:(.text+0x74c): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/n

[PATCH 4.14 13/28] iio: imu: st_lsm6dsx: fix edge-trigger interrupts

2021-01-15 Thread Greg Kroah-Hartman
From: Lorenzo Bianconi commit 3f9bce7a22a3f8ac9d885c9d75bc45569f24ac8b upstream If we are using edge IRQs, new samples can arrive while processing current interrupt since there are no hw guarantees the irq line stays "low" long enough to properly detect the new interrupt. In this case the new sa

[PATCH 4.14 08/28] vmlinux.lds.h: Add PGO and AutoFDO input sections

2021-01-15 Thread Greg Kroah-Hartman
From: Nick Desaulniers commit eff8728fe69880d3f7983bec3fb6cea4c306261f upstream. Basically, consider .text.{hot|unlikely|unknown}.* part of .text, too. When compiling with profiling information (collected via PGO instrumentations or AutoFDO sampling), Clang will separate code into .text.hot, .t

[PATCH 4.9 21/25] net/mlx5e: Fix memleak in mlx5e_create_l2_table_groups

2021-01-15 Thread Greg Kroah-Hartman
From: Dinghao Liu commit 5b0bb12c58ac7d22e05b5bfdaa30a116c8c32e32 upstream. When mlx5_create_flow_group() fails, ft->g should be freed just like when kvzalloc() fails. The caller of mlx5e_create_l2_table_groups() does not catch this issue on failure, which leads to memleak. Fixes: 33cfaaa8f36f

<    1   2   3   4   5   6   7   8   9   10   >