4.14.263-rc1 review
Greg Kroah-Hartman
maintainerPATCH 172/186 dmaengine: at_xdmac: Dont start transactions at tx_submit level
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit bccfb96b59179d4f96cbbd1ddff8fac6d335eae4 upstream.
tx_submit is supposed to push the current transaction descriptor to a pending queue, waiting for issue_pending() to be called. issue_pending() must start the transfer, not tx_submit(), thus remove at_xdmac_start_xfer() from at_xdmac_tx_submit(). Clients of at_xdmac that assume that tx_submit() starts the transfer must be updated and call dma_async_issue_pending() if they miss to call it (one example is atmel_serial).
As the at_xdmac_start_xfer() is now called only from at_xdmac_advance_work() when !at_xdmac_chan_is_enabled(), the at_xdmac_chan_is_enabled() check is no longer needed in at_xdmac_start_xfer(), thus remove it.
--- drivers/dma/at_xdmac.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/dma/at_xdmac.c +0 -6
@@ -344,9 +344,6 @@ static void at_xdmac_start_xfer(struct adev_vdbg (chan2dev (&atchan->chan),"%s: desc 0x%p\n" , __func__, first); -if (at_xdmac_chan_is_enabled (atchan)) -return ; -/* Set transfer as active to not try to start it again. */ first->active_xfer = true;
@@ -430,9 +427,6 @@ static dma_cookie_t at_xdmac_tx_submit(sdev_vdbg (chan2dev (tx->chan),"%s: atchan 0x%p, add desc 0x%p to xfers_list\n" , __func__, atchan, desc);list_add_tail (&desc->xfer_node, &atchan->xfers_list); -if (list_is_singular (&atchan->xfers_list)) -at_xdmac_start_xfer (atchan, desc); -spin_unlock_irqrestore (&atchan->lock, irqflags);return cookie; }
Greg Kroah-Hartman
maintainerPATCH 173/186 dmaengine: at_xdmac: Print debug message after realeasing the lock
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 5edc24ac876a928f36f407a0fcdb33b94a3a210f upstream.
It is desirable to do the prints without the lock held if possible, so move the print after the lock is released.
--- drivers/dma/at_xdmac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/dma/at_xdmac.c +4 -2
@@ -424,10 +424,12 @@ static dma_cookie_t at_xdmac_tx_submit(sspin_lock_irqsave (&atchan->lock, irqflags); cookie =dma_cookie_assign (tx); -dev_vdbg (chan2dev (tx->chan),"%s: atchan 0x%p, add desc 0x%p to xfers_list\n" , - __func__, atchan, desc);list_add_tail (&desc->xfer_node, &atchan->xfers_list);spin_unlock_irqrestore (&atchan->lock, irqflags); + +dev_vdbg (chan2dev (tx->chan),"%s: atchan 0x%p, add desc 0x%p to xfers_list\n" , + __func__, atchan, desc); +return cookie; }
Greg Kroah-Hartman
maintainerPATCH 159/186 firmware: Update Kconfig help text for Google firmware
In reply to Greg Kroah-HartmanFrom: Ben Hutchings <[email protected]>
commit d185a3466f0cd5af8f1c5c782c53bc0e6f2e7136 upstream.
The help text for GOOGLE_FIRMWARE states that it should only be enabled when building a kernel for Google's own servers. However, many of the drivers dependent on it are also useful on Chromebooks or on any platform using coreboot.
Update the help text to reflect this double duty.
--- drivers/firmware/google/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/firmware/google/Kconfig +3 -3
@@ -2,9 +2,9 @@ menuconfig GOOGLE_FIRMWARE bool "Google Firmware Drivers" default n help - These firmware drivers are used by Google's servers. They are - only useful if you are working directly on one of their - proprietary servers. If in doubt, say "N". + These firmware drivers are used by Google servers, + Chromebooks and other devices using coreboot firmware. + If in doubt, say "N". if GOOGLE_FIRMWARE
Greg Kroah-Hartman
maintainerPATCH 138/186 powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING
In reply to Greg Kroah-HartmanFrom: Michael Ellerman <[email protected]>
[ Upstream commit a4ac0d249a5db80e79d573db9e4ad29354b643a8 ]
setup_profiling_timer() is only needed when CONFIG_PROFILING is enabled.
Fixes the following W=1 warning when CONFIG_PROFILING=n:
linux/arch/powerpc/kernel/smp.c:1638:5: error: no previous prototype for ‘setup_profiling_timer’
--- arch/powerpc/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/kernel/smp.c +2 -0
@@ -1009,10 +1009,12 @@ void start_secondary(void *unused)BUG (); } +#ifdef CONFIG_PROFILING int setup_profiling_timer (unsigned int multiplier) {return 0 ; } +#endif #ifdef CONFIG_SCHED_SMT /* cpumask of CPUs with asymetric SMT dependancy */
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 162/186 RDMA/rxe: Fix a typo in opcode name
In reply to Greg Kroah-HartmanFrom: Chengguang Xu <[email protected]>
commit 8d1cfb884e881efd69a3be4ef10772c71cb22216 upstream.
There is a redundant ']' in the name of opcode IB_OPCODE_RC_SEND_MIDDLE, so just fix it.
--- drivers/infiniband/sw/rxe/rxe_opcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/sw/rxe/rxe_opcode.c +1 -1
@@ -137,7 +137,7 @@ struct rxe_opcode_info rxe_opcode[RXE_NU } }, [IB_OPCODE_RC_SEND_MIDDLE] = { - .name = "IB_OPCODE_RC_SEND_MIDDLE]", + .name = "IB_OPCODE_RC_SEND_MIDDLE", .mask =RXE_PAYLOAD_MASK |RXE_REQ_MASK |RXE_SEND_MASK | RXE_MIDDLE_MASK, .length = RXE_BTH_BYTES,
Greg Kroah-Hartman
maintainerPATCH 168/186 net: axienet: Wait for PhyRstCmplt after core reset
In reply to Greg Kroah-HartmanFrom: Robert Hancock <[email protected]>
commit b400c2f4f4c53c86594dd57098970d97d488bfde upstream.
When resetting the device, wait for the PhyRstCmplt bit to be set in the interrupt status register before continuing initialization, to ensure that the core is actually ready. When using an external PHY, this also ensures we do not start trying to access the PHY while it is still in reset. The PHY reset is initiated by the core reset which is triggered just above, but remains asserted for 5ms after the core is reset according to the documentation.
The MgtRdy bit could also be waited for, but unfortunately when using 7-series devices, the bit does not appear to work as documented (it seems to behave as some sort of link state indication and not just an indication the transceiver is ready) so it can't really be relied on for this purpose.
--- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +10 -0
@@ -279,6 +279,16 @@ static int axienet_dma_bd_init(struct neaxienet_dma_out32 (lp,XAXIDMA_TX_CR_OFFSET , cr |XAXIDMA_CR_RUNSTOP_MASK ); +/* Wait for PhyRstCmplt bit to be set, indicating the PHY reset has finished */ + ret =read_poll_timeout (axienet_ior, value, + value &XAE_INT_PHYRSTCMPLT_MASK , +DELAY_OF_ONE_MILLISEC ,50000 , false, lp, +XAE_IS_OFFSET ); +if (ret) { +dev_err (lp->dev,"%s: timeout waiting for PhyRstCmplt\n" , __func__); +return ret; + } +return 0 ; out:axienet_dma_bd_release (ndev);
Greg Kroah-Hartman
maintainerPATCH 144/186 MIPS: Octeon: Fix build errors using clang
In reply to Greg Kroah-HartmanFrom: Tianjia Zhang <[email protected]>
[ Upstream commit 95339b70677dc6f9a2d669c4716058e71b8dc1c7 ]
A large number of the following errors is reported when compiling with clang:
cvmx-bootinfo.h:326:3: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cvmx-bootinfo.h:321:20: note: expanded from macro 'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
~~~^~~~
cvmx-bootinfo.h:326:3: note: use array indexing to silence this warning
cvmx-bootinfo.h:321:20: note: expanded from macro 'ENUM_BRD_TYPE_CASE'
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
^Follow the prompts to use the address operator '&' to fix this error.
--- arch/mips/include/asm/octeon/cvmx-bootinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/octeon/cvmx-bootinfo.h +2 -2
@@ -315,7 +315,7 @@ enum cvmx_chip_types_enum {/* Functions to return string based on type */ #define ENUM_BRD_TYPE_CASE (x) \ - case x: return(#x + 16);/* Skip CVMX_BOARD_TYPE_ */ + case x: return (&#x[16]);/* Skip CVMX_BOARD_TYPE_ */ static inline const char *cvmx_board_type_to_string (enum cvmx_board_types_enum type) {
@@ -404,7 +404,7 @@ static inline const char *cvmx_board_type_to_string(enum }#define ENUM_CHIP_TYPE_CASE (x) \ - case x: return(#x + 15);/* Skip CVMX_CHIP_TYPE */ + case x: return (&#x[15]);/* Skip CVMX_CHIP_TYPE */ static inline const char *cvmx_chip_type_to_string (enum cvmx_chip_types_enum type) {
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 158/186 drm/radeon: fix error handling in radeon_driver_open_kms
In reply to Greg Kroah-HartmanFrom: Christian König <[email protected]>
commit 4722f463896cc0ef1a6f1c3cb2e171e949831249 upstream.
The return value was never initialized so the cleanup code executed when it isn't even necessary.
Just add proper error handling.
--- drivers/gpu/drm/radeon/radeon_kms.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
drivers/gpu/drm/radeon/radeon_kms.c +12 -10
@@ -673,18 +673,18 @@ int radeon_driver_open_kms(struct drm_de fpriv =kzalloc (sizeof (*fpriv),GFP_KERNEL );if (unlikely (!fpriv)) { r = -ENOMEM ; - goto out_suspend; + goto err_suspend; }if (rdev->accel_working) { vm = &fpriv->vm; r =radeon_vm_init (rdev, vm);if (r) - goto out_fpriv; + goto err_fpriv; r =radeon_bo_reserve (rdev->ring_tmp_bo.bo, false);if (r) - goto out_vm_fini; + goto err_vm_fini;/* map the ib pool buffer read only into * virtual address space */
@@ -692,7 +692,7 @@ int radeon_driver_open_kms(struct drm_de rdev->ring_tmp_bo.bo);if (!vm->ib_bo_va) { r = -ENOMEM ; - goto out_vm_fini; + goto err_vm_fini; } r = radeon_vm_bo_set_addr(rdev, vm->ib_bo_va,
@@ -700,19 +700,21 @@ int radeon_driver_open_kms(struct drm_deRADEON_VM_PAGE_READABLE | RADEON_VM_PAGE_SNOOPED);if (r) - goto out_vm_fini; + goto err_vm_fini; } file_priv->driver_priv = fpriv; } -if (!r) - goto out_suspend; +pm_runtime_mark_last_busy (dev->dev); +pm_runtime_put_autosuspend (dev->dev); +return 0 ; -out_vm_fini: +err_vm_fini:radeon_vm_fini (rdev, vm); -out_fpriv: +err_fpriv:kfree (fpriv); -out_suspend: + +err_suspend:pm_runtime_mark_last_busy (dev->dev);pm_runtime_put_autosuspend (dev->dev);return r;
Greg Kroah-Hartman
maintainerPATCH 135/186 powerpc/btext: add missing of_node_put
In reply to Greg Kroah-HartmanFrom: Julia Lawall <[email protected]>
[ Upstream commit a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0 ]
for_each_node_by_type performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put.
A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr):
// <smpl>
@@
local idexpression n;
expression e;
@@
for_each_node_by_type(n,...) {
...
(
of_node_put(n);
|
e = n
|
+ of_node_put(n);
? break;
)
...
}
... when != n
// </smpl>
--- arch/powerpc/kernel/btext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/kernel/btext.c +3 -1
@@ -258,8 +258,10 @@ int __init btext_find_display(int allow_nonstdout) rc =btext_initialize (np);printk ("result: %d\n" , rc); } -if (rc ==0 ) +if (rc ==0 ) { +of_node_put (np);break ; + } }return rc; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 163/186 powerpc/cell: Fix clang -Wimplicit-fallthrough warning
In reply to Greg Kroah-HartmanFrom: Anders Roxell <[email protected]>
commit e89257e28e844f5d1d39081bb901d9f1183a7705 upstream.
Clang warns:
arch/powerpc/platforms/cell/pervasive.c:81:2: error: unannotated fall-through between switch labels
case SRR1_WAKEEE:
^
arch/powerpc/platforms/cell/pervasive.c:81:2: note: insert 'break;' to avoid fall-through
case SRR1_WAKEEE:
^
break;1 error generated.
Clang is more pedantic than GCC, which does not warn when failing through to a case that is just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst. Add athe missing break to silence the warning.
--- arch/powerpc/platforms/cell/pervasive.c | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/platforms/cell/pervasive.c +1 -0
@@ -90,6 +90,7 @@ static int cbe_system_reset_exception(stswitch (regs->msr &SRR1_WAKEMASK ) {case SRR1_WAKEDEC :set_dec (1 ); +break ;case SRR1_WAKEEE :/* * Handle these when interrupts get re-enabled and we take
Greg Kroah-Hartman
maintainerPATCH 74/186 ALSA: oss: fix compile error when OSS_DEBUG is enabled
In reply to Greg Kroah-HartmanFrom: Bixuan Cui <[email protected]>
[ Upstream commit 8e7daf318d97f25e18b2fc7eb5909e34cd903575 ]
Fix compile error when OSS_DEBUG is enabled:
sound/core/oss/pcm_oss.c: In function 'snd_pcm_oss_set_trigger':
sound/core/oss/pcm_oss.c:2055:10: error: 'substream' undeclared (first
use in this function); did you mean 'csubstream'?
pcm_dbg(substream->pcm, "pcm_oss: trigger = 0x%x\n", trigger);
^--- sound/core/oss/pcm_oss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/oss/pcm_oss.c +1 -1
@@ -2070,7 +2070,7 @@ static int snd_pcm_oss_set_trigger(struct snd_pcm_oss_file *pcm_oss_file, int trint err, cmd;#ifdef OSS_DEBUG -pcm_dbg (substream->pcm,"pcm_oss: trigger = 0x%x\n" , trigger); +pr_debug ("pcm_oss: trigger = 0x%x\n" , trigger);#endif psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK ];
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 104/186 iwlwifi: mvm: synchronize with FW after multicast commands
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit db66abeea3aefed481391ecc564fb7b7fb31d742 ]
If userspace installs a lot of multicast groups very quickly, then we may run out of command queue space as we send the updates in an asynchronous fashion (due to locking concerns), and the CPU can create them faster than the firmware can process them. This is true even when mac80211 has a work struct that gets scheduled.
Fix this by synchronizing with the firmware after sending all those commands - outside of the iteration we can send a synchronous echo command that just has the effect of the CPU waiting for the prior asynchronous commands to finish. This also will cause fewer of the commands to be sent to the firmware overall, because the work will only run once when rescheduled multiple times while it's running.
--- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +17 -0
@@ -1608,6 +1608,7 @@ static void iwl_mvm_recalc_multicast(struct iwl_mvm *mvm)struct iwl_mvm_mc_iter_data iter_data = { .mvm = mvm, }; +int ret;lockdep_assert_held (&mvm->mutex);
@@ -1617,6 +1618,22 @@ static void iwl_mvm_recalc_multicast(struct iwl_mvm *mvm)ieee80211_iterate_active_interfaces_atomic ( mvm->hw,IEEE80211_IFACE_ITER_NORMAL , iwl_mvm_mc_iface_iterator, &iter_data); + +/* +* Send a (synchronous) ech command so that we wait for the +* multiple asynchronous MCAST_FILTER_CMD commands sent by +* the interface iterator. Otherwise, we might get here over +* and over again (by userspace just sending a lot of these) +* and the CPU can send them faster than the firmware can +* process them. +* Note that the CPU is still faster - but with this we'll +* actually send fewer commands overall because the CPU will +* not schedule the work in mac80211 as frequently if it's +* still running when rescheduled (possibly multiple times). +*/ + ret =iwl_mvm_send_cmd_pdu (mvm,ECHO_CMD ,0 ,0 ,NULL ); +if (ret) +IWL_ERR (mvm,"Failed to synchronize multicast groups update\n" ); } static u64 iwl_mvm_prepare_multicast(struct ieee80211_hw *hw,
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 166/186 parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
commit d24846a4246b6e61ecbd036880a4adf61681d241 upstream.
kobject_init_and_add() takes reference even when it fails. According to the doc of kobject_init_and_add():
If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object.
Fix memory leak by calling kobject_put().
--- drivers/parisc/pdc_stable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/parisc/pdc_stable.c +3 -1
@@ -992,8 +992,10 @@ pdcs_register_pathentries(void) entry->kobj.kset = paths_kset; err =kobject_init_and_add (&entry->kobj, &ktype_pdcspath,NULL ,"%s" , entry->name); -if (err) +if (err) { +kobject_put (&entry->kobj);return err; + }/* kobject is now registered */ write_lock (&entry->rw_lock);
Greg Kroah-Hartman
maintainerPATCH 78/186 RDMA/core: Let ib_find_gid() continue search even after empty entry
In reply to Greg Kroah-HartmanFrom: Avihai Horon <[email protected]>
[ Upstream commit 483d805191a23191f8294bbf9b4e94836f5d92e4 ]
Currently, ib_find_gid() will stop searching after encountering the first empty GID table entry. This behavior is wrong since neither IB nor RoCE spec enforce tightly packed GID tables.
For example, when a valid GID entry exists at index N, and if a GID entry is empty at index N-1, ib_find_gid() will fail to find the valid entry.
Fix it by making ib_find_gid() continue searching even after encountering missing entries.
--- drivers/infiniband/core/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/core/device.c +2 -1
@@ -1075,7 +1075,8 @@ int ib_find_gid(struct ib_device *device, union ib_gid *gid,for (i =0 ; i < device->port_immutable[port].gid_tbl_len; ++i) { ret =ib_query_gid (device, port, i, &tmp_gid,NULL );if (ret) -return ret; +continue ; +if (!memcmp (&tmp_gid, gid,sizeof *gid)) { *port_num = port;if (index)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 117/186 jffs2: GC deadlock reading a page that is used in jffs2_write_begin()
In reply to Greg Kroah-HartmanFrom: Kyeong Yoo <[email protected]>
[ Upstream commit aa39cc675799bc92da153af9a13d6f969c348e82 ]
GC task can deadlock in read_cache_page() because it may attempt to release a page that is actually allocated by another task in jffs2_write_begin().
The reason is that in jffs2_write_begin() there is a small window a cache page is allocated for use but not set Uptodate yet.
This ends up with a deadlock between two tasks:
1) A task (e.g. file copy)
- jffs2_write_begin() locks a cache page
- jffs2_write_end() tries to lock "alloc_sem" from
jffs2_reserve_space() <-- STUCK
2) GC task (jffs2_gcd_mtd3)
- jffs2_garbage_collect_pass() locks "alloc_sem"
- try to lock the same cache page in read_cache_page() <-- STUCK
So to avoid this deadlock, hold "alloc_sem" in jffs2_write_begin() while reading data in a cache page.
--- fs/jffs2/file.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-)
fs/jffs2/file.c +25 -15
@@ -135,20 +135,15 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,struct page *pg;struct inode *inode = mapping->host;struct jffs2_inode_info *f =JFFS2_INODE_INFO (inode); +struct jffs2_sb_info *c =JFFS2_SB_INFO (inode->i_sb);pgoff_t index = pos >>PAGE_SHIFT ;uint32_t pageofs = index <<PAGE_SHIFT ;int ret =0 ; - pg =grab_cache_page_write_begin (mapping, index, flags); -if (!pg) -return -ENOMEM ; - *pagep = pg; -jffs2_dbg (1 ,"%s()\n" , __func__);if (pageofs > inode->i_size) {/* Make new hole frag from old EOF to new page */ -struct jffs2_sb_info *c =JFFS2_SB_INFO (inode->i_sb);struct jffs2_raw_inode ri;struct jffs2_full_dnode *fn;uint32_t alloc_len;
@@ -159,7 +154,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, ret =jffs2_reserve_space (c,sizeof (ri), &alloc_len,ALLOC_NORMAL ,JFFS2_SUMMARY_INODE_SIZE );if (ret) - goto out_page; + goto out_err;mutex_lock (&f->sem);memset (&ri,0 ,sizeof (ri));
@@ -189,7 +184,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, ret =PTR_ERR (fn);jffs2_complete_reservation (c);mutex_unlock (&f->sem); - goto out_page; + goto out_err; } ret =jffs2_add_full_dnode_to_inode (c, f, fn);if (f->metadata) {
@@ -204,13 +199,26 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,jffs2_free_full_dnode (fn);jffs2_complete_reservation (c);mutex_unlock (&f->sem); - goto out_page; + goto out_err; }jffs2_complete_reservation (c); inode->i_size = pageofs;mutex_unlock (&f->sem); } +/* +* While getting a page and reading data in, lock c->alloc_sem until +* the page is Uptodate. Otherwise GC task may attempt to read the same +* page in read_cache_page(), which causes a deadlock. +*/ +mutex_lock (&c->alloc_sem); + pg =grab_cache_page_write_begin (mapping, index, flags); +if (!pg) { + ret = -ENOMEM ; + goto release_sem; + } + *pagep = pg; +/* * Read in the page if it wasn't already present. Cannot optimize away * the whole page write case until jffs2_write_end can handle the
@@ -220,15 +228,17 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,mutex_lock (&f->sem); ret =jffs2_do_readpage_nolock (inode, pg);mutex_unlock (&f->sem); -if (ret) - goto out_page; +if (ret) { +unlock_page (pg); +put_page (pg); + goto release_sem; + } }jffs2_dbg (1 ,"end write_begin(). pg->flags %lx\n" , pg->flags); -return ret; -out_page: -unlock_page (pg); -put_page (pg); +release_sem: +mutex_unlock (&c->alloc_sem); +out_err:return ret; }
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 105/186 ath10k: Fix tx hanging
In reply to Greg Kroah-HartmanFrom: Sebastian Gottschall <[email protected]>
[ Upstream commit e8a91863eba3966a447d2daa1526082d52b5db2a ]
While running stress tests in roaming scenarios (switching ap's every 5 seconds, we discovered a issue which leads to tx hangings of exactly 5 seconds while or after scanning for new accesspoints. We found out that this hanging is triggered by ath10k_mac_wait_tx_complete since the empty_tx_wq was not wake when the num_tx_pending counter reaches zero. To fix this, we simply move the wake_up call to htt_tx_dec_pending, since this call was missed on several locations within the ath10k code.
--- drivers/net/wireless/ath/ath10k/htt_tx.c | 3 +++ drivers/net/wireless/ath/ath10k/txrx.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/htt_tx.c +3 -0
@@ -158,6 +158,9 @@ void ath10k_htt_tx_dec_pending(struct ath10k_htt *htt) htt->num_pending_tx--;if (htt->num_pending_tx == htt->max_num_pending_tx -1 )ath10k_mac_tx_unlock (htt->ar,ATH10K_TX_PAUSE_Q_FULL ); + +if (htt->num_pending_tx ==0 ) +wake_up (&htt->empty_tx_wq); }int ath10k_htt_tx_inc_pending (struct ath10k_htt *htt)
drivers/net/wireless/ath/ath10k/txrx.c +0 -2
@@ -90,8 +90,6 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,ath10k_htt_tx_free_msdu_id (htt, tx_done->msdu_id);ath10k_htt_tx_dec_pending (htt); -if (htt->num_pending_tx ==0 ) -wake_up (&htt->empty_tx_wq);spin_unlock_bh (&htt->tx_lock);dma_unmap_single (dev, skb_cb->paddr, msdu->len,DMA_TO_DEVICE );
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 176/186 net_sched: restore "mpu xxx" handling
In reply to Greg Kroah-HartmanFrom: Kevin Bracey <[email protected]>
commit fb80445c438c78b40b547d12b8d56596ce4ccfeb upstream.
commit 56b765b79e9a ("htb: improved accuracy at high rates") broke "overhead X", "linklayer atm" and "mpu X" attributes.
"overhead X" and "linklayer atm" have already been fixed. This restores the "mpu X" handling, as might be used by DOCSIS or Ethernet shaping:
tc class add ... htb rate X overhead 4 mpu 64
The code being fixed is used by htb, tbf and act_police. Cake has its own mpu handling. qdisc_calculate_pkt_len still uses the size table containing values adjusted for mpu by user space.
iproute2 tc has always passed mpu into the kernel via a tc_ratespec structure, but the kernel never directly acted on it, merely stored it so that it could be read back by tc class show.
Rather, tc would generate length-to-time tables that included the mpu (and linklayer) in their construction, and the kernel used those tables.
Since v3.7, the tables were no longer used. Along with "mpu", this also broke "overhead" and "linklayer" which were fixed in 01cb71d2d47b ("net_sched: restore "overhead xxx" handling", v3.10) and 8a8e3d84b171 ("net_sched: restore "linklayer atm" handling", v3.11).
"overhead" was fixed by simply restoring use of tc_ratespec::overhead - this had originally been used by the kernel but was initially omitted from the new non-table-based calculations.
"linklayer" had been handled in the table like "mpu", but the mode was not originally passed in tc_ratespec. The new implementation was made to handle it by getting new versions of tc to pass the mode in an extended tc_ratespec, and for older versions of tc the table contents were analysed at load time to deduce linklayer.
As "mpu" has always been given to the kernel in tc_ratespec, accompanying the mpu-based table, we can restore system functionality with no userspace change by making the kernel act on the tc_ratespec value.
--- include/net/sch_generic.h | 5 +++++ net/sched/sch_generic.c | 1 + 2 files changed, 6 insertions(+)
include/net/sch_generic.h +5 -0
@@ -885,6 +885,7 @@ struct psched_ratecfg {u64 rate_bytes_ps;/* bytes per second */ u32 mult;u16 overhead; +u16 mpu;u8 linklayer;u8 shift; };
@@ -894,6 +895,9 @@ static inline u64 psched_l2t_ns(const st { len += r->overhead; +if (len < r->mpu) + len = r->mpu; +if (unlikely (r->linklayer ==TC_LINKLAYER_ATM ))return ((u64)(DIV_ROUND_UP (len,48 )*53 ) * r->mult) >> r->shift;
@@ -916,6 +920,7 @@ static inline void psched_ratecfg_getrat res->rate =min_t (u64, r->rate_bytes_ps, ~0U ); res->overhead = r->overhead; + res->mpu = r->mpu; res->linklayer = (r->linklayer &TC_LINKLAYER_MASK ); }
net/sched/sch_generic.c +1 -0
@@ -1010,6 +1010,7 @@ void psched_ratecfg_precompute(struct ps {memset (r,0 ,sizeof (*r)); r->overhead = conf->overhead; + r->mpu = conf->mpu; r->rate_bytes_ps =max_t (u64, conf->rate, rate64); r->linklayer = (conf->linklayer &TC_LINKLAYER_MASK ); r->mult =1 ;
Greg Kroah-Hartman
maintainerPATCH 165/186 net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module
In reply to Greg Kroah-HartmanFrom: Tobias Waldekranz <[email protected]>
commit 3f7c239c7844d2044ed399399d97a5f1c6008e1b upstream.
As reported by sparse: In the remove path, the driver would attempt to unmap its own priv pointer - instead of the io memory that it mapped in probe.
--- drivers/net/ethernet/freescale/xgmac_mdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/freescale/xgmac_mdio.c +2 -1
@@ -301,9 +301,10 @@ err_ioremap:static int xgmac_mdio_remove (struct platform_device *pdev) {struct mii_bus *bus =platform_get_drvdata (pdev); +struct mdio_fsl_priv *priv = bus->priv;mdiobus_unregister (bus); -iounmap (bus->priv); +iounmap (priv->mdio_base);mdiobus_free (bus);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 111/186 arm64: tegra: Adjust length of CCPLEX cluster MMIO region
In reply to Greg Kroah-HartmanFrom: Thierry Reding <[email protected]>
[ Upstream commit 2b14cbd643feea5fc17c6e8bead4e71088c69acd ]
The Tegra186 CCPLEX cluster register region is 4 MiB is length, not 4 MiB - 1. This was likely presumed to be the "limit" rather than length. Fix it up.
--- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra186.dtsi +1 -1
@@ -351,7 +351,7 @@ ccplex@e000000 { compatible = "nvidia,tegra186-ccplex-cluster"; - reg = <0x0 0x0e000000 0x0 0x3fffff>; + reg = <0x0 0x0e000000 0x0 0x400000>; nvidia,bpmp = <&bpmp>; };
Signature · 1 line
2.34.1
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.263 release. There are 186 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 Wed, 26 Jan 2022 18:39:11 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.263-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.14.y
and the diffstat can be found below.thanks,
greg k-h
Following patch caused build failures on arm imx_v6_v7_defconfig
Quoted 2 lines
Lucas Stach <[email protected]>
drm/etnaviv: limit submit sizes
build/clang-nightly-imx_v6_v7_defconfig
build/gcc-11-imx_v6_v7_defconfig
build/gcc-10-imx_v6_v7_defconfig
build/clang-11-imx_v6_v7_defconfig
build/clang-12-imx_v6_v7_defconfig
build/clang-13-imx_v6_v7_defconfig
Error:
-------
make --silent --keep-going --jobs=8 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- 'CC=sccache
arm-linux-gnueabihf-gcc' 'HOSTCC=sccache gcc'
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c: In function 'etnaviv_ioctl_gem_submit':drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:345:37: error: 'struct drm_etnaviv_gem_submit' has no member named 'nr_pmrs'; did you mean 'nr_bos'?
args->nr_bos > SZ_64K || args->nr_pmrs > 128) {
^~~~~~~
nr_bosmake[5]: *** [scripts/Makefile.build:329:drivers/gpu/drm/etnaviv/etnaviv_gem_submit.o] Error 1
--
Linaro LKFT
https://lkft.linaro.org
Quoted 18 lines · Naresh Kamboju
Quoted 15 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.263 release. There are 186 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 Wed, 26 Jan 2022 18:39:11 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.263-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.14.y
and the diffstat can be found below.
Quoted 8 lines
Quoted 3 lines
thanks,
greg k-h
Following patch caused build failures on arm
imx_v6_v7_defconfigQuoted 2 lines
Lucas Stach <[email protected]>
drm/etnaviv: limit submit sizes
The following patch might be missing,
commit 05916bed11b6d4c61b473a76220151a7d0547164
Christian Gmeiner <[email protected]>
drm/etnaviv: add uapi for perfmon feature
Quoted 30 lines
build/clang-nightly-imx_v6_v7_defconfig
build/gcc-11-imx_v6_v7_defconfig
build/gcc-10-imx_v6_v7_defconfig
build/clang-11-imx_v6_v7_defconfig
build/clang-12-imx_v6_v7_defconfig
build/clang-13-imx_v6_v7_defconfigError:
-------
make --silent --keep-going --jobs=8 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- 'CC=sccache
arm-linux-gnueabihf-gcc' 'HOSTCC=sccache gcc'
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c: In function 'etnaviv_ioctl_gem_submit':drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:345:37: error: 'structdrm_etnaviv_gem_submit' has no member named 'nr_pmrs'; did you mean 'nr_bos'?args->nr_bos > SZ_64K || args->nr_pmrs > 128) { ^~~~~~~ nr_bosmake[5]: *** [
scripts/Makefile.build:329:drivers/gpu/drm/etnaviv/etnaviv_gem_submit.o] Error 1--
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 25 lines · Naresh Kamboju
Quoted 24 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.263 release. There are 186 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 Wed, 26 Jan 2022 18:39:11 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.263-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.14.y
and the diffstat can be found below.thanks,
greg k-h
Following patch caused build failures on arm
imx_v6_v7_defconfig
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
Lucas Stach <[email protected]>
drm/etnaviv: limit submit sizesThe following patch might be missing,
commit
05916bed11b6d4c61b473a76220151a7d0547164
Christian Gmeiner <[email protected]>
drm/etnaviv: add uapi for perfmon feature
Thanks, I'll drop the limit commit from 4.14 and older as it doesn't seem like this option is present on kernels older than 4.15.
thanks,
greg k-h