Linux 4.19.187
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.187 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/armada-385-turris-omnia.dts | 1 arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 2 arch/ia64/include/asm/ptrace.h | 8 --- arch/nds32/mm/cacheflush.c | 2 arch/parisc/include/asm/cmpxchg.h | 2 arch/s390/kernel/cpcmd.c | 6 +- drivers/char/agp/Kconfig | 2 drivers/clk/clk.c | 47 ++++++++---------- drivers/clk/socfpga/clk-gate.c | 2 drivers/i2c/i2c-core-base.c | 7 +- drivers/infiniband/hw/cxgb4/cm.c | 3 - drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 ++ drivers/net/ethernet/amd/xgbe/xgbe.h | 6 +- drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 23 +++++++-- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 3 - drivers/net/ethernet/freescale/gianfar.c | 6 ++ drivers/net/ethernet/intel/i40e/i40e.h | 1 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 +++ drivers/net/ethernet/intel/ice/ice_controlq.h | 4 - drivers/net/ieee802154/atusb.c | 1 drivers/net/tun.c | 48 +++++++++++++++++++ drivers/net/usb/hso.c | 33 ++++--------- drivers/net/virtio_net.c | 52 ++++++++++++--------- drivers/regulator/bd9571mwv-regulator.c | 4 - drivers/soc/fsl/qbman/qman.c | 2 drivers/usb/usbip/stub_dev.c | 11 +++- drivers/usb/usbip/usbip_common.h | 3 + drivers/usb/usbip/usbip_event.c | 2 drivers/usb/usbip/vhci_hcd.c | 1 drivers/usb/usbip/vhci_sysfs.c | 30 ++++++++++-- drivers/usb/usbip/vudc_dev.c | 1 drivers/usb/usbip/vudc_sysfs.c | 5 ++ drivers/xen/events/events_base.c | 10 ++-- drivers/xen/events/events_internal.h | 2 fs/cifs/connect.c | 1 fs/direct-io.c | 5 +- fs/ocfs2/aops.c | 11 ---- fs/ocfs2/file.c | 8 ++- include/linux/mlx5/mlx5_ifc.h | 8 +-- include/linux/virtio_net.h | 2 include/net/netns/xfrm.h | 4 + include/net/red.h | 4 - kernel/workqueue.c | 2 net/batman-adv/translation-table.c | 2 net/ieee802154/nl-mac.c | 7 +- net/ieee802154/nl802154.c | 23 +++++++-- net/ipv6/raw.c | 2 net/ipv6/route.c | 8 ++- net/mac802154/llsec.c | 2 net/ncsi/ncsi-manage.c | 20 +++++--- net/nfc/llcp_sock.c | 10 ++++ net/sched/act_api.c | 3 + net/sched/sch_teql.c | 3 + net/sctp/ipv6.c | 7 +- net/tipc/socket.c | 2 net/wireless/sme.c | 2 net/xfrm/xfrm_interface.c | 3 + net/xfrm/xfrm_state.c | 10 ++-- sound/drivers/aloop.c | 11 +++- sound/soc/codecs/wm8960.c | 8 ++- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +- sound/soc/sunxi/sun4i-codec.c | 5 ++ 64 files changed, 354 insertions(+), 173 deletions(-)
Ahmed S. Darwish (1):
net: xfrm: Localize sequence counter per network namespace
Alexander Aring (8):
net: ieee802154: nl-mac: fix check on panid
net: ieee802154: fix nl802154 del llsec key
net: ieee802154: fix nl802154 del llsec dev
net: ieee802154: fix nl802154 add llsec key
net: ieee802154: fix nl802154 del llsec devkey
net: ieee802154: forbid monitor for set llsec params
net: ieee802154: forbid monitor for del llsec seclevel
net: ieee802154: stop dump llsec params for monitors
Alexander Gordeev (1):
s390/cpcmd: fix inline assembly register clobbering
Anirudh Rayabharam (1):
net: hso: fix null-ptr-deref during tty device unregistration
Arnd Bergmann (1):
soc/fsl: qbman: fix conflicting alignment attributes
Aya Levin (1):
net/mlx5: Fix PBMC register mapping
Bastian Germann (1):
ASoC: sunxi: sun4i-codec: fill ASoC card owner
Claudiu Manoil (1):
gianfar: Handle error code at MAC address change
Du Cheng (1):
cfg80211: remove WARN_ON() in cfg80211_sme_connect
Eric Dumazet (2):
net: ensure mac header is set in virtio_net_hdr_to_skb()
sch_red: fix off-by-one checks in red_check_params()
Eryk Rybak (1):
i40e: Fix kernel oops when i40e driver removes VF's
Eyal Birger (1):
xfrm: interface: fix ipv4 pmtu check to honor ip header df
Fabio Pricoco (1):
ice: Increase control queue timeout
Gao Xiang (1):
parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers
Geert Uytterhoeven (1):
regulator: bd9571mwv: Fix AVS and DVFS voltage range
Greg Kroah-Hartman (2):
Revert "cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath."
Linux 4.19.187Hans de Goede (1):
ASoC: intel: atom: Stop advertising non working S24LE support
Helge Deller (1):
parisc: parisc-agp requires SBA IOMMU driver
Jack Qiu (1):
fs: direct-io: fix missing sdio->boundary
Jonas Holmberg (1):
ALSA: aloop: Fix initialization of controls
Krzysztof Kozlowski (1):
clk: socfpga: fix iomem pointer cast on 64-bit
Kumar Kartikeya Dwivedi (1):
net: sched: bump refcount for new action in ACT replace mode
Luca Fancellu (1):
xen/evtchn: Change irq_info lock to raw_spinlock_t
Lukasz Bartosik (2):
clk: fix invalid usage of list cursor in register
clk: fix invalid usage of list cursor in unregister
Lv Yunlong (1):
net:tipc: Fix a double free in tipc_sk_mcast_rcv
Maciej Żenczykowski (1):
net-ipv6: bugfix - raw & sctp - switch to ipv6_can_nonlocal_bind()
Marek Behún (1):
ARM: dts: turris-omnia: configure LED[2]/INTn pin as interrupt pin
Mateusz Palczewski (1):
i40e: Added Asym_Pause to supported link modes
Mike Rapoport (1):
nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff
Milton Miller (1):
net/ncsi: Avoid channel_monitor hrtimer deadlock
Muhammad Usama Anjum (1):
net: ipv6: check for validity before dereferencing cfg->fc_nlinfo.nlh
Pavel Skripkin (3):
drivers: net: fix memory leak in atusb_probe
drivers: net: fix memory leak in peak_usb_create_dev
net: mac802154: Fix general protection fault
Pavel Tikhomirov (1):
net: sched: sch_teql: fix null-pointer dereference
Phillip Potter (1):
net: tun: set tun->dev->addr_len during TUNSETLINK processing
Potnuri Bharat Teja (1):
RDMA/cxgb4: check for ipv6 address properly while destroying listener
Raed Salem (1):
net/mlx5: Fix placement of log_max_flow_counter
Rahul Lakkireddy (1):
cxgb4: avoid collecting SGE_QBASE regs during traffic
Sergei Trofimovich (1):
ia64: fix user_stack_pointer() for ptrace()
Shengjiu Wang (1):
ASoC: wm8960: Fix wrong bclk and lrclk with pll enabled for some chips
Shuah Khan (4):
usbip: add sysfs_lock to synchronize sysfs code paths
usbip: stub-dev synchronize sysfs code paths
usbip: vudc synchronize sysfs code paths
usbip: synchronize event handler with sysfs code paths
Shyam Sundar S K (1):
amd-xgbe: Update DMA coherency values
Stefan Riedmueller (1):
ARM: dts: imx6: pbab01: Set vmmc supply for both SD interfaces
Tetsuo Handa (1):
batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field
Wengang Wang (1):
ocfs2: fix deadlock between setattr and dio_end_io_write
Wolfram Sang (1):
i2c: turn recovery error on init to debug
Xiaoming Ni (4):
nfc: fix refcount leak in llcp_sock_bind()
nfc: fix refcount leak in llcp_sock_connect()
nfc: fix memory leak in llcp_sock_connect()
nfc: Avoid endless loops caused by repeated llcp_sock_connect()
Yuya Kusakabe (1):
virtio_net: Add XDP meta data support
Zqiang (1):
workqueue: Move the position of debug_work_activate() in __queue_work()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 186 +SUBLEVEL = 187 EXTRAVERSION = NAME = "People's Front"
arch/arm/boot/dts/armada-385-turris-omnia.dts +1 -0
@@ -236,6 +236,7 @@ status = "okay"; compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22"; reg = <1>; + marvell,reg-init = <3 18 0 0x4985>; /* irq is connected to &pcawan pin 7 */ };
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi +2 -0
@@ -423,6 +423,7 @@ pinctrl-0 = <&pinctrl_usdhc2>; cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; wp-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + vmmc-supply = <&vdd_sd1_reg>; status = "disabled"; };
@@ -432,5 +433,6 @@ &pinctrl_usdhc3_cdwp>; cd-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; wp-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; + vmmc-supply = <&vdd_sd0_reg>; status = "disabled"; };
arch/ia64/include/asm/ptrace.h +1 -7
@@ -54,8 +54,7 @@static inline unsigned long user_stack_pointer (struct pt_regs *regs) { -/* FIXME: should this be bspstore + nr_dirty regs? */ -return regs->ar_bspstore; +return regs->r12; }static inline int is_syscall_success (struct pt_regs *regs)
@@ -79,11 +78,6 @@ static inline long regs_return_value(struct pt_regs *regs)unsigned long __ip =instruction_pointer (regs); \ (__ip & ~3UL ) + ((__ip &3UL ) <<2 ); \ }) -/* -* Why not default? Because user_stack_pointer() on ia64 gives register -* stack backing store instead... -*/ -#define current_user_stack_pointer () (current_pt_regs()->r12)/* given a pointer to a task_struct, return the user's pt_regs */ # define task_pt_regs (t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)
arch/nds32/mm/cacheflush.c +1 -1
@@ -239,7 +239,7 @@ void flush_dcache_page(struct page *page) {struct address_space *mapping; - mapping =page_mapping (page); + mapping =page_mapping_file (page);if (mapping && !mapping_mapped (mapping))set_bit (PG_dcache_dirty, &page->flags);else {
arch/parisc/include/asm/cmpxchg.h +1 -1
@@ -72,7 +72,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)#endif case 4 :return __cmpxchg_u32 ((unsigned int *)ptr, (unsigned int )old, (unsigned int )new_); -case 1 :return __cmpxchg_u8 ((u8 *)ptr, (u8 )old, (u8 )new_); +case 1 :return __cmpxchg_u8 ((u8 *)ptr, old &0xff , new_ &0xff ); }__cmpxchg_called_with_bad_pointer ();return old;
arch/s390/kernel/cpcmd.c +4 -2
@@ -37,10 +37,12 @@ static int diag8_noresponse(int cmdlen)static int diag8_response (int cmdlen,char *response,int *rlen) { +unsigned long _cmdlen = cmdlen |0x40000000L ; +unsigned long _rlen = *rlen; register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf; register unsigned long reg3 asm ("3") = (addr_t) response; - register unsigned long reg4 asm ("4") = cmdlen | 0x40000000L; - register unsigned long reg5 asm ("5") = *rlen; + register unsigned long reg4 asm ("4") = _cmdlen; + register unsigned long reg5 asm ("5") = _rlen; asmvolatile ( " diag %2,%0,0x8\n"
drivers/char/agp/Kconfig +1 -1
@@ -125,7 +125,7 @@ config AGP_HP_ZX1 config AGP_PARISC tristate "HP Quicksilver AGP support" - depends on AGP && PARISC && 64BIT + depends on AGP && PARISC && 64BIT && IOMMU_SBA help This option gives you AGP GART support for the HP Quicksilver AGP bus adapter on HP PA-RISC machines (Ok, just on the C8000
drivers/clk/clk.c +21 -26
73 lines not on this page · raw message
drivers/clk/socfpga/clk-gate.c +1 -1
@@ -107,7 +107,7 @@ static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk, val =readl (socfpgaclk->div_reg) >> socfpgaclk->shift; val &=GENMASK (socfpgaclk->width -1 ,0 );/* Check for GPIO_DB_CLK by its offset */ -if ((int ) socfpgaclk->div_reg &SOCFPGA_GPIO_DB_CLK_OFFSET ) +if ((uintptr_t ) socfpgaclk->div_reg &SOCFPGA_GPIO_DB_CLK_OFFSET ) div = val +1 ;else div = (1 << val);
drivers/i2c/i2c-core-base.c +4 -3
@@ -262,13 +262,14 @@ EXPORT_SYMBOL_GPL(i2c_recover_bus);static void i2c_init_recovery (struct i2c_adapter *adap) {struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; -char *err_str; +char *err_str, *err_level =KERN_ERR ;if (!bri)return ;if (!bri->recover_bus) { - err_str ="no recover_bus() found" ; + err_str ="no suitable method provided" ; + err_level =KERN_DEBUG ; goto err; }
@@ -298,7 +299,7 @@ static void i2c_init_recovery(struct i2c_adapter *adap)return ; err: -dev_err (&adap->dev,"Not using recovery: %s\n" , err_str); +dev_printk (err_level, &adap->dev,"Not using recovery: %s\n" , err_str); adap->bus_recovery_info =NULL ; }
drivers/infiniband/hw/cxgb4/cm.c +2 -1
@@ -3523,7 +3523,8 @@ int c4iw_destroy_listen(struct iw_cm_id *cm_id)c4iw_init_wr_wait (ep->com.wr_waitp); err =cxgb4_remove_server ( ep->com.dev->rdev.lldi.ports[0 ], ep->stid, - ep->com.dev->rdev.lldi.rxq_ids[0 ], true); + ep->com.dev->rdev.lldi.rxq_ids[0 ], + ep->com.local_addr.ss_family ==AF_INET6 );if (err) goto done; err = c4iw_wait_for_reply(&ep->com.dev->rdev, ep->com.wr_waitp,
drivers/net/can/usb/peak_usb/pcan_usb_core.c +5 -1
@@ -864,7 +864,7 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter,if (dev->adapter->dev_set_bus) { err = dev->adapter->dev_set_bus (dev,0 );if (err) - goto lbl_unregister_candev; + goto adap_dev_free; }/* get device number early */
@@ -876,6 +876,10 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter,return 0 ; +adap_dev_free: +if (dev->adapter->dev_free) + dev->adapter->dev_free (dev); + lbl_unregister_candev:unregister_candev (netdev);
drivers/net/ethernet/amd/xgbe/xgbe.h +3 -3
@@ -181,9 +181,9 @@#define XGBE_DMA_SYS_AWCR 0x30303030/* DMA cache settings - PCI device */ -#define XGBE_DMA_PCI_ARCR 0x00000003 -#define XGBE_DMA_PCI_AWCR 0x13131313 -#define XGBE_DMA_PCI_AWARCR 0x00000313 +#define XGBE_DMA_PCI_ARCR 0x000f0f0f +#define XGBE_DMA_PCI_AWCR 0x0f0f0f0f +#define XGBE_DMA_PCI_AWARCR 0x00000f0f/* DMA channel interrupt modes */ #define XGBE_IRQ_MODE_EDGE 0
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c +19 -4
@@ -1400,11 +1400,25 @@ int cudbg_collect_sge_indirect(struct cudbg_init *pdbg_init,struct cudbg_buffer temp_buff = {0 };struct sge_qbase_reg_field *sge_qbase;struct ireg_buf *ch_sge_dbg; +u8 padap_running =0 ;int i, rc; +u32 size; - rc =cudbg_get_buff (pdbg_init, dbg_buff, -sizeof (*ch_sge_dbg) *2 +sizeof (*sge_qbase), - &temp_buff); +/* Accessing SGE_QBASE_MAP[0-3] and SGE_QBASE_INDEX regs can +* lead to SGE missing doorbells under heavy traffic. So, only +* collect them when adapter is idle. +*/ +for_each_port (padap, i) { + padap_running =netif_running (padap->port[i]); +if (padap_running) +break ; + } + + size =sizeof (*ch_sge_dbg) *2 ; +if (!padap_running) + size +=sizeof (*sge_qbase); + + rc =cudbg_get_buff (pdbg_init, dbg_buff, size, &temp_buff);if (rc)return rc;
@@ -1426,7 +1440,8 @@ int cudbg_collect_sge_indirect(struct cudbg_init *pdbg_init, ch_sge_dbg++; } -if (CHELSIO_CHIP_VERSION (padap->params.chip) >CHELSIO_T5 ) { +if (CHELSIO_CHIP_VERSION (padap->params.chip) >CHELSIO_T5 && + !padap_running) { sge_qbase = (struct sge_qbase_reg_field *)ch_sge_dbg;/* 1 addr reg SGE_QBASE_INDEX and 4 data reg * SGE_QBASE_MAP[0-3]
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +2 -1
@@ -2093,7 +2093,8 @@ void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size)0x1190 ,0x1194 ,0x11a0 ,0x11a4 ,0x11b0 ,0x11b4 , -0x11fc ,0x1274 , +0x11fc ,0x123c , +0x1254 ,0x1274 ,0x1280 ,0x133c ,0x1800 ,0x18fc , 0x3000, 0x302c,
drivers/net/ethernet/freescale/gianfar.c +5 -1
@@ -485,7 +485,11 @@ static struct net_device_stats *gfar_get_stats(struct net_device *dev)static int gfar_set_mac_addr (struct net_device *dev,void *p) { -eth_mac_addr (dev, p); +int ret; + + ret =eth_mac_addr (dev, p); +if (ret) +return ret;gfar_set_mac_for_addr (dev,0 , dev->dev_addr);
drivers/net/ethernet/intel/i40e/i40e.h +1 -0
@@ -149,6 +149,7 @@ enum i40e_state_t { __I40E_CLIENT_L2_CHANGE, __I40E_CLIENT_RESET, __I40E_VF_RESETS_DISABLED,/* disable resets during i40e_remove */ + __I40E_VFS_RELEASING,/* This must be last as it determines the size of the BITMAP */ __I40E_STATE_SIZE__, };
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +1 -0
@@ -796,6 +796,7 @@ static int i40e_get_link_ksettings(struct net_device *netdev,/* Set flow control settings */ ethtool_link_ksettings_add_link_mode (ks, supported, Pause); +ethtool_link_ksettings_add_link_mode (ks, supported, Asym_Pause);switch (hw->fc.requested_mode) {case I40E_FC_FULL :
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +9 -0
@@ -137,6 +137,7 @@ void i40e_vc_notify_vf_reset(struct i40e_vf *vf)**/ static inline void i40e_vc_disable_vf (struct i40e_vf *vf) { +struct i40e_pf *pf = vf->pf;int i;i40e_vc_notify_vf_reset (vf);
@@ -147,6 +148,11 @@ static inline void i40e_vc_disable_vf(struct i40e_vf *vf)* ensure a reset. */ for (i =0 ; i <20 ; i++) { +/* If PF is in VFs releasing state reset VF is impossible, +* so leave it. +*/ +if (test_bit (__I40E_VFS_RELEASING, pf->state)) +return ;if (i40e_reset_vf (vf, false))return ;usleep_range (10000 ,20000 );
@@ -1381,6 +1387,8 @@ void i40e_free_vfs(struct i40e_pf *pf)if (!pf->vf)return ; + +set_bit (__I40E_VFS_RELEASING, pf->state);while (test_and_set_bit (__I40E_VF_DISABLE, pf->state))usleep_range (1000 ,2000 );
@@ -1438,6 +1446,7 @@ void i40e_free_vfs(struct i40e_pf *pf) } }clear_bit (__I40E_VF_DISABLE, pf->state); +clear_bit (__I40E_VFS_RELEASING, pf->state); }#ifdef CONFIG_PCI_IOV
drivers/net/ethernet/intel/ice/ice_controlq.h +2 -2
@@ -30,8 +30,8 @@ enum ice_ctl_q { ICE_CTL_Q_ADMIN, }; -/* Control Queue timeout settings - max delay 250ms */ -#define ICE_CTL_Q_SQ_CMD_TIMEOUT 2500/* Count 2500 times */ +/* Control Queue timeout settings - max delay 1s */ +#define ICE_CTL_Q_SQ_CMD_TIMEOUT 10000/* Count 10000 times */ #define ICE_CTL_Q_SQ_CMD_USEC 100/* Check every 100usec */ struct ice_ctl_q_ring {
drivers/net/ieee802154/atusb.c +1 -0
@@ -368,6 +368,7 @@ static int atusb_alloc_urbs(struct atusb *atusb, int n)return -ENOMEM ; }usb_anchor_urb (urb, &atusb->idle_urbs); +usb_free_urb (urb); n--; }return 0 ;
drivers/net/tun.c +48 -0
66 lines not on this page · raw message
drivers/net/usb/hso.c +12 -21
@@ -625,7 +625,7 @@ static struct hso_serial *get_serial_by_index(unsigned index)return serial; } -static int get_free_serial_index (void ) +static int obtain_minor (struct hso_serial *serial) {int index;unsigned long flags;
@@ -633,8 +633,10 @@ static int get_free_serial_index(void)spin_lock_irqsave (&serial_table_lock, flags);for (index =0 ; index <HSO_SERIAL_TTY_MINORS ; index++) {if (serial_table[index] ==NULL ) { + serial_table[index] = serial->parent; + serial->minor = index;spin_unlock_irqrestore (&serial_table_lock, flags); -return index; +return 0 ; } }spin_unlock_irqrestore (&serial_table_lock, flags);
@@ -643,15 +645,12 @@ static int get_free_serial_index(void)return -1 ; } -static void set_serial_by_index (unsigned index,struct hso_serial *serial) +static void release_minor (struct hso_serial *serial) {unsigned long flags;spin_lock_irqsave (&serial_table_lock, flags); -if (serial) - serial_table[index] = serial->parent; -else - serial_table[index] =NULL ; + serial_table[serial->minor] =NULL ;spin_unlock_irqrestore (&serial_table_lock, flags); }
@@ -2244,6 +2243,7 @@ static int hso_stop_serial_device(struct hso_device *hso_dev)static void hso_serial_tty_unregister (struct hso_serial *serial) {tty_unregister_device (tty_drv, serial->minor); +release_minor (serial); }static void hso_serial_common_free (struct hso_serial *serial)
@@ -2267,24 +2267,22 @@ static void hso_serial_common_free(struct hso_serial *serial)static int hso_serial_common_create (struct hso_serial *serial,int num_urbs,int rx_size,int tx_size) { -int minor;int i;tty_port_init (&serial->port); - minor =get_free_serial_index (); -if (minor <0 ) +if (obtain_minor (serial)) goto exit2;/* register our minor number */ serial->parent->dev =tty_port_register_device_attr (&serial->port, - tty_drv, minor, &serial->parent->interface->dev, + tty_drv, serial->minor, &serial->parent->interface->dev, serial->parent, hso_serial_dev_groups); -if (IS_ERR (serial->parent->dev)) +if (IS_ERR (serial->parent->dev)) { +release_minor (serial); goto exit2; + } -/* fill in specific data for later use */ - serial->minor = minor; serial->magic =HSO_SERIAL_MAGIC ;spin_lock_init (&serial->serial_lock); serial->num_rx_urbs = num_urbs;
@@ -2677,9 +2675,6 @@ static struct hso_device *hso_create_bulk_serial_device( serial->write_data = hso_std_serial_write_data; -/* and record this serial */ -set_serial_by_index (serial->minor, serial); -/* setup the proc dirs and files if needed */ hso_log_port (hso_dev);
@@ -2736,9 +2731,6 @@ struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, serial->shared_int->ref_count++;mutex_unlock (&serial->shared_int->shared_int_lock); -/* and record this serial */ -set_serial_by_index (serial->minor, serial); -/* setup the proc dirs and files if needed */ hso_log_port (hso_dev);
@@ -3123,7 +3115,6 @@ static void hso_free_interface(struct usb_interface *interface)cancel_work_sync (&serial_table[i]->async_get_intf);hso_serial_tty_unregister (serial);kref_put (&serial_table[i]->ref, hso_serial_ref_free); -set_serial_by_index (i,NULL ); } }
drivers/net/virtio_net.c +32 -20
140 lines not on this page · raw message
drivers/regulator/bd9571mwv-regulator.c +2 -2
@@ -132,7 +132,7 @@ static struct regulator_ops vid_ops = {static struct regulator_desc regulators[] = {BD9571MWV_REG ("VD09" ,"vd09" ,VD09 , avs_ops,0 ,0x7f , -0x80 ,600000 ,10000 ,0x3c ), +0x6f ,600000 ,10000 ,0x3c ),BD9571MWV_REG ("VD18" ,"vd18" ,VD18 , vid_ops,BD9571MWV_VD18_VID ,0xf ,16 ,1625000 ,25000 ,0 ), BD9571MWV_REG("VD25", "vd25", VD25, vid_ops, BD9571MWV_VD25_VID, 0xf,
@@ -141,7 +141,7 @@ static struct regulator_desc regulators[] = { 11, 2800000, 100000, 0),BD9571MWV_REG ("DVFS" ,"dvfs" ,DVFS , reg_ops,BD9571MWV_DVFS_MONIVDAC ,0x7f , - 0x80, 600000, 10000, 0x3c), + 0x6f, 600000, 10000, 0x3c), };#ifdef CONFIG_PM_SLEEP
drivers/soc/fsl/qbman/qman.c +1 -1
@@ -184,7 +184,7 @@ struct qm_eqcr_entry {__be32 tag;struct qm_fd fd;u8 __reserved3[32 ]; -} __packed; +} __packed__aligned(8) ;#define QM_EQCR_VERB_VBIT 0x80#define QM_EQCR_VERB_CMD_MASK 0x61/* but only one value; */ #define QM_EQCR_VERB_CMD_ENQUEUE 0x01
drivers/usb/usbip/stub_dev.c +9 -2
@@ -63,6 +63,7 @@ static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *adev_info (dev,"stub up\n" ); +mutex_lock (&sdev->ud.sysfs_lock);spin_lock_irq (&sdev->ud.lock);if (sdev->ud.status !=SDEV_ST_AVAILABLE ) {
@@ -87,13 +88,13 @@ static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *a tcp_rx =kthread_create (stub_rx_loop, &sdev->ud,"stub_rx" );if (IS_ERR (tcp_rx)) {sockfd_put (socket); -return -EINVAL ; + goto unlock_mutex; } tcp_tx =kthread_create (stub_tx_loop, &sdev->ud,"stub_tx" );if (IS_ERR (tcp_tx)) {kthread_stop (tcp_rx);sockfd_put (socket); -return -EINVAL ; + goto unlock_mutex; }/* get task structs now */
@@ -112,6 +113,8 @@ static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *awake_up_process (sdev->ud.tcp_rx);wake_up_process (sdev->ud.tcp_tx); +mutex_unlock (&sdev->ud.sysfs_lock); + }else {dev_info (dev,"stub down\n" );
@@ -122,6 +125,7 @@ static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *aspin_unlock_irq (&sdev->ud.lock);usbip_event_add (&sdev->ud,SDEV_EVENT_DOWN ); +mutex_unlock (&sdev->ud.sysfs_lock); }return count;
@@ -130,6 +134,8 @@ static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *asockfd_put (socket); err:spin_unlock_irq (&sdev->ud.lock); +unlock_mutex: +mutex_unlock (&sdev->ud.sysfs_lock);return -EINVAL ; }static DEVICE_ATTR_WO (usbip_sockfd);
@@ -295,6 +301,7 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev) sdev->ud.side =USBIP_STUB ; sdev->ud.status =SDEV_ST_AVAILABLE ;spin_lock_init (&sdev->ud.lock); +mutex_init (&sdev->ud.sysfs_lock); sdev->ud.tcp_socket =NULL ; sdev->ud.sockfd =-1 ;
drivers/usb/usbip/usbip_common.h +3 -0
@@ -263,6 +263,9 @@ struct usbip_device {/* lock for status */ spinlock_t lock; +/* mutex for synchronizing sysfs store paths */ +struct mutex sysfs_lock; +int sockfd;struct socket *tcp_socket;
drivers/usb/usbip/usbip_event.c +2 -0
@@ -70,6 +70,7 @@ static void event_handler(struct work_struct *work)while ((ud =get_event ()) !=NULL ) {usbip_dbg_eh ("pending event %lx\n" , ud->event); +mutex_lock (&ud->sysfs_lock);/* * NOTE: shutdown must come first. * Shutdown the device.
@@ -90,6 +91,7 @@ static void event_handler(struct work_struct *work) ud->eh_ops.unusable (ud);unset_event (ud,USBIP_EH_UNUSABLE ); } +mutex_unlock (&ud->sysfs_lock);wake_up (&ud->eh_waitq); }
drivers/usb/usbip/vhci_hcd.c +1 -0
@@ -1101,6 +1101,7 @@ static void vhci_device_init(struct vhci_device *vdev) vdev->ud.side =USBIP_VHCI ; vdev->ud.status =VDEV_ST_NULL ;spin_lock_init (&vdev->ud.lock); +mutex_init (&vdev->ud.sysfs_lock);INIT_LIST_HEAD (&vdev->priv_rx);INIT_LIST_HEAD (&vdev->priv_tx);
drivers/usb/usbip/vhci_sysfs.c +25 -5
@@ -185,6 +185,8 @@ static int vhci_port_disconnect(struct vhci_hcd *vhci_hcd, __u32 rhport)usbip_dbg_vhci_sysfs ("enter\n" ); +mutex_lock (&vdev->ud.sysfs_lock); +/* lock */ spin_lock_irqsave (&vhci->lock, flags);spin_lock (&vdev->ud.lock);
@@ -195,6 +197,7 @@ static int vhci_port_disconnect(struct vhci_hcd *vhci_hcd, __u32 rhport)/* unlock */ spin_unlock (&vdev->ud.lock);spin_unlock_irqrestore (&vhci->lock, flags); +mutex_unlock (&vdev->ud.sysfs_lock);return -EINVAL ; }
@@ -205,6 +208,8 @@ static int vhci_port_disconnect(struct vhci_hcd *vhci_hcd, __u32 rhport)usbip_event_add (&vdev->ud,VDEV_EVENT_DOWN ); +mutex_unlock (&vdev->ud.sysfs_lock); +return 0 ; }
@@ -349,30 +354,36 @@ static ssize_t attach_store(struct device *dev, struct device_attribute *attr,else vdev = &vhci->vhci_hcd_hs->vdev[rhport]; +mutex_lock (&vdev->ud.sysfs_lock); +/* Extract socket from fd. */ socket =sockfd_lookup (sockfd, &err);if (!socket) {dev_err (dev,"failed to lookup sock" ); -return -EINVAL ; + err = -EINVAL ; + goto unlock_mutex; }if (socket->type !=SOCK_STREAM ) {dev_err (dev,"Expecting SOCK_STREAM - found %d" , socket->type);sockfd_put (socket); -return -EINVAL ; + err = -EINVAL ; + goto unlock_mutex; }/* create threads before locking */ tcp_rx =kthread_create (vhci_rx_loop, &vdev->ud,"vhci_rx" );if (IS_ERR (tcp_rx)) {sockfd_put (socket); -return -EINVAL ; + err = -EINVAL ; + goto unlock_mutex; } tcp_tx =kthread_create (vhci_tx_loop, &vdev->ud,"vhci_tx" );if (IS_ERR (tcp_tx)) {kthread_stop (tcp_rx);sockfd_put (socket); -return -EINVAL ; + err = -EINVAL ; + goto unlock_mutex; }/* get task structs now */
@@ -397,7 +408,8 @@ static ssize_t attach_store(struct device *dev, struct device_attribute *attr,* Will be retried from userspace * if there's another free port. */ -return -EBUSY ; + err = -EBUSY ; + goto unlock_mutex; } dev_info(dev, "pdev(%u) rhport(%u) sockfd(%d)\n",
@@ -422,7 +434,15 @@ static ssize_t attach_store(struct device *dev, struct device_attribute *attr,rh_port_connect (vdev, speed); +dev_info (dev,"Device attached\n" ); + +mutex_unlock (&vdev->ud.sysfs_lock); +return count; + +unlock_mutex: +mutex_unlock (&vdev->ud.sysfs_lock); +return err; }static DEVICE_ATTR_WO (attach);
drivers/usb/usbip/vudc_dev.c +1 -0
@@ -571,6 +571,7 @@ static int init_vudc_hw(struct vudc *udc)init_waitqueue_head (&udc->tx_waitq);spin_lock_init (&ud->lock); +mutex_init (&ud->sysfs_lock); ud->status =SDEV_ST_AVAILABLE ; ud->side =USBIP_VUDC ;
drivers/usb/usbip/vudc_sysfs.c +5 -0
@@ -113,6 +113,7 @@ static ssize_t usbip_sockfd_store(struct device *dev,dev_err (dev,"no device" );return -ENODEV ; } +mutex_lock (&udc->ud.sysfs_lock);spin_lock_irqsave (&udc->lock, flags);/* Don't export what we don't have */ if (!udc->driver || !udc->pullup) {
@@ -188,6 +189,8 @@ static ssize_t usbip_sockfd_store(struct device *dev,wake_up_process (udc->ud.tcp_rx);wake_up_process (udc->ud.tcp_tx); + +mutex_unlock (&udc->ud.sysfs_lock);return count; }else {
@@ -208,6 +211,7 @@ static ssize_t usbip_sockfd_store(struct device *dev, }spin_unlock_irqrestore (&udc->lock, flags); +mutex_unlock (&udc->ud.sysfs_lock);return count;
@@ -217,6 +221,7 @@ static ssize_t usbip_sockfd_store(struct device *dev,spin_unlock_irq (&udc->ud.lock); unlock:spin_unlock_irqrestore (&udc->lock, flags); +mutex_unlock (&udc->ud.sysfs_lock);return ret; }
drivers/xen/events/events_base.c +5 -5
@@ -221,7 +221,7 @@ static int xen_irq_info_common_setup(struct irq_info *info, info->evtchn = evtchn; info->cpu = cpu; info->mask_reason =EVT_MASK_REASON_EXPLICIT ; -spin_lock_init (&info->lock); +raw_spin_lock_init (&info->lock); ret =set_evtchn_to_irq (evtchn, irq);if (ret <0 )
@@ -373,28 +373,28 @@ static void do_mask(struct irq_info *info, u8 reason) {unsigned long flags; -spin_lock_irqsave (&info->lock, flags); +raw_spin_lock_irqsave (&info->lock, flags);if (!info->mask_reason)mask_evtchn (info->evtchn); info->mask_reason |= reason; -spin_unlock_irqrestore (&info->lock, flags); +raw_spin_unlock_irqrestore (&info->lock, flags); }static void do_unmask (struct irq_info *info,u8 reason) {unsigned long flags; -spin_lock_irqsave (&info->lock, flags); +raw_spin_lock_irqsave (&info->lock, flags); info->mask_reason &= ~reason;if (!info->mask_reason)unmask_evtchn (info->evtchn); -spin_unlock_irqrestore (&info->lock, flags); +raw_spin_unlock_irqrestore (&info->lock, flags); }#ifdef CONFIG_X86
drivers/xen/events/events_internal.h +1 -1
@@ -47,7 +47,7 @@ struct irq_info {unsigned short eoi_cpu;/* EOI must happen on this cpu */ unsigned int irq_epoch;/* If eoi_cpu valid: irq_epoch of event */ u64 eoi_time;/* Time in jiffies when to EOI. */ -spinlock_t lock; +raw_spinlock_t lock;union {unsigned short virq;
fs/cifs/connect.c +0 -1
@@ -3882,7 +3882,6 @@ int cifs_setup_cifs_sb(struct smb_vol *pvolume_info, cifs_sb->prepath =kstrdup (pvolume_info->prepath,GFP_KERNEL );if (cifs_sb->prepath ==NULL )return -ENOMEM ; - cifs_sb->mnt_cifs_flags |=CIFS_MOUNT_USE_PREFIX_PATH ; }return 0 ;
fs/direct-io.c +3 -2
@@ -856,6 +856,7 @@ submit_page_section(struct dio *dio, struct dio_submit *sdio, struct page *page, struct buffer_head *map_bh) {int ret =0 ; +int boundary = sdio->boundary;/* dio_send_cur_page may clear it */ if (dio->op ==REQ_OP_WRITE ) {/*
@@ -894,10 +895,10 @@ submit_page_section(struct dio *dio, struct dio_submit *sdio, struct page *page, sdio->cur_page_fs_offset = sdio->block_in_file << sdio->blkbits; out:/* -* If sdio->boundary then we want to schedule the IO now to +* If boundary then we want to schedule the IO now to * avoid metadata seeks. */ -if (sdio->boundary) { +if (boundary) { ret =dio_send_cur_page (dio, sdio, map_bh);if (sdio->bio)dio_bio_submit (dio, sdio);
fs/ocfs2/aops.c +1 -10
@@ -2311,7 +2311,7 @@ static int ocfs2_dio_end_io_write(struct inode *inode,struct ocfs2_alloc_context *meta_ac =NULL ;handle_t *handle =NULL ;loff_t end = offset + bytes; -int ret =0 , credits =0 , locked =0 ; +int ret =0 , credits =0 ;ocfs2_init_dealloc_ctxt (&dealloc);
@@ -2322,13 +2322,6 @@ static int ocfs2_dio_end_io_write(struct inode *inode, !dwc->dw_orphaned) goto out; -/* ocfs2_file_write_iter will get i_mutex, so we need not lock if we -* are in that context. */ -if (dwc->dw_writer_pid !=task_pid_nr (current)) { -inode_lock (inode); - locked =1 ; - } - ret =ocfs2_inode_lock (inode, &di_bh,1 );if (ret <0 ) {mlog_errno (ret);
@@ -2409,8 +2402,6 @@ static int ocfs2_dio_end_io_write(struct inode *inode,if (meta_ac)ocfs2_free_alloc_context (meta_ac);ocfs2_run_deallocs (osb, &dealloc); -if (locked) -inode_unlock (inode);ocfs2_dio_free_write_ctx (inode, dwc);return ret;
fs/ocfs2/file.c +6 -2
@@ -1252,22 +1252,24 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) goto bail_unlock; } } +down_write (&OCFS2_I (inode)->ip_alloc_sem); handle =ocfs2_start_trans (osb,OCFS2_INODE_UPDATE_CREDITS +2 *ocfs2_quota_trans_credits (sb));if (IS_ERR (handle)) { status =PTR_ERR (handle);mlog_errno (status); - goto bail_unlock; + goto bail_unlock_alloc; } status =__dquot_transfer (inode, transfer_to);if (status <0 ) goto bail_commit; }else { +down_write (&OCFS2_I (inode)->ip_alloc_sem); handle =ocfs2_start_trans (osb,OCFS2_INODE_UPDATE_CREDITS );if (IS_ERR (handle)) { status =PTR_ERR (handle);mlog_errno (status); - goto bail_unlock; + goto bail_unlock_alloc; } }
@@ -1280,6 +1282,8 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) bail_commit:ocfs2_commit_trans (osb, handle); +bail_unlock_alloc: +up_write (&OCFS2_I (inode)->ip_alloc_sem); bail_unlock:if (status && inode_locked) {ocfs2_inode_unlock_tracker (inode,1 , &oh, had_lock);
include/linux/mlx5/mlx5_ifc.h +4 -4
@@ -357,11 +357,11 @@ struct mlx5_ifc_flow_table_prop_layout_bits {u8 reserved_at_60[0x18 ];u8 log_max_ft_num[0x8 ]; -u8 reserved_at_80[0x18 ]; +u8 reserved_at_80[0x10 ]; +u8 log_max_flow_counter[0x8 ];u8 log_max_destination[0x8 ]; -u8 log_max_flow_counter[0x8 ]; -u8 reserved_at_a8[0x10 ]; +u8 reserved_at_a0[0x18 ];u8 log_max_flow[0x8 ];u8 reserved_at_c0[0x40 ];
@@ -8929,7 +8929,7 @@ struct mlx5_ifc_pbmc_reg_bits {struct mlx5_ifc_bufferx_reg_bits buffer[10 ]; -u8 reserved_at_2e0[0x40 ]; +u8 reserved_at_2e0[0x80 ]; };struct mlx5_ifc_qtct_reg_bits {
include/linux/virtio_net.h +2 -0
@@ -62,6 +62,8 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,return -EINVAL ; } +skb_reset_mac_header (skb); +if (hdr->flags &VIRTIO_NET_HDR_F_NEEDS_CSUM ) {u16 start =__virtio16_to_cpu (little_endian, hdr->csum_start);u16 off =__virtio16_to_cpu (little_endian, hdr->csum_offset);
include/net/netns/xfrm.h +3 -1
@@ -70,7 +70,9 @@ struct netns_xfrm {#if IS_ENABLED (CONFIG_IPV6 )struct dst_ops xfrm6_dst_ops;#endif -spinlock_t xfrm_state_lock; +spinlock_t xfrm_state_lock; +seqcount_t xfrm_state_hash_generation; +spinlock_t xfrm_policy_lock;struct mutex xfrm_cfg_mutex; };
include/net/red.h +2 -2
@@ -171,9 +171,9 @@ static inline void red_set_vars(struct red_vars *v)static inline bool red_check_params (u32 qth_min,u32 qth_max,u8 Wlog,u8 Scell_log,u8 *stab) { -if (fls (qth_min) + Wlog >32 ) +if (fls (qth_min) + Wlog >=32 )return false; -if (fls (qth_max) + Wlog >32 ) +if (fls (qth_max) + Wlog >=32 )return false;if (Scell_log >=32 )return false;
kernel/workqueue.c +1 -1
@@ -1377,7 +1377,6 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,*/ lockdep_assert_irqs_disabled (); -debug_work_activate (work);/* if draining, only works from the same workqueue are allowed */ if (unlikely(wq->flags & __WQ_DRAINING) &&
@@ -1460,6 +1459,7 @@ static void __queue_work(int cpu, struct workqueue_struct *wq, worklist = &pwq->delayed_works; } +debug_work_activate (work);insert_work (pwq, work, worklist, work_flags);spin_unlock (&pwq->pool->lock);
net/batman-adv/translation-table.c +2 -0
@@ -904,6 +904,7 @@ batadv_tt_prepare_tvlv_global_data(struct batadv_orig_node *orig_node,hlist_for_each_entry_rcu (vlan, &orig_node->vlan_list, list) { tt_vlan->vid =htons (vlan->vid); tt_vlan->crc =htonl (vlan->tt.crc); + tt_vlan->reserved =0 ; tt_vlan++; }
@@ -987,6 +988,7 @@ batadv_tt_prepare_tvlv_local_data(struct batadv_priv *bat_priv, tt_vlan->vid =htons (vlan->vid); tt_vlan->crc =htonl (vlan->tt.crc); + tt_vlan->reserved =0 ; tt_vlan++; }
net/ieee802154/nl-mac.c +4 -3
@@ -559,9 +559,7 @@ ieee802154_llsec_parse_key_id(struct genl_info *info, desc->mode =nla_get_u8 (info->attrs[IEEE802154_ATTR_LLSEC_KEY_MODE ]);if (desc->mode ==IEEE802154_SCF_KEY_IMPLICIT ) { -if (!info->attrs[IEEE802154_ATTR_PAN_ID ] && - !(info->attrs[IEEE802154_ATTR_SHORT_ADDR ] || - info->attrs[IEEE802154_ATTR_HW_ADDR ])) +if (!info->attrs[IEEE802154_ATTR_PAN_ID ])return -EINVAL ; desc->device_addr.pan_id =nla_get_shortaddr (info->attrs[IEEE802154_ATTR_PAN_ID ]);
@@ -570,6 +568,9 @@ ieee802154_llsec_parse_key_id(struct genl_info *info, desc->device_addr.mode =IEEE802154_ADDR_SHORT ; desc->device_addr.short_addr =nla_get_shortaddr (info->attrs[IEEE802154_ATTR_SHORT_ADDR ]); }else { +if (!info->attrs[IEEE802154_ATTR_HW_ADDR ]) +return -EINVAL ; + desc->device_addr.mode =IEEE802154_ADDR_LONG ; desc->device_addr.extended_addr =nla_get_hwaddr (info->attrs[IEEE802154_ATTR_HW_ADDR ]); }
net/ieee802154/nl802154.c +19 -4
@@ -836,8 +836,13 @@ nl802154_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flags, goto nla_put_failure;#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL +if (wpan_dev->iftype ==NL802154_IFTYPE_MONITOR ) + goto out; +if (nl802154_get_llsec_params (msg, rdev, wpan_dev) <0 ) goto nla_put_failure; + +out:#endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */ genlmsg_end (msg, hdr);
@@ -1402,6 +1407,9 @@ static int nl802154_set_llsec_params(struct sk_buff *skb,u32 changed =0 ;int ret; +if (wpan_dev->iftype ==NL802154_IFTYPE_MONITOR ) +return -EOPNOTSUPP ; +if (info->attrs[NL802154_ATTR_SEC_ENABLED ]) {u8 enabled;
@@ -1562,7 +1570,8 @@ static int nl802154_add_llsec_key(struct sk_buff *skb, struct genl_info *info)struct ieee802154_llsec_key_id id = { };u32 commands[NL802154_CMD_FRAME_NR_IDS /32 ] = { }; -if (nla_parse_nested (attrs,NL802154_KEY_ATTR_MAX , +if (!info->attrs[NL802154_ATTR_SEC_KEY ] || +nla_parse_nested (attrs,NL802154_KEY_ATTR_MAX , info->attrs[NL802154_ATTR_SEC_KEY ], nl802154_key_policy, info->extack))return -EINVAL ;
@@ -1612,7 +1621,8 @@ static int nl802154_del_llsec_key(struct sk_buff *skb, struct genl_info *info)struct nlattr *attrs[NL802154_KEY_ATTR_MAX +1 ];struct ieee802154_llsec_key_id id; -if (nla_parse_nested (attrs,NL802154_KEY_ATTR_MAX , +if (!info->attrs[NL802154_ATTR_SEC_KEY ] || +nla_parse_nested (attrs,NL802154_KEY_ATTR_MAX , info->attrs[NL802154_ATTR_SEC_KEY ], nl802154_key_policy, info->extack))return -EINVAL ;
@@ -1780,7 +1790,8 @@ static int nl802154_del_llsec_dev(struct sk_buff *skb, struct genl_info *info)struct nlattr *attrs[NL802154_DEV_ATTR_MAX +1 ];__le64 extended_addr; -if (nla_parse_nested (attrs,NL802154_DEV_ATTR_MAX , +if (!info->attrs[NL802154_ATTR_SEC_DEVICE ] || +nla_parse_nested (attrs,NL802154_DEV_ATTR_MAX , info->attrs[NL802154_ATTR_SEC_DEVICE ], nl802154_dev_policy, info->extack))return -EINVAL ;
@@ -1940,7 +1951,8 @@ static int nl802154_del_llsec_devkey(struct sk_buff *skb, struct genl_info *infostruct ieee802154_llsec_device_key key;__le64 extended_addr; -if (nla_parse_nested (attrs,NL802154_DEVKEY_ATTR_MAX , +if (!info->attrs[NL802154_ATTR_SEC_DEVKEY ] || +nla_parse_nested (attrs,NL802154_DEVKEY_ATTR_MAX , info->attrs[NL802154_ATTR_SEC_DEVKEY ], nl802154_devkey_policy, info->extack))return -EINVAL ;
@@ -2115,6 +2127,9 @@ static int nl802154_del_llsec_seclevel(struct sk_buff *skb,struct wpan_dev *wpan_dev = dev->ieee802154_ptr;struct ieee802154_llsec_seclevel sl; +if (wpan_dev->iftype ==NL802154_IFTYPE_MONITOR ) +return -EOPNOTSUPP ; +if (!info->attrs[NL802154_ATTR_SEC_LEVEL ] ||llsec_parse_seclevel (info->attrs[NL802154_ATTR_SEC_LEVEL ], &sl) <0 )
net/ipv6/raw.c +1 -1
@@ -303,7 +303,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)*/ v4addr =LOOPBACK4_IPV6 ;if (!(addr_type &IPV6_ADDR_MULTICAST ) && - !sock_net (sk)->ipv6.sysctl.ip_nonlocal_bind) { + !ipv6_can_nonlocal_bind (sock_net (sk), inet)) { err = -EADDRNOTAVAIL ;if (!ipv6_chk_addr (sock_net (sk), &addr->sin6_addr, dev,0 )) {
net/ipv6/route.c +5 -3
@@ -4514,9 +4514,11 @@ static int ip6_route_multipath_add(struct fib6_config *cfg,* nexthops have been replaced by first new, the rest should * be added to it. */ - cfg->fc_nlinfo.nlh->nlmsg_flags &= ~(NLM_F_EXCL | -NLM_F_REPLACE ); - cfg->fc_nlinfo.nlh->nlmsg_flags |=NLM_F_CREATE ; +if (cfg->fc_nlinfo.nlh) { + cfg->fc_nlinfo.nlh->nlmsg_flags &= ~(NLM_F_EXCL | +NLM_F_REPLACE ); + cfg->fc_nlinfo.nlh->nlmsg_flags |=NLM_F_CREATE ; + } nhn++; }
net/mac802154/llsec.c +1 -1
@@ -160,7 +160,7 @@ llsec_key_alloc(const struct ieee802154_llsec_key *template)crypto_free_skcipher (key->tfm0); err_tfm:for (i =0 ; i <ARRAY_SIZE (key->tfm); i++) -if (key->tfm[i]) +if (!IS_ERR_OR_NULL (key->tfm[i]))crypto_free_aead (key->tfm[i]);kzfree (key);
net/ncsi/ncsi-manage.c +13 -7
@@ -84,13 +84,20 @@ static void ncsi_channel_monitor(struct timer_list *t) monitor_state = nc->monitor.state;spin_unlock_irqrestore (&nc->lock, flags); -if (!enabled || chained) { -ncsi_stop_channel_monitor (nc); -return ; - } +if (!enabled) +return ;/* expected race disabling timer */ +if (WARN_ON_ONCE (chained)) + goto bad_state; +if (state !=NCSI_CHANNEL_INACTIVE && state !=NCSI_CHANNEL_ACTIVE ) { -ncsi_stop_channel_monitor (nc); +bad_state: +netdev_warn (ndp->ndev.dev, +"Bad NCSI monitor state channel %d 0x%x %s queue\n" , + nc->id, state, chained ?"on" :"off" ); +spin_lock_irqsave (&nc->lock, flags); + nc->monitor.enabled = false; +spin_unlock_irqrestore (&nc->lock, flags);return ; }
@@ -117,10 +124,9 @@ static void ncsi_channel_monitor(struct timer_list *t) ndp->flags |=NCSI_DEV_RESHUFFLE ; } -ncsi_stop_channel_monitor (nc); - ncm = &nc->modes[NCSI_MODE_LINK ];spin_lock_irqsave (&nc->lock, flags); + nc->monitor.enabled = false; nc->state =NCSI_CHANNEL_INVISIBLE ; ncm->data[2 ] &= ~0x1 ;spin_unlock_irqrestore (&nc->lock, flags);
net/nfc/llcp_sock.c +10 -0
@@ -120,11 +120,13 @@ static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) llcp_sock->service_name_len, GFP_KERNEL);if (!llcp_sock->service_name) { +nfc_llcp_local_put (llcp_sock->local); ret = -ENOMEM ; goto put_dev; } llcp_sock->ssap =nfc_llcp_get_sdp_ssap (local, llcp_sock);if (llcp_sock->ssap ==LLCP_SAP_MAX ) { +nfc_llcp_local_put (llcp_sock->local);kfree (llcp_sock->service_name); llcp_sock->service_name =NULL ; ret = -EADDRINUSE ;
@@ -683,6 +685,10 @@ static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr, ret = -EISCONN ; goto error; } +if (sk->sk_state ==LLCP_CONNECTING ) { + ret = -EINPROGRESS ; + goto error; + } dev =nfc_get_device (addr->dev_idx);if (dev ==NULL ) {
@@ -714,6 +720,7 @@ static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr, llcp_sock->local =nfc_llcp_local_get (local); llcp_sock->ssap =nfc_llcp_get_local_ssap (local);if (llcp_sock->ssap ==LLCP_SAP_MAX ) { +nfc_llcp_local_put (llcp_sock->local); ret = -ENOMEM ; goto put_dev; }
@@ -751,8 +758,11 @@ static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr, sock_unlink:nfc_llcp_put_ssap (local, llcp_sock->ssap); +nfc_llcp_local_put (llcp_sock->local);nfc_llcp_sock_unlink (&local->connecting_sockets, sk); +kfree (llcp_sock->service_name); + llcp_sock->service_name =NULL ; put_dev:nfc_put_device (dev);
net/sched/act_api.c +3 -0
@@ -900,6 +900,9 @@ struct tc_action *tcf_action_init_1(struct net *net, struct tcf_proto *tp,return ERR_PTR (-EINVAL ); } +if (!bind && ovr && err ==ACT_P_CREATED ) +refcount_set (&a->tcfa_refcnt,2 ); +return a; err_mod:
net/sched/sch_teql.c +3 -0
@@ -138,6 +138,9 @@ teql_destroy(struct Qdisc *sch)struct teql_sched_data *dat =qdisc_priv (sch);struct teql_master *master = dat->m; +if (!master) +return ; + prev = master->slaves;if (prev) { do {
net/sctp/ipv6.c +3 -4
@@ -655,8 +655,8 @@ static int sctp_v6_available(union sctp_addr *addr, struct sctp_sock *sp)if (!(type &IPV6_ADDR_UNICAST ))return 0 ; -return sp->inet.freebind || net->ipv6.sysctl.ip_nonlocal_bind || -ipv6_chk_addr (net, in6,NULL ,0 ); +return ipv6_can_nonlocal_bind (net, &sp->inet) || +ipv6_chk_addr (net, in6,NULL ,0 ); }/* This function checks if the address is a valid address to be used for
@@ -945,8 +945,7 @@ static int sctp_inet6_bind_verify(struct sctp_sock *opt, union sctp_addr *addr) net =sock_net (&opt->inet.sk);rcu_read_lock (); dev =dev_get_by_index_rcu (net, addr->v6.sin6_scope_id); -if (!dev || !(opt->inet.freebind || - net->ipv6.sysctl.ip_nonlocal_bind || +if (!dev || !(ipv6_can_nonlocal_bind (net, &opt->inet) ||ipv6_chk_addr (net, &addr->v6.sin6_addr, dev,0 ))) {rcu_read_unlock ();
net/tipc/socket.c +1 -1
@@ -1187,7 +1187,7 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq,spin_lock_bh (&inputq->lock);if (skb_peek (arrvq) == skb) {skb_queue_splice_tail_init (&tmpq, inputq); -kfree_skb (__skb_dequeue (arrvq)); +__skb_dequeue (arrvq); }spin_unlock_bh (&inputq->lock);__skb_queue_purge (&tmpq);
net/wireless/sme.c +1 -1
@@ -530,7 +530,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,cfg80211_sme_free (wdev); } -if (WARN_ON (wdev->conn)) +if (wdev->conn)return -EINPROGRESS ; wdev->conn =kzalloc (sizeof (*wdev->conn),GFP_KERNEL );
net/xfrm/xfrm_interface.c +3 -0
@@ -302,6 +302,8 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)icmpv6_ndo_send (skb,ICMPV6_PKT_TOOBIG ,0 , mtu); }else { +if (!(ip_hdr (skb)->frag_off &htons (IP_DF ))) + goto xmit;icmp_ndo_send (skb,ICMP_DEST_UNREACH ,ICMP_FRAG_NEEDED ,htonl (mtu)); }
@@ -310,6 +312,7 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)return -EMSGSIZE ; } +xmit:xfrmi_scrub_packet (skb, !net_eq (xi->net,dev_net (dev)));skb_dst_set (skb, dst); skb->dev = tdev;
net/xfrm/xfrm_state.c +5 -5
@@ -41,7 +41,6 @@ static void xfrm_state_gc_task(struct work_struct *work);*/ static unsigned int xfrm_state_hashmax__read_mostly =1 *1024 *1024 ; -static __read_mostly seqcount_t xfrm_state_hash_generation =SEQCNT_ZERO (xfrm_state_hash_generation);static struct kmem_cache *xfrm_state_cache__ro_after_init ; static DECLARE_WORK(xfrm_state_gc_work, xfrm_state_gc_task);
@@ -137,7 +136,7 @@ static void xfrm_hash_resize(struct work_struct *work) }spin_lock_bh (&net->xfrm.xfrm_state_lock); -write_seqcount_begin (&xfrm_state_hash_generation); +write_seqcount_begin (&net->xfrm.xfrm_state_hash_generation); nhashmask = (nsize /sizeof (struct hlist_head )) -1U ; odst =xfrm_state_deref_prot (net->xfrm.state_bydst, net);
@@ -153,7 +152,7 @@ static void xfrm_hash_resize(struct work_struct *work)rcu_assign_pointer (net->xfrm.state_byspi, nspi); net->xfrm.state_hmask = nhashmask; -write_seqcount_end (&xfrm_state_hash_generation); +write_seqcount_end (&net->xfrm.xfrm_state_hash_generation);spin_unlock_bh (&net->xfrm.xfrm_state_lock); osize = (ohashmask +1 ) *sizeof (struct hlist_head );
@@ -965,7 +964,7 @@ xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr, to_put =NULL ; - sequence =read_seqcount_begin (&xfrm_state_hash_generation); + sequence =read_seqcount_begin (&net->xfrm.xfrm_state_hash_generation);rcu_read_lock (); h =xfrm_dst_hash (net, daddr, saddr, tmpl->reqid, encap_family);
@@ -1076,7 +1075,7 @@ xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr,if (to_put)xfrm_state_put (to_put); -if (read_seqcount_retry (&xfrm_state_hash_generation, sequence)) { +if (read_seqcount_retry (&net->xfrm.xfrm_state_hash_generation, sequence)) { *err = -EAGAIN ;if (x) {xfrm_state_put (x);
@@ -2406,6 +2405,7 @@ int __net_init xfrm_state_init(struct net *net) net->xfrm.state_num =0 ;INIT_WORK (&net->xfrm.state_hash_work, xfrm_hash_resize);spin_lock_init (&net->xfrm.xfrm_state_lock); +seqcount_init (&net->xfrm.xfrm_state_hash_generation);return 0 ; out_byspi:
sound/drivers/aloop.c +8 -3
@@ -1047,6 +1047,14 @@ static int loopback_mixer_new(struct loopback *loopback, int notify)return -ENOMEM ; kctl->id.device = dev; kctl->id.subdevice = substr; + +/* Add the control before copying the id so that +* the numid field of the id is set in the copy. +*/ + err =snd_ctl_add (card, kctl); +if (err <0 ) +return err; +switch (idx) {case ACTIVE_IDX : setup->active_id = kctl->id;
@@ -1063,9 +1071,6 @@ static int loopback_mixer_new(struct loopback *loopback, int notify)default :break ; } - err =snd_ctl_add (card, kctl); -if (err <0 ) -return err; } } }
sound/soc/codecs/wm8960.c +7 -1
@@ -710,7 +710,13 @@ int wm8960_configure_pll(struct snd_soc_component *component, int freq_in, best_freq_out = -EINVAL ; *sysclk_idx = *dac_idx = *bclk_idx =-1 ; -for (i =0 ; i <ARRAY_SIZE (sysclk_divs); ++i) { +/* +* From Datasheet, the PLL performs best when f2 is between +* 90MHz and 100MHz, the desired sysclk output is 11.2896MHz +* or 12.288MHz, then sysclkdiv = 2 is the best choice. +* So search sysclk_divs from 2 to 1 other than from 1 to 2. +*/ +for (i =ARRAY_SIZE (sysclk_divs) -1 ; i >=0 ; --i) {if (sysclk_divs[i] ==-1 )continue ;for (j =0 ; j <ARRAY_SIZE (dac_divs); ++j) {
sound/soc/intel/atom/sst-mfld-platform-pcm.c +3 -3
@@ -508,14 +508,14 @@ static struct snd_soc_dai_driver sst_platform_dai[] = { .channels_min = SST_STEREO, .channels_max = SST_STEREO, .rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .capture = { .stream_name = "Headset Capture", .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, }, {
@@ -526,7 +526,7 @@ static struct snd_soc_dai_driver sst_platform_dai[] = { .channels_min = SST_STEREO, .channels_max = SST_STEREO, .rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, }, {
sound/soc/sunxi/sun4i-codec.c +5 -0
@@ -1235,6 +1235,7 @@ static struct snd_soc_card *sun4i_codec_create_card(struct device *dev)return ERR_PTR (-ENOMEM ); card->dev = dev; + card->owner =THIS_MODULE ; card->name ="sun4i-codec" ; card->dapm_widgets = sun4i_codec_card_dapm_widgets; card->num_dapm_widgets =ARRAY_SIZE (sun4i_codec_card_dapm_widgets);
@@ -1267,6 +1268,7 @@ static struct snd_soc_card *sun6i_codec_create_card(struct device *dev)return ERR_PTR (-ENOMEM ); card->dev = dev; + card->owner =THIS_MODULE ; card->name ="A31 Audio Codec" ; card->dapm_widgets = sun6i_codec_card_dapm_widgets; card->num_dapm_widgets =ARRAY_SIZE (sun6i_codec_card_dapm_widgets);
@@ -1320,6 +1322,7 @@ static struct snd_soc_card *sun8i_a23_codec_create_card(struct device *dev)return ERR_PTR (-ENOMEM ); card->dev = dev; + card->owner =THIS_MODULE ; card->name ="A23 Audio Codec" ; card->dapm_widgets = sun6i_codec_card_dapm_widgets; card->num_dapm_widgets =ARRAY_SIZE (sun6i_codec_card_dapm_widgets);
@@ -1358,6 +1361,7 @@ static struct snd_soc_card *sun8i_h3_codec_create_card(struct device *dev)return ERR_PTR (-ENOMEM ); card->dev = dev; + card->owner =THIS_MODULE ; card->name ="H3 Audio Codec" ; card->dapm_widgets = sun6i_codec_card_dapm_widgets; card->num_dapm_widgets =ARRAY_SIZE (sun6i_codec_card_dapm_widgets);
@@ -1396,6 +1400,7 @@ static struct snd_soc_card *sun8i_v3s_codec_create_card(struct device *dev)return ERR_PTR (-ENOMEM ); card->dev = dev; + card->owner =THIS_MODULE ; card->name ="V3s Audio Codec" ; card->dapm_widgets = sun6i_codec_card_dapm_widgets; card->num_dapm_widgets =ARRAY_SIZE (sun6i_codec_card_dapm_widgets);
Samuel Zou
Tested-by Hulk RobotQuoted 4 lines · Greg Kroah-Hartman
I'm announcing the release of the 4.19.187 kernel.
All users of the 4.19 kernel series must upgrade.
Quoted 9 lines
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitlinux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summarythanks,
greg k-h
Tested on arm64 and x86 for 4.19.187,
Kernel repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Branch: linux-4.19.y
Version: 4.19.187
Commit: 0f1b4cb77d7f5a442b03f8ad597768b422e8ec58
Compiler: gcc version 7.3.0 (GCC)
arm64:
--------------------------------------------------------------------
Testcase Result Summary:
total: 5723
passed: 5723
failed: 0
timeout: 0
--------------------------------------------------------------------
x86:
--------------------------------------------------------------------
Testcase Result Summary:
total: 5723
passed: 5723
failed: 0
timeout: 0
--------------------------------------------------------------------