Linux 4.19.151
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.151 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/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 1 drivers/base/dd.c | 5 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 drivers/gpu/drm/nouveau/nouveau_mem.c | 2 drivers/i2c/busses/i2c-i801.c | 1 drivers/i2c/busses/i2c-meson.c | 42 ++++-- drivers/i2c/busses/i2c-owl.c | 6 drivers/mmc/core/queue.c | 2 drivers/mtd/nand/raw/sunxi_nand.c | 2 drivers/net/bonding/bond_main.c | 1 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 14 +- drivers/net/ethernet/renesas/ravb_main.c | 110 ++++++++--------- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 15 -- drivers/net/macsec.c | 4 drivers/net/phy/Kconfig | 1 drivers/net/team/team.c | 3 drivers/net/usb/ax88179_178a.c | 1 drivers/net/usb/rtl8150.c | 16 +- drivers/nvme/host/core.c | 4 drivers/platform/x86/Kconfig | 1 drivers/platform/x86/intel-vbtn.c | 64 +++++++-- drivers/platform/x86/thinkpad_acpi.c | 6 drivers/video/console/newport_con.c | 7 - drivers/video/fbdev/core/fbcon.c | 12 + drivers/video/fbdev/core/fbcon.h | 7 - drivers/video/fbdev/core/fbcon_rotate.c | 1 drivers/video/fbdev/core/tileblit.c | 1 fs/cifs/smb2ops.c | 2 include/linux/font.h | 13 ++ include/linux/khugepaged.h | 5 include/net/xfrm.h | 16 -- kernel/events/core.c | 5 kernel/umh.c | 9 + lib/fonts/font_10x18.c | 9 - lib/fonts/font_6x10.c | 9 - lib/fonts/font_6x11.c | 9 - lib/fonts/font_7x14.c | 9 - lib/fonts/font_8x16.c | 9 - lib/fonts/font_8x8.c | 9 - lib/fonts/font_acorn_8x8.c | 9 - lib/fonts/font_mini_4x6.c | 8 - lib/fonts/font_pearl_8x8.c | 9 - lib/fonts/font_sun12x22.c | 9 - lib/fonts/font_sun8x16.c | 7 - mm/khugepaged.c | 25 +++ mm/page_alloc.c | 3 net/openvswitch/conntrack.c | 22 ++- net/rxrpc/conn_event.c | 6 net/rxrpc/key.c | 18 ++ net/sctp/auth.c | 1 net/wireless/nl80211.c | 3 net/xfrm/xfrm_interface.c | 2 net/xfrm/xfrm_state.c | 42 +++++- tools/perf/builtin-top.c | 4 55 files changed, 394 insertions(+), 210 deletions(-)
Aaron Ma (1):
platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse
Anant Thazhemadam (3):
net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key()
net: team: fix memory leak in __team_options_register
net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails
Antony Antony (4):
xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate
xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate
xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate
xfrm: clone whole liftime_cur structure in xfrm_do_migrate
Aya Levin (2):
net/mlx5e: Fix VLAN cleanup flow
net/mlx5e: Fix VLAN create flow
Chaitanya Kulkarni (1):
nvme-core: put ctrl ref when module ref get fail
Coly Li (1):
mmc: core: don't set limits.discard_granularity as 0
Cristian Ciocaltea (1):
i2c: owl: Clear NACK and BUS error bits
David Howells (3):
rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read()
rxrpc: Fix some missing _bh annotations on locking conn->state_lock
rxrpc: Fix server keyring leak
Dinh Nguyen (1):
arm64: dts: stratix10: add status to qspi dts node
Dumitru Ceara (1):
openvswitch: handle DNAT tuple collision
Eric Dumazet (4):
macsec: avoid use-after-free in macsec_handle_frame()
sctp: fix sctp_auth_init_hmacs() error path
team: set dev->needed_headroom in team_setup_by_port()
bonding: set dev->needed_headroom in bond_setup_by_slave()
Geert Uytterhoeven (1):
Revert "ravb: Fixed to be able to unload modules"
Greg Kroah-Hartman (1):
Linux 4.19.151
Hans de Goede (2):
platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360 platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting
Herbert Xu (1):
xfrm: Use correct address family in xfrm_state_find
Hugh Dickins (1):
mm/khugepaged: fix filemap page_to_pgoff(page) != offset
Jean Delvare (1):
i2c: i801: Exclude device from suspend direct complete optimization
Jerome Brunet (1):
i2c: meson: fix clock setting overwrite
Kajol Jain (1):
perf: Fix task_function_call() error handling
Karol Herbst (1):
drm/nouveau/mem: guard against NULL pointer access in mem_del
Linus Torvalds (1):
usermodehelper: reset umask to default before executing user process
Marc Dionne (1):
rxrpc: Fix rxkad token xdr encoding
Miquel Raynal (1):
mtd: rawnand: sunxi: Fix the probe error path
Necip Fazil Yildiran (1):
platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP
Nicolas Belin (1):
i2c: meson: fixup rate calculation with filter delay
Peilin Ye (3):
fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h
Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts
fbcon: Fix global-out-of-bounds read in fbcon_get_font()
Philip Yang (1):
drm/amdgpu: prevent double kfree ttm->sg
Randy Dunlap (1):
mdio: fix mdio-thunder.c dependency & build error
Sabrina Dubroca (1):
xfrmi: drop ignore_df check before updating pmtu
Tetsuo Handa (1):
driver core: Fix probe_count imbalance in really_probe()
Tom Rix (1):
platform/x86: thinkpad_acpi: initialize tp_nvram_state variable
Tommi Rantala (1):
perf top: Fix stdio interface input handling with glibc 2.28+
Vijay Balakrishna (1):
mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged
Vladimir Zapolskiy (1):
cifs: Fix incomplete memory allocation on setxattr path
Voon Weifeng (1):
net: stmmac: removed enabling eee in EEE set callback
Wilken Gottwalt (1):
net: usb: ax88179_178a: fix missing stop entry in driver_info
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 150 +SUBLEVEL = 151 EXTRAVERSION = NAME = "People's Front"
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts +1 -0
@@ -151,6 +151,7 @@ }; &qspi { + status = "okay"; flash@0 { #address-cells = <1>; #size-cells = <1>;
drivers/base/dd.c +3 -2
@@ -472,7 +472,8 @@ static int really_probe(struct device *dev, struct device_driver *drv) drv->bus->name, __func__, drv->name, dev_name(dev));if (!list_empty (&dev->devres_head)) {dev_crit (dev,"Resources present before probing\n" ); -return -EBUSY ; + ret = -EBUSY ; + goto done; } re_probe:
@@ -579,7 +580,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) ret =0 ; done:atomic_dec (&probe_count); -wake_up (&probe_waitqueue); +wake_up_all (&probe_waitqueue);return ret; }
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -0
@@ -954,6 +954,7 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_tt *ttm) release_sg:kfree (ttm->sg); + ttm->sg =NULL ;return r; }
drivers/gpu/drm/nouveau/nouveau_mem.c +2 -0
@@ -176,6 +176,8 @@ void nouveau_mem_del(struct ttm_mem_reg *reg) {struct nouveau_mem *mem =nouveau_mem (reg); +if (!mem) +return ;nouveau_mem_fini (mem);kfree (reg->mm_node); reg->mm_node =NULL ;
drivers/i2c/busses/i2c-i801.c +1 -0
@@ -1698,6 +1698,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)pci_set_drvdata (dev, priv); +dev_pm_set_driver_flags (&dev->dev,DPM_FLAG_NEVER_SKIP );pm_runtime_set_autosuspend_delay (&dev->dev,1000 );pm_runtime_use_autosuspend (&dev->dev);pm_runtime_put_autosuspend (&dev->dev);
drivers/i2c/busses/i2c-meson.c +30 -12
80 lines not on this page · raw message
drivers/i2c/busses/i2c-owl.c +6 -0
@@ -179,6 +179,9 @@ static irqreturn_t owl_i2c_interrupt(int irq, void *_dev) fifostat =readl (i2c_dev->base +OWL_I2C_REG_FIFOSTAT );if (fifostat &OWL_I2C_FIFOSTAT_RNB ) { i2c_dev->err = -ENXIO ; +/* Clear NACK error bit by writing "1" */ +owl_i2c_update_reg (i2c_dev->base +OWL_I2C_REG_FIFOSTAT , +OWL_I2C_FIFOSTAT_RNB , true); goto stop; }
@@ -186,6 +189,9 @@ static irqreturn_t owl_i2c_interrupt(int irq, void *_dev) stat =readl (i2c_dev->base +OWL_I2C_REG_STAT );if (stat &OWL_I2C_STAT_BEB ) { i2c_dev->err = -EIO ; +/* Clear BUS error bit by writing "1" */ +owl_i2c_update_reg (i2c_dev->base +OWL_I2C_REG_STAT , +OWL_I2C_STAT_BEB , true); goto stop; }
drivers/mmc/core/queue.c +1 -1
@@ -185,7 +185,7 @@ static void mmc_queue_setup_discard(struct request_queue *q, q->limits.discard_granularity = card->pref_erase <<9 ;/* granularity must not be greater than max. discard */ if (card->pref_erase > max_discard) - q->limits.discard_granularity =0 ; + q->limits.discard_granularity =SECTOR_SIZE ;if (mmc_can_secure_erase_trim (card))blk_queue_flag_set (QUEUE_FLAG_SECERASE , q); }
drivers/mtd/nand/raw/sunxi_nand.c +1 -1
@@ -1947,7 +1947,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc, ret =mtd_device_register (mtd,NULL ,0 );if (ret) {dev_err (dev,"failed to register mtd device: %d\n" , ret); -nand_release (nand); +nand_cleanup (nand);return ret; }
drivers/net/bonding/bond_main.c +1 -0
@@ -1123,6 +1123,7 @@ static void bond_setup_by_slave(struct net_device *bond_dev, bond_dev->type = slave_dev->type; bond_dev->hard_header_len = slave_dev->hard_header_len; + bond_dev->needed_headroom = slave_dev->needed_headroom; bond_dev->addr_len = slave_dev->addr_len; memcpy(bond_dev->broadcast, slave_dev->broadcast,
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c +10 -4
@@ -217,6 +217,9 @@ static int __mlx5e_add_vlan_rule(struct mlx5e_priv *priv,break ; } +if (WARN_ONCE (*rule_p,"VLAN rule already exists type %d" , rule_type)) +return 0 ; + *rule_p =mlx5_add_flow_rules (ft, spec, &flow_act, &dest,1 );if (IS_ERR (*rule_p)) {
@@ -397,8 +400,7 @@ static void mlx5e_add_vlan_rules(struct mlx5e_priv *priv)for_each_set_bit (i, priv->fs.vlan.active_svlans,VLAN_N_VID )mlx5e_add_vlan_rule (priv,MLX5E_VLAN_RULE_TYPE_MATCH_STAG_VID , i); -if (priv->fs.vlan.cvlan_filter_disabled && - !(priv->netdev->flags &IFF_PROMISC )) +if (priv->fs.vlan.cvlan_filter_disabled)mlx5e_add_any_vid_rules (priv); }
@@ -415,8 +417,12 @@ static void mlx5e_del_vlan_rules(struct mlx5e_priv *priv)for_each_set_bit (i, priv->fs.vlan.active_svlans,VLAN_N_VID )mlx5e_del_vlan_rule (priv,MLX5E_VLAN_RULE_TYPE_MATCH_STAG_VID , i); -if (priv->fs.vlan.cvlan_filter_disabled && - !(priv->netdev->flags &IFF_PROMISC )) +WARN_ON_ONCE (!(test_bit (MLX5E_STATE_DESTROYING , &priv->state))); + +/* must be called after DESTROY bit is set and +* set_rx_mode is called and flushed +*/ +if (priv->fs.vlan.cvlan_filter_disabled)mlx5e_del_any_vid_rules (priv); }
drivers/net/ethernet/renesas/ravb_main.c +55 -55
158 lines not on this page · raw message
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +4 -11
@@ -694,23 +694,16 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev,struct stmmac_priv *priv =netdev_priv (dev);int ret; -if (!edata->eee_enabled) { +if (!priv->dma_cap.eee) +return -EOPNOTSUPP ; + +if (!edata->eee_enabled)stmmac_disable_eee_mode (priv); - }else { -/* We are asking for enabling the EEE but it is safe -* to verify all by invoking the eee_init function. -* In case of failure it will return an error. -*/ - edata->eee_enabled =stmmac_eee_init (priv); -if (!edata->eee_enabled) -return -EOPNOTSUPP ; - } ret =phy_ethtool_set_eee (dev->phydev, edata);if (ret)return ret; - priv->eee_enabled = edata->eee_enabled; priv->tx_lpi_timer = edata->tx_lpi_timer;return 0 ; }
drivers/net/macsec.c +3 -1
@@ -1085,6 +1085,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)struct macsec_rx_sa *rx_sa;struct macsec_rxh_data *rxd;struct macsec_dev *macsec; +unsigned int len;sci_t sci;u32 pn;bool cbit;
@@ -1240,9 +1241,10 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)macsec_rxsc_put (rx_sc);skb_orphan (skb); + len = skb->len; ret =gro_cells_receive (&macsec->gro_cells, skb);if (ret ==NET_RX_SUCCESS ) -count_rx (dev, skb->len); +count_rx (dev, len);else macsec->secy.netdev->stats.rx_dropped++;
drivers/net/phy/Kconfig +1 -0
@@ -154,6 +154,7 @@ config MDIO_THUNDER depends on 64BIT depends on PCI select MDIO_CAVIUM + select MDIO_DEVRES help This driver supports the MDIO interfaces found on Cavium ThunderX SoCs when the MDIO bus device appears as a PCI
drivers/net/team/team.c +2 -1
@@ -294,7 +294,7 @@ static int __team_options_register(struct team *team,for (i--; i >=0 ; i--)__team_option_inst_del_option (team, dst_opts[i]); - i = option_count -1 ; + i = option_count; alloc_rollback:for (i--; i >=0 ; i--)kfree (dst_opts[i]);
@@ -2086,6 +2086,7 @@ static void team_setup_by_port(struct net_device *dev, dev->header_ops = port_dev->header_ops; dev->type = port_dev->type; dev->hard_header_len = port_dev->hard_header_len; + dev->needed_headroom = port_dev->needed_headroom; dev->addr_len = port_dev->addr_len; dev->mtu = port_dev->mtu;memcpy (dev->broadcast, port_dev->broadcast, port_dev->addr_len);
drivers/net/usb/ax88179_178a.c +1 -0
@@ -1735,6 +1735,7 @@ static const struct driver_info belkin_info = { .status = ax88179_status, .link_reset = ax88179_link_reset, .reset = ax88179_reset, + .stop = ax88179_stop, .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup,
drivers/net/usb/rtl8150.c +12 -4
@@ -277,12 +277,20 @@ static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)return 1 ; } -static inline void set_ethernet_addr (rtl8150_t * dev) +static void set_ethernet_addr (rtl8150_t *dev) { -u8 node_id[6 ]; +u8 node_id[ETH_ALEN ]; +int ret; + + ret =get_registers (dev,IDR ,sizeof (node_id), node_id); -get_registers (dev,IDR ,sizeof (node_id), node_id); -memcpy (dev->netdev->dev_addr, node_id,sizeof (node_id)); +if (ret ==sizeof (node_id)) { +ether_addr_copy (dev->netdev->dev_addr, node_id); + }else { +eth_hw_addr_random (dev->netdev); +netdev_notice (dev->netdev,"Assigned a random MAC address: %pM\n" , + dev->netdev->dev_addr); + } }static int rtl8150_set_mac_address (struct net_device *netdev,void *p)
drivers/nvme/host/core.c +3 -1
@@ -2606,8 +2606,10 @@ static int nvme_dev_open(struct inode *inode, struct file *file) }nvme_get_ctrl (ctrl); -if (!try_module_get (ctrl->ops->module)) +if (!try_module_get (ctrl->ops->module)) { +nvme_put_ctrl (ctrl);return -EINVAL ; + } file->private_data = ctrl;return 0 ;
drivers/platform/x86/Kconfig +1 -0
@@ -235,6 +235,7 @@ config FUJITSU_LAPTOP depends on BACKLIGHT_CLASS_DEVICE depends on ACPI_VIDEO || ACPI_VIDEO = n select INPUT_SPARSEKMAP + select NEW_LEDS select LEDS_CLASS ---help--- This is a driver for laptops built by Fujitsu:
drivers/platform/x86/intel-vbtn.c +51 -13
86 lines not on this page · raw message
drivers/platform/x86/thinkpad_acpi.c +4 -2
@@ -2597,7 +2597,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,*/ static int hotkey_kthread (void *data) { -struct tp_nvram_state s[2 ]; +struct tp_nvram_state s[2 ] = {0 };u32 poll_mask, event_mask;unsigned int si, so;unsigned long t;
@@ -6879,8 +6879,10 @@ static int __init tpacpi_query_bcl_levels(acpi_handle handle)list_for_each_entry (child, &device->children, node) {acpi_status status =acpi_evaluate_object (child->handle,"_BCL" ,NULL , &buffer); -if (ACPI_FAILURE (status)) +if (ACPI_FAILURE (status)) { + buffer.length =ACPI_ALLOCATE_BUFFER ;continue ; + } obj = (union acpi_object *)buffer.pointer;if (!obj || (obj->type !=ACPI_TYPE_PACKAGE )) {
drivers/video/console/newport_con.c +1 -6
@@ -35,12 +35,6 @@#define FONT_DATA ((unsigned char *)font_vga_8x16.data) -/* borrowed from fbcon.c */ -#define REFCOUNT (fd) (((int *)(fd))[-1]) -#define FNTSIZE (fd) (((int *)(fd))[-2]) -#define FNTCHARCNT (fd) (((int *)(fd))[-3]) -#define FONT_EXTRA_WORDS 3 -static unsigned char *font_data[MAX_NR_CONSOLES ];static struct newport_regs *npregs;
@@ -522,6 +516,7 @@ static int newport_set_font(int unit, struct console_font *op)FNTSIZE (new_data) = size;FNTCHARCNT (new_data) = op->charcount;REFCOUNT (new_data) =0 ;/* usage counter */ +FNTSUM (new_data) =0 ; p = new_data;for (i =0 ; i < op->charcount; i++) {
drivers/video/fbdev/core/fbcon.c +12 -0
@@ -2270,6 +2270,9 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font)if (font->width <=8 ) { j = vc->vc_font.height; +if (font->charcount * j >FNTSIZE (fontdata)) +return -EINVAL ; +for (i =0 ; i < font->charcount; i++) {memcpy (data, fontdata, j);memset (data + j,0 ,32 - j);
@@ -2278,6 +2281,9 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font) } }else if (font->width <=16 ) { j = vc->vc_font.height *2 ; +if (font->charcount * j >FNTSIZE (fontdata)) +return -EINVAL ; +for (i =0 ; i < font->charcount; i++) {memcpy (data, fontdata, j);memset (data + j,0 ,64 - j);
@@ -2285,6 +2291,9 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font) fontdata += j; } }else if (font->width <=24 ) { +if (font->charcount * (vc->vc_font.height *sizeof (u32)) >FNTSIZE (fontdata)) +return -EINVAL ; +for (i =0 ; i < font->charcount; i++) {for (j =0 ; j < vc->vc_font.height; j++) { *data++ = fontdata[0 ];
@@ -2297,6 +2306,9 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font) } }else { j = vc->vc_font.height *4 ; +if (font->charcount * j >FNTSIZE (fontdata)) +return -EINVAL ; +for (i =0 ; i < font->charcount; i++) {memcpy (data, fontdata, j);memset (data + j,0 ,128 - j);
drivers/video/fbdev/core/fbcon.h +0 -7
@@ -152,13 +152,6 @@ static inline int attr_col_ec(int shift, struct vc_data *vc,#define attr_bgcol_ec (bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0)#define attr_fgcol_ec (fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1) -/* Font */ -#define REFCOUNT (fd) (((int *)(fd))[-1]) -#define FNTSIZE (fd) (((int *)(fd))[-2]) -#define FNTCHARCNT (fd) (((int *)(fd))[-3]) -#define FNTSUM (fd) (((int *)(fd))[-4]) -#define FONT_EXTRA_WORDS 4 -/* * Scroll Method */
drivers/video/fbdev/core/fbcon_rotate.c +1 -0
@@ -14,6 +14,7 @@#include <linux/fb.h> #include <linux/vt_kern.h> #include <linux/console.h> +#include <linux/font.h> #include <asm/types.h> #include "fbcon.h" #include "fbcon_rotate.h"
drivers/video/fbdev/core/tileblit.c +1 -0
@@ -13,6 +13,7 @@#include <linux/fb.h> #include <linux/vt_kern.h> #include <linux/console.h> +#include <linux/font.h> #include <asm/types.h> #include "fbcon.h"
fs/cifs/smb2ops.c +1 -1
@@ -950,7 +950,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,return rc; } - len =sizeof (ea) + ea_name_len + ea_value_len +1 ; + len =sizeof (*ea) + ea_name_len + ea_value_len +1 ; ea =kzalloc (len,GFP_KERNEL );if (ea ==NULL ) {SMB2_close (xid, tcon, fid.persistent_fid, fid.volatile_fid);
include/linux/font.h +13 -0
@@ -57,4 +57,17 @@ extern const struct font_desc *get_default_font(int xres, int yres,/* Max. length for the name of a predefined font */ #define MAX_FONT_NAME 32 +/* Extra word getters */ +#define REFCOUNT (fd) (((int *)(fd))[-1]) +#define FNTSIZE (fd) (((int *)(fd))[-2]) +#define FNTCHARCNT (fd) (((int *)(fd))[-3]) +#define FNTSUM (fd) (((int *)(fd))[-4]) + +#define FONT_EXTRA_WORDS 4 + +struct font_data { +unsigned int extra[FONT_EXTRA_WORDS ]; +const unsigned char data[]; +} __packed; +#endif /* _VIDEO_FONT_H */
include/linux/khugepaged.h +5 -0
@@ -15,6 +15,7 @@ extern int __khugepaged_enter(struct mm_struct *mm);extern void __khugepaged_exit (struct mm_struct *mm);extern int khugepaged_enter_vma_merge (struct vm_area_struct *vma,unsigned long vm_flags); +extern void khugepaged_min_free_kbytes_update (void );#define khugepaged_enabled () \ (transparent_hugepage_flags & \
@@ -73,6 +74,10 @@ static inline int khugepaged_enter_vma_merge(struct vm_area_struct *vma, {return 0 ; } + +static inline void khugepaged_min_free_kbytes_update (void ) +{ +}#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #endif /* _LINUX_KHUGEPAGED_H */
include/net/xfrm.h +6 -10
@@ -1873,21 +1873,17 @@ static inline unsigned int xfrm_replay_state_esn_len(struct xfrm_replay_state_esstatic inline int xfrm_replay_clone (struct xfrm_state *x,struct xfrm_state *orig) { - x->replay_esn =kzalloc (xfrm_replay_state_esn_len (orig->replay_esn), + + x->replay_esn =kmemdup (orig->replay_esn, +xfrm_replay_state_esn_len (orig->replay_esn),GFP_KERNEL );if (!x->replay_esn)return -ENOMEM ; - - x->replay_esn->bmp_len = orig->replay_esn->bmp_len; - x->replay_esn->replay_window = orig->replay_esn->replay_window; - - x->preplay_esn =kmemdup (x->replay_esn, -xfrm_replay_state_esn_len (x->replay_esn), + x->preplay_esn =kmemdup (orig->preplay_esn, +xfrm_replay_state_esn_len (orig->preplay_esn),GFP_KERNEL ); -if (!x->preplay_esn) { -kfree (x->replay_esn); +if (!x->preplay_esn)return -ENOMEM ; - }return 0 ; }
kernel/events/core.c +3 -2
@@ -98,7 +98,7 @@ static void remote_function(void *data)* retry due to any failures in smp_call_function_single(), such as if the * task_cpu() goes offline concurrently. * -* returns @func return value or -ESRCH when the process isn't running +* returns @func return value or -ESRCH or -ENXIO when the process isn't running */ static int task_function_call (struct task_struct *p,remote_function_f func,void *info)
@@ -114,7 +114,8 @@ task_function_call(struct task_struct *p, remote_function_f func, void *info)for (;;) { ret =smp_call_function_single (task_cpu (p), remote_function, &data,1 ); - ret = !ret ? data.ret : -EAGAIN ; +if (!ret) + ret = data.ret;if (ret != -EAGAIN )break ;
kernel/umh.c +9 -0
@@ -13,6 +13,7 @@#include <linux/cred.h> #include <linux/file.h> #include <linux/fdtable.h> +#include <linux/fs_struct.h> #include <linux/workqueue.h> #include <linux/security.h> #include <linux/mount.h>
@@ -72,6 +73,14 @@ static int call_usermodehelper_exec_async(void *data)flush_signal_handlers (current,1 );spin_unlock_irq (¤t->sighand->siglock); +/* +* Initial kernel threads share ther FS with init, in order to +* get the init root directory. But we've now created a new +* thread that is going to execve a user process and has its own +* 'struct fs_struct'. Reset umask to the default. +*/ + current->fs->umask =0022 ; +/* * Our parent (unbound workqueue) runs with elevated scheduling * priority. Avoid propagating that into the userspace child.
lib/fonts/font_10x18.c +4 -5
@@ -8,8 +8,8 @@#define FONTDATAMAX 9216 -static const unsigned char fontdata_10x18[FONTDATAMAX ] = { - +static struct font_data fontdata_10x18 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/* 0 0x00 '^@' */ 0x00 ,0x00 ,/* 0000000000 */ 0x00 ,0x00 ,/* 0000000000 */
@@ -5129,8 +5129,7 @@ static const unsigned char fontdata_10x18[FONTDATAMAX] = {0x00 ,0x00 ,/* 0000000000 */ 0x00 ,0x00 ,/* 0000000000 */ 0x00, 0x00, /* 0000000000 */ - -}; +} }; const struct font_desc font_10x18 = {
@@ -5138,7 +5137,7 @@ const struct font_desc font_10x18 = { .name = "10x18", .width = 10, .height = 18, - .data = fontdata_10x18, + .data = fontdata_10x18.data,#ifdef __sparc__ .pref = 5,#else
lib/fonts/font_6x10.c +5 -4
@@ -1,8 +1,10 @@// SPDX-License-Identifier: GPL-2.0 #include <linux/font.h> -static const unsigned char fontdata_6x10[] = { +#define FONTDATAMAX 2560 +static struct font_data fontdata_6x10 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/* 0 0x00 '^@' */ 0x00 ,/* 00000000 */ 0x00 ,/* 00000000 */
@@ -3074,14 +3076,13 @@ static const unsigned char fontdata_6x10[] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - -}; +} };const struct font_desc font_6x10 = { .idx = FONT6x10_IDX, .name ="6x10" , .width =6 , .height =10 , - .data = fontdata_6x10, + .data = fontdata_6x10.data, .pref =0 , };
lib/fonts/font_6x11.c +4 -5
@@ -9,8 +9,8 @@#define FONTDATAMAX (11*256) -static const unsigned char fontdata_6x11[FONTDATAMAX ] = { - +static struct font_data fontdata_6x11 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/* 0 0x00 '^@' */ 0x00 ,/* 00000000 */ 0x00 ,/* 00000000 */
@@ -3338,8 +3338,7 @@ static const unsigned char fontdata_6x11[FONTDATAMAX] = {0x00 ,/* 00000000 */ 0x00 ,/* 00000000 */ 0x00, /* 00000000 */ - -}; +} }; const struct font_desc font_vga_6x11 = {
@@ -3347,7 +3346,7 @@ const struct font_desc font_vga_6x11 = { .name = "ProFont6x11", .width = 6, .height = 11, - .data = fontdata_6x11, + .data = fontdata_6x11.data, /* Try avoiding this font if possible unless on MAC */ .pref = -2000, };
lib/fonts/font_7x14.c +4 -5
@@ -8,8 +8,8 @@#define FONTDATAMAX 3584 -static const unsigned char fontdata_7x14[FONTDATAMAX ] = { - +static struct font_data fontdata_7x14 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/* 0 0x00 '^@' */ 0x00 ,/* 0000000 */ 0x00 ,/* 0000000 */
@@ -4105,8 +4105,7 @@ static const unsigned char fontdata_7x14[FONTDATAMAX] = {0x00 ,/* 0000000 */ 0x00 ,/* 0000000 */ 0x00, /* 0000000 */ - -}; +} }; const struct font_desc font_7x14 = {
@@ -4114,6 +4113,6 @@ const struct font_desc font_7x14 = { .name = "7x14", .width = 7, .height = 14, - .data = fontdata_7x14, + .data = fontdata_7x14.data, .pref = 0, };
lib/fonts/font_8x16.c +4 -5
@@ -10,8 +10,8 @@#define FONTDATAMAX 4096 -static const unsigned char fontdata_8x16[FONTDATAMAX ] = { - +static struct font_data fontdata_8x16 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/* 0 0x00 '^@' */ 0x00 ,/* 00000000 */ 0x00 ,/* 00000000 */
@@ -4619,8 +4619,7 @@ static const unsigned char fontdata_8x16[FONTDATAMAX] = {0x00 ,/* 00000000 */ 0x00 ,/* 00000000 */ 0x00, /* 00000000 */ - -}; +} }; const struct font_desc font_vga_8x16 = {
@@ -4628,7 +4627,7 @@ const struct font_desc font_vga_8x16 = { .name = "VGA8x16", .width = 8, .height = 16, - .data = fontdata_8x16, + .data = fontdata_8x16.data, .pref = 0, };EXPORT_SYMBOL (font_vga_8x16);
lib/fonts/font_8x8.c +4 -5
@@ -9,8 +9,8 @@#define FONTDATAMAX 2048 -static const unsigned char fontdata_8x8[FONTDATAMAX ] = { - +static struct font_data fontdata_8x8 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/* 0 0x00 '^@' */ 0x00 ,/* 00000000 */ 0x00 ,/* 00000000 */
@@ -2570,8 +2570,7 @@ static const unsigned char fontdata_8x8[FONTDATAMAX] = {0x00 ,/* 00000000 */ 0x00 ,/* 00000000 */ 0x00, /* 00000000 */ - -}; +} }; const struct font_desc font_vga_8x8 = {
@@ -2579,6 +2578,6 @@ const struct font_desc font_vga_8x8 = { .name = "VGA8x8", .width = 8, .height = 8, - .data = fontdata_8x8, + .data = fontdata_8x8.data, .pref = 0, };
lib/fonts/font_acorn_8x8.c +6 -3
@@ -3,7 +3,10 @@#include <linux/font.h> -static const unsigned char acorndata_8x8[] = { +#define FONTDATAMAX 2048 + +static struct font_data acorndata_8x8 = { +{0 ,0 ,FONTDATAMAX ,0 }, {/* 00 */ 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,/* ^@ */ /* 01 */ 0x7e ,0x81 ,0xa5 ,0x81 ,0xbd ,0x99 ,0x81 ,0x7e ,/* ^A */ /* 02 */ 0x7e ,0xff ,0xbd ,0xff ,0xc3 ,0xe7 ,0xff ,0x7e ,/* ^B */
@@ -260,14 +263,14 @@ static const unsigned char acorndata_8x8[] = { /* FD */ 0x38, 0x04, 0x18, 0x20, 0x3c, 0x00, 0x00, 0x00, /* FE */ 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00, /* FF */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; +} };const struct font_desc font_acorn_8x8 = { .idx = ACORN8x8_IDX, .name ="Acorn8x8" , .width =8 , .height =8 , - .data = acorndata_8x8, + .data = acorndata_8x8.data, #ifdef CONFIG_ARCH_ACORN .pref =20 , #else
lib/fonts/font_mini_4x6.c +4 -4
@@ -43,8 +43,8 @@ __END__;#define FONTDATAMAX 1536 -static const unsigned char fontdata_mini_4x6[FONTDATAMAX ] = { - +static struct font_data fontdata_mini_4x6 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/*{*/ /* Char 0: ' ' */ 0xee ,/*= [*** ] */
@@ -2145,14 +2145,14 @@ static const unsigned char fontdata_mini_4x6[FONTDATAMAX] = { 0xee, /*= [*** ] */ 0x00, /*= [ ] */ /*}*/ -}; +} };const struct font_desc font_mini_4x6 = { .idx = MINI4x6_IDX, .name ="MINI4x6" , .width =4 , .height =6 , - .data = fontdata_mini_4x6, + .data = fontdata_mini_4x6.data, .pref =3 , };
lib/fonts/font_pearl_8x8.c +4 -5
@@ -14,8 +14,8 @@#define FONTDATAMAX 2048 -static const unsigned char fontdata_pearl8x8[FONTDATAMAX ] = { - +static struct font_data fontdata_pearl8x8 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/* 0 0x00 '^@' */ 0x00 ,/* 00000000 */ 0x00 ,/* 00000000 */
@@ -2575,14 +2575,13 @@ static const unsigned char fontdata_pearl8x8[FONTDATAMAX] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - -}; +} };const struct font_desc font_pearl_8x8 = { .idx = PEARL8x8_IDX, .name ="PEARL8x8" , .width =8 , .height =8 , - .data = fontdata_pearl8x8, + .data = fontdata_pearl8x8.data, .pref =2 , };
lib/fonts/font_sun12x22.c +4 -5
@@ -3,8 +3,8 @@#define FONTDATAMAX 11264 -static const unsigned char fontdata_sun12x22[FONTDATAMAX ] = { - +static struct font_data fontdata_sun12x22 = { + {0 ,0 ,FONTDATAMAX ,0 }, {/* 0 0x00 '^@' */ 0x00 ,0x00 ,/* 000000000000 */ 0x00 ,0x00 ,/* 000000000000 */
@@ -6148,8 +6148,7 @@ static const unsigned char fontdata_sun12x22[FONTDATAMAX] = {0x00 ,0x00 ,/* 000000000000 */ 0x00 ,0x00 ,/* 000000000000 */ 0x00, 0x00, /* 000000000000 */ - -}; +} }; const struct font_desc font_sun_12x22 = {
@@ -6157,7 +6156,7 @@ const struct font_desc font_sun_12x22 = { .name = "SUN12x22", .width = 12, .height = 22, - .data = fontdata_sun12x22, + .data = fontdata_sun12x22.data,#ifdef __sparc__ .pref = 5,#else
lib/fonts/font_sun8x16.c +4 -3
@@ -3,7 +3,8 @@#define FONTDATAMAX 4096 -static const unsigned char fontdata_sun8x16[FONTDATAMAX ] = { +static struct font_data fontdata_sun8x16 = { +{0 ,0 ,FONTDATAMAX ,0 }, {/* */ 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,/* */ 0x00 ,0x00 ,0x7e ,0x81 ,0xa5 ,0x81 ,0x81 ,0xbd ,0x99 ,0x81 ,0x81 ,0x7e ,0x00 ,0x00 ,0x00 ,0x00 ,/* */ 0x00 ,0x00 ,0x7e ,0xff ,0xdb ,0xff ,0xff ,0xc3 ,0xe7 ,0xff ,0xff ,0x7e ,0x00 ,0x00 ,0x00 ,0x00 ,
@@ -260,14 +261,14 @@ static const unsigned char fontdata_sun8x16[FONTDATAMAX] = { /* */ 0x00,0x70,0xd8,0x30,0x60,0xc8,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* */ 0x00,0x00,0x00,0x00,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x00,0x00,0x00,0x00,0x00, /* */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; +} };const struct font_desc font_sun_8x16 = { .idx = SUN8x16_IDX, .name ="SUN8x16" , .width =8 , .height =16 , - .data = fontdata_sun8x16, + .data = fontdata_sun8x16.data, #ifdef __sparc__ .pref =10 , #else
mm/khugepaged.c +23 -2
@@ -53,6 +53,9 @@ enum scan_result {#define CREATE_TRACE_POINTS #include <trace/events/huge_memory.h> +static struct task_struct *khugepaged_thread__read_mostly ; +static DEFINE_MUTEX (khugepaged_mutex); +/* default scan 8*512 pte (or vmas) every 30 second */ static unsigned int khugepaged_pages_to_scan__read_mostly ;static unsigned int khugepaged_pages_collapsed;
@@ -820,6 +823,18 @@ static struct page *khugepaged_alloc_hugepage(bool *wait)static bool khugepaged_prealloc_page (struct page **hpage,bool *wait) { +/* +* If the hpage allocated earlier was briefly exposed in page cache +* before collapse_file() failed, it is possible that racing lookups +* have not yet completed, and would then be unpleasantly surprised by +* finding the hpage reused for the same mapping at a different offset. +* Just release the previous allocation if there is any danger of that. +*/ +if (*hpage &&page_count (*hpage) >1 ) { +put_page (*hpage); + *hpage =NULL ; + } +if (!*hpage) *hpage =khugepaged_alloc_hugepage (wait);
@@ -1940,8 +1955,6 @@ static void set_recommended_min_free_kbytes(void)int start_stop_khugepaged (void ) { -static struct task_struct *khugepaged_thread__read_mostly ; -static DEFINE_MUTEX (khugepaged_mutex);int err =0 ;mutex_lock (&khugepaged_mutex);
@@ -1968,3 +1981,11 @@ int start_stop_khugepaged(void)mutex_unlock (&khugepaged_mutex);return err; } + +void khugepaged_min_free_kbytes_update (void ) +{ +mutex_lock (&khugepaged_mutex); +if (khugepaged_enabled () && khugepaged_thread) +set_recommended_min_free_kbytes (); +mutex_unlock (&khugepaged_mutex); +}
mm/page_alloc.c +3 -0
@@ -66,6 +66,7 @@#include <linux/ftrace.h> #include <linux/lockdep.h> #include <linux/nmi.h> +#include <linux/khugepaged.h> #include <asm/sections.h> #include <asm/tlbflush.h>
@@ -7399,6 +7400,8 @@ int __meminit init_per_zone_wmark_min(void)setup_min_slab_ratio ();#endif +khugepaged_min_free_kbytes_update (); +return 0 ; }postcore_initcall (init_per_zone_wmark_min)
net/openvswitch/conntrack.c +13 -9
@@ -899,15 +899,19 @@ static int ovs_ct_nat(struct net *net, struct sw_flow_key *key, } err =ovs_ct_nat_execute (skb, ct, ctinfo, &info->range, maniptype); -if (err ==NF_ACCEPT && - ct->status &IPS_SRC_NAT && ct->status &IPS_DST_NAT ) { -if (maniptype ==NF_NAT_MANIP_SRC ) - maniptype =NF_NAT_MANIP_DST ; -else - maniptype =NF_NAT_MANIP_SRC ; - - err =ovs_ct_nat_execute (skb, ct, ctinfo, &info->range, - maniptype); +if (err ==NF_ACCEPT && ct->status &IPS_DST_NAT ) { +if (ct->status &IPS_SRC_NAT ) { +if (maniptype ==NF_NAT_MANIP_SRC ) + maniptype =NF_NAT_MANIP_DST ; +else + maniptype =NF_NAT_MANIP_SRC ; + + err =ovs_ct_nat_execute (skb, ct, ctinfo, &info->range, + maniptype); + }else if (CTINFO2DIR (ctinfo) ==IP_CT_DIR_ORIGINAL ) { + err =ovs_ct_nat_execute (skb, ct, ctinfo,NULL , +NF_NAT_MANIP_SRC ); + } }/* Mark NAT done if successful and update the flow key. */
net/rxrpc/conn_event.c +3 -3
@@ -342,18 +342,18 @@ static int rxrpc_process_event(struct rxrpc_connection *conn,return ret;spin_lock (&conn->channel_lock); -spin_lock (&conn->state_lock); +spin_lock_bh (&conn->state_lock);if (conn->state ==RXRPC_CONN_SERVICE_CHALLENGING ) { conn->state =RXRPC_CONN_SERVICE ; -spin_unlock (&conn->state_lock); +spin_unlock_bh (&conn->state_lock);for (loop =0 ; loop <RXRPC_MAXCALLS ; loop++)rxrpc_call_is_secure (rcu_dereference_protected ( conn->channels[loop].call,lockdep_is_held (&conn->channel_lock))); }else { -spin_unlock (&conn->state_lock); +spin_unlock_bh (&conn->state_lock); }spin_unlock (&conn->channel_lock);
net/rxrpc/key.c +13 -5
@@ -905,7 +905,7 @@ int rxrpc_request_key(struct rxrpc_sock *rx, char __user *optval, int optlen)_enter ("" ); -if (optlen <=0 || optlen >PAGE_SIZE -1 ) +if (optlen <=0 || optlen >PAGE_SIZE -1 || rx->securities)return -EINVAL ; description =memdup_user_nul (optval, optlen);
@@ -1075,7 +1075,7 @@ static long rxrpc_read(const struct key *key,switch (token->security_index) {case RXRPC_SECURITY_RXKAD : - toksize +=9 *4 ;/* viceid, kvno, key*2 + len, begin, + toksize +=8 *4 ;/* viceid, kvno, key*2, begin, * end, primary, tktlen */ toksize +=RND (token->kad->ticket_len);break ;
@@ -1110,7 +1110,8 @@ static long rxrpc_read(const struct key *key,break ;default :/* we have a ticket we can't encode */ -BUG (); +pr_err ("Unsupported key token type (%u)\n" , + token->security_index);continue ; }
@@ -1141,6 +1142,14 @@ static long rxrpc_read(const struct key *key,memcpy ((u8 *)xdr + _l, &zero,4 - (_l &3 )); \ xdr += (_l +3 ) >>2 ; \ } while(0) +#define ENCODE_BYTES (l, s) \ + do { \ + u32 _l = (l); \ + memcpy(xdr, (s), _l); \ + if (_l & 3) \ + memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3)); \ + xdr += (_l + 3) >> 2; \ + } while(0)#define ENCODE64 (x) \ do { \ __be64 y = cpu_to_be64(x); \
@@ -1168,7 +1177,7 @@ static long rxrpc_read(const struct key *key,case RXRPC_SECURITY_RXKAD :ENCODE (token->kad->vice_id);ENCODE (token->kad->kvno); -ENCODE_DATA (8 , token->kad->session_key); +ENCODE_BYTES (8 , token->kad->session_key);ENCODE (token->kad->start);ENCODE (token->kad->expiry);ENCODE (token->kad->primary_flag);
@@ -1218,7 +1227,6 @@ static long rxrpc_read(const struct key *key,break ;default : -BUG ();break ; }
net/sctp/auth.c +1 -0
@@ -515,6 +515,7 @@ int sctp_auth_init_hmacs(struct sctp_endpoint *ep, gfp_t gfp) out_err:/* Clean up any successful allocations */ sctp_auth_destroy_hmacs (ep->auth_hmacs); + ep->auth_hmacs =NULL ;return -ENOMEM ; }
net/wireless/nl80211.c +3 -0
@@ -3621,6 +3621,9 @@ static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info)if (err)return err; +if (key.idx <0 ) +return -EINVAL ; +if (info->attrs[NL80211_ATTR_MAC ]) mac_addr =nla_data (info->attrs[NL80211_ATTR_MAC ]);
net/xfrm/xfrm_interface.c +1 -1
@@ -293,7 +293,7 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl) } mtu =dst_mtu (dst); -if (!skb->ignore_df && skb->len > mtu) { +if (skb->len > mtu) {skb_dst_update_pmtu_no_confirm (skb, mtu);if (skb->protocol ==htons (ETH_P_IPV6 )) {
net/xfrm/xfrm_state.c +37 -5
90 lines not on this page · raw message
tools/perf/builtin-top.c +3 -1
@@ -651,7 +651,9 @@ static void *display_thread(void *arg) delay_msecs = top->delay_secs *MSEC_PER_SEC ;set_term_quiet_input (&save);/* trash return*/ -getc (stdin); +clearerr (stdin); +if (poll (&stdin_poll,1 ,0 ) >0 ) +getc (stdin);while (!done) {perf_top__print_sym_table (top);