Linux 4.9.325
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.325 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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/alpha/kernel/srmcons.c | 2 drivers/char/random.c | 4 - drivers/i2c/busses/i2c-cadence.c | 30 +---------- drivers/mfd/rtsx_usb.c | 27 +++++++--- drivers/net/ethernet/emulex/benet/be_cmds.c | 10 +-- drivers/net/ethernet/emulex/benet/be_cmds.h | 2 drivers/net/ethernet/emulex/benet/be_ethtool.c | 31 +++++++---- drivers/net/usb/ax88179_178a.c | 14 ++--- drivers/power/reset/arm-versatile-reboot.c | 1 drivers/s390/char/keyboard.h | 4 - drivers/tty/cyclades.c | 6 +- drivers/tty/goldfish.c | 2 drivers/tty/moxa.c | 4 - drivers/tty/pty.c | 14 ----- drivers/tty/serial/lpc32xx_hs.c | 2 drivers/tty/tty_buffer.c | 66 ++++++++++++++++--------- drivers/tty/vt/keyboard.c | 6 +- drivers/tty/vt/vt.c | 2 drivers/xen/gntdev.c | 3 - include/linux/lsm_hooks.h | 7 -- include/linux/mfd/rtsx_usb.h | 2 include/linux/security.h | 6 -- include/linux/tty_flip.h | 4 + include/net/inet_sock.h | 3 - include/net/ip.h | 2 include/net/tcp.h | 2 kernel/bpf/core.c | 8 +-- kernel/events/core.c | 45 +++++++++++------ kernel/exit.c | 19 ------- mm/mempolicy.c | 2 net/ipv4/igmp.c | 23 +++++--- net/ipv4/tcp_output.c | 2 net/xfrm/xfrm_policy.c | 5 + security/security.c | 6 -- security/selinux/hooks.c | 6 -- security/smack/smack_lsm.c | 20 ------- sound/core/memalloc.c | 1 38 files changed, 188 insertions(+), 207 deletions(-)
Demi Marie Obenour (1):
xen/gntdev: Ignore failure to unmap INVALID_GRANT_HANDLE
Eric Dumazet (1):
bpf: Make sure mac_header was set before using it
Greg Kroah-Hartman (1):
Linux 4.9.325
Hangyu Hua (1):
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup()
Hristo Venev (1):
be2net: Fix buffer overflow in be_get_module_eeprom
Jason A. Donenfeld (1):
Revert "Revert "char/random: silence a lockdep splat with printk()""
Jiri Slaby (5):
tty: drivers/tty/, stop using tty_schedule_flip()
tty: the rest, stop using tty_schedule_flip()
tty: drop tty_schedule_flip()
tty: extract tty_flip_buffer_commit() from tty_flip_buffer_push()
tty: use new tty_insert_flip_string_and_push_buffer() in pty_write()
Jose Alonso (1):
net: usb: ax88179_178a needs FLAG_SEND_ZLP
Kuniyuki Iwashima (6):
ip: Fix a data-race around sysctl_fwmark_reflect. tcp/dccp: Fix a data-race around sysctl_tcp_fwmark_accept.
tcp: Fix a data-race around sysctl_tcp_probe_threshold.
igmp: Fix data-races around sysctl_igmp_llm_reports.
igmp: Fix a data-race around sysctl_igmp_max_memberships.
tcp: Fix a data-race around sysctl_tcp_notsent_lowat.
Miaoqian Lin (1):
power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe
Peter Zijlstra (1):
perf/core: Fix data race between perf_event_set_output() and perf_mmap_close()
Robert Hancock (1):
i2c: cadence: Change large transfer count reset logic to be unconditional
Shuah Khan (3):
misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
misc: rtsx_usb: use separate command and response buffers
misc: rtsx_usb: set return value in rsp_buf alloc err path
Stephen Smalley (1):
security,selinux,smack: kill security_task_wait hook
Takashi Iwai (1):
ALSA: memalloc: Align buffer allocations in page size
Wang Cheng (1):
mm/mempolicy: fix uninit-value in mpol_rebind_policy()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 324 +SUBLEVEL = 325 EXTRAVERSION = NAME = Roaring Lionus
arch/alpha/kernel/srmcons.c +1 -1
@@ -58,7 +58,7 @@ srmcons_do_receive_chars(struct tty_port *port) }while ((result.bits.status &1 ) && (++loops <10 ));if (count) -tty_schedule_flip (port); +tty_flip_buffer_push (port);return count; }
drivers/char/random.c +2 -2
@@ -184,8 +184,8 @@ static void __cold process_random_ready_list(void)#define warn_unseeded_randomness () \ if (IS_ENABLED(CONFIG_WARN_ALL_UNSEEDED_RANDOM) && !crng_ready()) \ - pr_notice("%s called from %pS with crng_init=%d\n", \ - __func__, (void *)_RET_IP_, crng_init) + printk_deferred(KERN_NOTICE "random: %s called from %pS with crng_init=%d\n", \ + __func__, (void *)_RET_IP_, crng_init)/*********************************************************************
drivers/i2c/busses/i2c-cadence.c +5 -25
@@ -203,9 +203,9 @@ static inline bool cdns_is_holdquirk(struct cdns_i2c *id, bool hold_wrkaround)*/ static irqreturn_t cdns_i2c_isr (int irq,void *ptr) { -unsigned int isr_status, avail_bytes, updatetx; +unsigned int isr_status, avail_bytes;unsigned int bytes_to_send; -bool hold_quirk; +bool updatetx;struct cdns_i2c *id = ptr;/* Signal completion only after everything is updated */ int done_flag =0 ;
@@ -224,11 +224,7 @@ static irqreturn_t cdns_i2c_isr(int irq, void *ptr)* Check if transfer size register needs to be updated again for a * large data receive operation. */ - updatetx =0 ; -if (id->recv_count > id->curr_recv_count) - updatetx =1 ; - - hold_quirk = (id->quirks &CDNS_I2C_BROKEN_HOLD_BIT ) && updatetx; + updatetx = id->recv_count > id->curr_recv_count;/* When receiving, handle data interrupt and completion interrupt */ if (id->p_recv_buf &&
@@ -251,7 +247,7 @@ static irqreturn_t cdns_i2c_isr(int irq, void *ptr) id->recv_count--; id->curr_recv_count--; -if (cdns_is_holdquirk (id, hold_quirk)) +if (cdns_is_holdquirk (id, updatetx))break ; }
@@ -262,7 +258,7 @@ static irqreturn_t cdns_i2c_isr(int irq, void *ptr)* maintain transfer size non-zero while performing a large * receive operation. */ -if (cdns_is_holdquirk (id, hold_quirk)) { +if (cdns_is_holdquirk (id, updatetx)) {/* wait while fifo is full */ while (cdns_i2c_readreg (CDNS_I2C_XFER_SIZE_OFFSET ) != (id->curr_recv_count -CDNS_I2C_FIFO_DEPTH ))
@@ -284,22 +280,6 @@ static irqreturn_t cdns_i2c_isr(int irq, void *ptr) CDNS_I2C_XFER_SIZE_OFFSET); id->curr_recv_count = id->recv_count; } - }else if (id->recv_count && !hold_quirk && - !id->curr_recv_count) { - -/* Set the slave address in address register*/ -cdns_i2c_writereg (id->p_msg->addr &CDNS_I2C_ADDR_MASK , -CDNS_I2C_ADDR_OFFSET ); - -if (id->recv_count >CDNS_I2C_TRANSFER_SIZE ) { -cdns_i2c_writereg (CDNS_I2C_TRANSFER_SIZE , -CDNS_I2C_XFER_SIZE_OFFSET ); - id->curr_recv_count =CDNS_I2C_TRANSFER_SIZE ; - }else { -cdns_i2c_writereg (id->recv_count, -CDNS_I2C_XFER_SIZE_OFFSET ); - id->curr_recv_count = id->recv_count; - } }/* Clear hold (if not repeated start) and signal completion */
drivers/mfd/rtsx_usb.c +19 -8
@@ -642,16 +642,20 @@ static int rtsx_usb_probe(struct usb_interface *intf, ucr->pusb_dev = usb_dev; - ucr->iobuf =usb_alloc_coherent (ucr->pusb_dev,IOBUF_SIZE , -GFP_KERNEL , &ucr->iobuf_dma); -if (!ucr->iobuf) + ucr->cmd_buf =kmalloc (IOBUF_SIZE ,GFP_KERNEL ); +if (!ucr->cmd_buf)return -ENOMEM ; + ucr->rsp_buf =kmalloc (IOBUF_SIZE ,GFP_KERNEL ); +if (!ucr->rsp_buf) { + ret = -ENOMEM ; + goto out_free_cmd_buf; + } +usb_set_intfdata (intf, ucr); ucr->vendor_id = id->idVendor; ucr->product_id = id->idProduct; - ucr->cmd_buf = ucr->rsp_buf = ucr->iobuf;mutex_init (&ucr->dev_mutex);
@@ -679,8 +683,11 @@ static int rtsx_usb_probe(struct usb_interface *intf, out_init_fail:usb_set_intfdata (ucr->pusb_intf,NULL ); -usb_free_coherent (ucr->pusb_dev,IOBUF_SIZE , ucr->iobuf, - ucr->iobuf_dma); +kfree (ucr->rsp_buf); + ucr->rsp_buf =NULL ; +out_free_cmd_buf: +kfree (ucr->cmd_buf); + ucr->cmd_buf =NULL ;return ret; }
@@ -693,8 +700,12 @@ static void rtsx_usb_disconnect(struct usb_interface *intf)mfd_remove_devices (&intf->dev);usb_set_intfdata (ucr->pusb_intf,NULL ); -usb_free_coherent (ucr->pusb_dev,IOBUF_SIZE , ucr->iobuf, - ucr->iobuf_dma); + +kfree (ucr->cmd_buf); + ucr->cmd_buf =NULL ; + +kfree (ucr->rsp_buf); + ucr->rsp_buf =NULL ; }#ifdef CONFIG_PM
drivers/net/ethernet/emulex/benet/be_cmds.c +5 -5
@@ -2291,7 +2291,7 @@ int be_cmd_get_beacon_state(struct be_adapter *adapter, u8 port_num, u32 *state)/* Uses sync mcc */ int be_cmd_read_port_transceiver_data (struct be_adapter *adapter, -u8 page_num,u8 *data) +u8 page_num,u32 off,u32 len,u8 *data) {struct be_dma_mem cmd;struct be_mcc_wrb *wrb;
@@ -2325,10 +2325,10 @@ int be_cmd_read_port_transceiver_data(struct be_adapter *adapter, req->port =cpu_to_le32 (adapter->hba_port_num); req->page_num =cpu_to_le32 (page_num); status =be_mcc_notify_wait (adapter); -if (!status) { +if (!status && len >0 ) {struct be_cmd_resp_port_type *resp = cmd.va; -memcpy (data, resp->page_data,PAGE_DATA_LEN ); +memcpy (data, resp->page_data + off, len); } err:mutex_unlock (&adapter->mcc_lock);
@@ -2419,7 +2419,7 @@ int be_cmd_query_cable_type(struct be_adapter *adapter)int status; status =be_cmd_read_port_transceiver_data (adapter,TR_PAGE_A0 , - page_data); +0 ,PAGE_DATA_LEN , page_data);if (!status) {switch (adapter->phy.interface_type) {case PHY_TYPE_QSFP :
@@ -2444,7 +2444,7 @@ int be_cmd_query_sfp_info(struct be_adapter *adapter)int status; status =be_cmd_read_port_transceiver_data (adapter,TR_PAGE_A0 , - page_data); +0 ,PAGE_DATA_LEN , page_data);if (!status) {strlcpy (adapter->phy.vendor_name, page_data +SFP_VENDOR_NAME_OFFSET ,SFP_VENDOR_NAME_LEN -1 );
drivers/net/ethernet/emulex/benet/be_cmds.h +1 -1
@@ -2431,7 +2431,7 @@ int be_cmd_set_beacon_state(struct be_adapter *adapter, u8 port_num, u8 beacon,int be_cmd_get_beacon_state (struct be_adapter *adapter,u8 port_num,u32 *state);int be_cmd_read_port_transceiver_data (struct be_adapter *adapter, -u8 page_num,u8 *data); +u8 page_num,u32 off,u32 len,u8 *data);int be_cmd_query_cable_type (struct be_adapter *adapter);int be_cmd_query_sfp_info (struct be_adapter *adapter); int lancer_cmd_read_object(struct be_adapter *adapter, struct be_dma_mem *cmd,
drivers/net/ethernet/emulex/benet/be_ethtool.c +19 -12
@@ -1345,7 +1345,7 @@ static int be_get_module_info(struct net_device *netdev,return -EOPNOTSUPP ; status =be_cmd_read_port_transceiver_data (adapter,TR_PAGE_A0 , - page_data); +0 ,PAGE_DATA_LEN , page_data);if (!status) {if (!page_data[SFP_PLUS_SFF_8472_COMP ]) { modinfo->type =ETH_MODULE_SFF_8079 ;
@@ -1363,25 +1363,32 @@ static int be_get_module_eeprom(struct net_device *netdev, {struct be_adapter *adapter =netdev_priv (netdev);int status; +u32 begin, end;if (!check_privilege (adapter,MAX_PRIVILEGES ))return -EOPNOTSUPP ; - status =be_cmd_read_port_transceiver_data (adapter,TR_PAGE_A0 , - data); -if (status) - goto err; + begin = eeprom->offset; + end = eeprom->offset + eeprom->len; + +if (begin <PAGE_DATA_LEN ) { + status =be_cmd_read_port_transceiver_data (adapter,TR_PAGE_A0 , begin, +min_t (u32, end,PAGE_DATA_LEN ) - begin, + data); +if (status) + goto err; + + data +=PAGE_DATA_LEN - begin; + begin =PAGE_DATA_LEN ; + } -if (eeprom->offset + eeprom->len >PAGE_DATA_LEN ) { - status =be_cmd_read_port_transceiver_data (adapter, -TR_PAGE_A2 , - data + -PAGE_DATA_LEN ); +if (end >PAGE_DATA_LEN ) { + status =be_cmd_read_port_transceiver_data (adapter,TR_PAGE_A2 , + begin -PAGE_DATA_LEN , + end - begin, data);if (status) goto err; } -if (eeprom->offset) -memcpy (data, data + eeprom->offset, eeprom->len); err:return be_cmd_status (status); }
drivers/net/usb/ax88179_178a.c +7 -7
@@ -1703,7 +1703,7 @@ static const struct driver_info ax88179_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX, + .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1716,7 +1716,7 @@ static const struct driver_info ax88178a_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX, + .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1729,7 +1729,7 @@ static const struct driver_info cypress_GX3_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX, + .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1742,7 +1742,7 @@ static const struct driver_info dlink_dub1312_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX, + .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1755,7 +1755,7 @@ static const struct driver_info sitecom_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX, + .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1768,7 +1768,7 @@ static const struct driver_info samsung_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX, + .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1781,7 +1781,7 @@ static const struct driver_info lenovo_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX, + .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
drivers/power/reset/arm-versatile-reboot.c +1 -0
@@ -150,6 +150,7 @@ static int __init versatile_reboot_probe(void) versatile_reboot_type = (enum versatile_reboot )reboot_id->data; syscon_regmap =syscon_node_to_regmap (np); +of_node_put (np);if (IS_ERR (syscon_regmap))return PTR_ERR (syscon_regmap);
drivers/s390/char/keyboard.h +2 -2
@@ -44,7 +44,7 @@ static inline void kbd_put_queue(struct tty_port *port, int ch) { tty_insert_flip_char(port, ch, 0); -tty_schedule_flip (port); +tty_flip_buffer_push (port); } static inline void
@@ -52,5 +52,5 @@ kbd_puts_queue(struct tty_port *port, char *cp) {while (*cp)tty_insert_flip_char (port, *cp++,0 ); -tty_schedule_flip (port); +tty_flip_buffer_push (port); }
drivers/tty/cyclades.c +3 -3
@@ -556,7 +556,7 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip, } info->idle_stats.recv_idle = jiffies; } -tty_schedule_flip (port); +tty_flip_buffer_push (port);/* end of service */ cyy_writeb (info, CyRIR, save_xir &0x3f );
@@ -998,7 +998,7 @@ static void cyz_handle_rx(struct cyclades_port *info) jiffies + 1);#endif info->idle_stats.recv_idle = jiffies; -tty_schedule_flip (&info->port); +tty_flip_buffer_push (&info->port);/* Update rx_get */ cy_writel (&buf_ctrl->rx_get, new_rx_get);
@@ -1174,7 +1174,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)if (delta_count)wake_up_interruptible (&info->port.delta_msr_wait);if (special_count) -tty_schedule_flip (&info->port); +tty_flip_buffer_push (&info->port); } }
drivers/tty/goldfish.c +1 -1
@@ -85,7 +85,7 @@ static irqreturn_t goldfish_tty_interrupt(int irq, void *dev_id)writel (count, base +GOLDFISH_TTY_DATA_LEN );writel (GOLDFISH_TTY_CMD_READ_BUFFER , base +GOLDFISH_TTY_CMD );spin_unlock_irqrestore (&qtty->lock, irq_flags); -tty_schedule_flip (&qtty->port); +tty_flip_buffer_push (&qtty->port);return IRQ_HANDLED ; }
drivers/tty/moxa.c +2 -2
@@ -1397,7 +1397,7 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle,if (inited && !tty_throttled (tty) &&MoxaPortRxQueue (p) >0 ) {/* RX */ MoxaPortReadData (p); -tty_schedule_flip (&p->port); +tty_flip_buffer_push (&p->port); } }else {clear_bit (EMPTYWAIT , &p->statusflags);
@@ -1422,7 +1422,7 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle,if (tty && (intr & IntrBreak) && !I_IGNBRK (tty)) {/* BREAK */ tty_insert_flip_char (&p->port,0 ,TTY_BREAK ); -tty_schedule_flip (&p->port); +tty_flip_buffer_push (&p->port); }if (intr & IntrLine)
drivers/tty/pty.c +2 -12
@@ -106,21 +106,11 @@ static void pty_unthrottle(struct tty_struct *tty)static int pty_write (struct tty_struct *tty,const unsigned char *buf,int c) {struct tty_struct *to = tty->link; -unsigned long flags; -if (tty->stopped) +if (tty->stopped || !c)return 0 ; -if (c >0 ) { -spin_lock_irqsave (&to->port->lock, flags); -/* Stuff the data into the input queue of the other end */ - c =tty_insert_flip_string (to->port, buf, c); -spin_unlock_irqrestore (&to->port->lock, flags); -/* And shovel */ -if (c) -tty_flip_buffer_push (to->port); - } -return c; +return tty_insert_flip_string_and_push_buffer (to->port, buf, c); }/**
drivers/tty/serial/lpc32xx_hs.c +1 -1
@@ -350,7 +350,7 @@ static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id) LPC32XX_HSUART_IIR(port->membase)); port->icount.overrun++;tty_insert_flip_char (tport,0 ,TTY_OVERRUN ); -tty_schedule_flip (tport); +tty_flip_buffer_push (tport); }/* Data received? */
drivers/tty/tty_buffer.c +44 -22
87 lines not on this page · raw message
drivers/tty/vt/keyboard.c +3 -3
@@ -308,7 +308,7 @@ int kbd_rate(struct kbd_repeat *rpt)static void put_queue (struct vc_data *vc,int ch) {tty_insert_flip_char (&vc->port, ch,0 ); -tty_schedule_flip (&vc->port); +tty_flip_buffer_push (&vc->port); }static void puts_queue (struct vc_data *vc,char *cp)
@@ -317,7 +317,7 @@ static void puts_queue(struct vc_data *vc, char *cp)tty_insert_flip_char (&vc->port, *cp,0 ); cp++; } -tty_schedule_flip (&vc->port); +tty_flip_buffer_push (&vc->port); }static void applkey (struct vc_data *vc,int key,char mode)
@@ -562,7 +562,7 @@ static void fn_inc_console(struct vc_data *vc)static void fn_send_intr (struct vc_data *vc) {tty_insert_flip_char (&vc->port,0 ,TTY_BREAK ); -tty_schedule_flip (&vc->port); +tty_flip_buffer_push (&vc->port); }static void fn_scroll_forw (struct vc_data *vc)
drivers/tty/vt/vt.c +1 -1
@@ -1484,7 +1484,7 @@ static void respond_string(const char *p, struct tty_port *port)tty_insert_flip_char (port, *p,0 ); p++; } -tty_schedule_flip (port); +tty_flip_buffer_push (port); }static void cursor_report (struct vc_data *vc,struct tty_struct *tty)
drivers/xen/gntdev.c +2 -1
@@ -390,7 +390,8 @@ static void __unmap_grant_pages_done(int result,unsigned int offset = data->unmap_ops - map->unmap_ops;for (i =0 ; i < data->count; i++) { -WARN_ON (map->unmap_ops[offset+i].status); +WARN_ON (map->unmap_ops[offset+i].status && + map->unmap_ops[offset+i].handle !=-1 );pr_debug ("unmap handle=%d st=%d\n" , map->unmap_ops[offset+i].handle, map->unmap_ops[offset+i].status);
include/linux/lsm_hooks.h +0 -7
@@ -666,11 +666,6 @@* @sig contains the signal value. * @secid contains the sid of the process where the signal originated * Return 0 if permission is granted. -* @task_wait: -* Check permission before allowing a process to reap a child process @p -* and collect its status information. -* @p contains the task_struct for process. -* Return 0 if permission is granted. * @task_prctl: * Check permission before performing a process control operation on the * current process.
@@ -1507,7 +1502,6 @@ union security_list_options {int (*task_movememory)(struct task_struct *p);int (*task_kill)(struct task_struct *p,struct siginfo *info,int sig,u32 secid); -int (*task_wait)(struct task_struct *p);int (*task_prctl)(int option,unsigned long arg2,unsigned long arg3,unsigned long arg4,unsigned long arg5);void (*task_to_inode)(struct task_struct *p,struct inode *inode);
@@ -1768,7 +1762,6 @@ struct security_hook_heads {struct list_head task_getscheduler;struct list_head task_movememory;struct list_head task_kill; -struct list_head task_wait;struct list_head task_prctl;struct list_head task_to_inode;struct list_head ipc_permission;
include/linux/mfd/rtsx_usb.h +0 -2
@@ -65,8 +65,6 @@ struct rtsx_ucr {struct usb_device *pusb_dev;struct usb_interface *pusb_intf;struct usb_sg_request current_sg; -unsigned char *iobuf; -dma_addr_t iobuf_dma;struct timer_list sg_timer;struct mutex dev_mutex;
include/linux/security.h +0 -6
@@ -332,7 +332,6 @@ int security_task_getscheduler(struct task_struct *p);int security_task_movememory (struct task_struct *p);int security_task_kill (struct task_struct *p,struct siginfo *info,int sig,u32 secid); -int security_task_wait (struct task_struct *p);int security_task_prctl (int option,unsigned long arg2,unsigned long arg3,unsigned long arg4,unsigned long arg5);void security_task_to_inode (struct task_struct *p,struct inode *inode);
@@ -980,11 +979,6 @@ static inline int security_task_kill(struct task_struct *p,return 0 ; } -static inline int security_task_wait (struct task_struct *p) -{ -return 0 ; -} - static inline int security_task_prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4,
include/linux/tty_flip.h +3 -1
@@ -11,7 +11,6 @@ extern int tty_insert_flip_string_fixed_flag(struct tty_port *port,extern int tty_prepare_flip_string (struct tty_port *port,unsigned char **chars,size_t size);extern void tty_flip_buffer_push (struct tty_port *port); -void tty_schedule_flip (struct tty_port *port);int __tty_insert_flip_char (struct tty_port *port,unsigned char ch,char flag); static inline int tty_insert_flip_char(struct tty_port *port,
@@ -39,4 +38,7 @@ static inline int tty_insert_flip_string(struct tty_port *port,extern void tty_buffer_lock_exclusive (struct tty_port *port);extern void tty_buffer_unlock_exclusive (struct tty_port *port); +int tty_insert_flip_string_and_push_buffer (struct tty_port *port, +const unsigned char *chars,size_t cnt); +#endif /* _LINUX_TTY_FLIP_H */
include/net/inet_sock.h +2 -1
@@ -113,7 +113,8 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)static inline u32 inet_request_mark (const struct sock *sk,struct sk_buff *skb) { -if (!sk->sk_mark &&sock_net (sk)->ipv4.sysctl_tcp_fwmark_accept) +if (!sk->sk_mark && +READ_ONCE (sock_net (sk)->ipv4.sysctl_tcp_fwmark_accept))return skb->mark;return sk->sk_mark;
include/net/ip.h +1 -1
@@ -283,7 +283,7 @@ void ipfrag_init(void);void ip_static_sysctl_init (void );#define IP4_REPLY_MARK (net, mark) \ - ((net)->ipv4.sysctl_fwmark_reflect ? (mark) : 0) + (READ_ONCE((net)->ipv4.sysctl_fwmark_reflect) ? (mark) : 0)static inline bool ip_is_fragment (const struct iphdr *iph) {
include/net/tcp.h +1 -1
@@ -1788,7 +1788,7 @@ void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, __be32 daddr);static inline u32 tcp_notsent_lowat (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); -return tp->notsent_lowat ?: net->ipv4.sysctl_tcp_notsent_lowat; +return tp->notsent_lowat ?:READ_ONCE (net->ipv4.sysctl_tcp_notsent_lowat); }static inline bool tcp_stream_memory_free (const struct sock *sk)
kernel/bpf/core.c +5 -3
@@ -60,11 +60,13 @@ void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, uns {u8 *ptr =NULL ; -if (k >=SKF_NET_OFF ) +if (k >=SKF_NET_OFF ) { ptr =skb_network_header (skb) + k -SKF_NET_OFF ; -else if (k >=SKF_LL_OFF ) + }else if (k >=SKF_LL_OFF ) { +if (unlikely (!skb_mac_header_was_set (skb))) +return NULL ; ptr =skb_mac_header (skb) + k -SKF_LL_OFF ; - + }if (ptr >= skb->head && ptr + size <=skb_tail_pointer (skb))return ptr;
kernel/events/core.c +31 -14
89 lines not on this page · raw message
kernel/exit.c +2 -17
@@ -14,7 +14,6 @@#include <linux/tty.h> #include <linux/iocontext.h> #include <linux/key.h> -#include <linux/security.h> #include <linux/cpu.h> #include <linux/acct.h> #include <linux/tsacct_kern.h>
@@ -1342,7 +1341,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)* Returns nonzero for a final return, when we have unlocked tasklist_lock. * Returns zero if the search for a child should continue; * then ->notask_error is 0 if @p is an eligible child, -* or another error from security_task_wait(), or still -ECHILD. +* or still -ECHILD. */ static int wait_consider_task (struct wait_opts *wo,int ptrace,struct task_struct *p)
@@ -1362,20 +1361,6 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,if (!ret)return ret; - ret =security_task_wait (p); -if (unlikely (ret <0 )) { -/* -* If we have not yet seen any eligible child, -* then let this error code replace -ECHILD. -* A permission error will give the user a clue -* to look for security policy problems, rather -* than for mysterious wait bugs. -*/ -if (wo->notask_error) - wo->notask_error = ret; -return 0 ; - } -if (unlikely (exit_state ==EXIT_TRACE )) {/* * ptrace == 0 means we are the natural parent. In this case
@@ -1468,7 +1453,7 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,* Returns nonzero for a final return, when we have unlocked tasklist_lock. * Returns zero if the search for a child should continue; then * ->notask_error is 0 if there were any eligible children, -* or another error from security_task_wait(), or still -ECHILD. +* or still -ECHILD. */ static int do_wait_thread (struct wait_opts *wo,struct task_struct *tsk) {
mm/mempolicy.c +1 -1
@@ -396,7 +396,7 @@ static void mpol_rebind_preferred(struct mempolicy *pol,static void mpol_rebind_policy (struct mempolicy *pol,const nodemask_t *newmask,enum mpol_rebind_step step) { -if (!pol) +if (!pol || pol->mode ==MPOL_LOCAL )return ;if (!mpol_store_user_nodemask (pol) && step ==MPOL_REBIND_ONCE &&nodes_equal (pol->w.cpuset_mems_allowed, *newmask))
net/ipv4/igmp.c +14 -9
@@ -474,7 +474,8 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,if (pmc->multiaddr ==IGMP_ALL_HOSTS )return skb; -if (ipv4_is_local_multicast (pmc->multiaddr) && !net->ipv4.sysctl_igmp_llm_reports) +if (ipv4_is_local_multicast (pmc->multiaddr) && + !READ_ONCE (net->ipv4.sysctl_igmp_llm_reports))return skb; mtu =READ_ONCE (dev->mtu);
@@ -600,7 +601,7 @@ static int igmpv3_send_report(struct in_device *in_dev, struct ip_mc_list *pmc)if (pmc->multiaddr ==IGMP_ALL_HOSTS )continue ;if (ipv4_is_local_multicast (pmc->multiaddr) && - !net->ipv4.sysctl_igmp_llm_reports) + !READ_ONCE (net->ipv4.sysctl_igmp_llm_reports))continue ;spin_lock_bh (&pmc->lock);if (pmc->sfcount[MCAST_EXCLUDE ])
@@ -743,7 +744,8 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc,if (type ==IGMPV3_HOST_MEMBERSHIP_REPORT )return igmpv3_send_report (in_dev, pmc); -if (ipv4_is_local_multicast (group) && !net->ipv4.sysctl_igmp_llm_reports) +if (ipv4_is_local_multicast (group) && + !READ_ONCE (net->ipv4.sysctl_igmp_llm_reports))return 0 ;if (type ==IGMP_HOST_LEAVE_MESSAGE )
@@ -921,7 +923,8 @@ static bool igmp_heard_report(struct in_device *in_dev, __be32 group)if (group ==IGMP_ALL_HOSTS )return false; -if (ipv4_is_local_multicast (group) && !net->ipv4.sysctl_igmp_llm_reports) +if (ipv4_is_local_multicast (group) && + !READ_ONCE (net->ipv4.sysctl_igmp_llm_reports))return false;rcu_read_lock ();
@@ -1031,7 +1034,7 @@ static bool igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,if (im->multiaddr ==IGMP_ALL_HOSTS )continue ;if (ipv4_is_local_multicast (im->multiaddr) && - !net->ipv4.sysctl_igmp_llm_reports) + !READ_ONCE (net->ipv4.sysctl_igmp_llm_reports))continue ;spin_lock_bh (&im->lock);if (im->tm_running)
@@ -1272,7 +1275,8 @@ static void igmp_group_dropped(struct ip_mc_list *im)#ifdef CONFIG_IP_MULTICAST if (im->multiaddr ==IGMP_ALL_HOSTS )return ; -if (ipv4_is_local_multicast (im->multiaddr) && !net->ipv4.sysctl_igmp_llm_reports) +if (ipv4_is_local_multicast (im->multiaddr) && + !READ_ONCE (net->ipv4.sysctl_igmp_llm_reports))return ; reporter = im->reporter;
@@ -1309,7 +1313,8 @@ static void igmp_group_added(struct ip_mc_list *im)#ifdef CONFIG_IP_MULTICAST if (im->multiaddr ==IGMP_ALL_HOSTS )return ; -if (ipv4_is_local_multicast (im->multiaddr) && !net->ipv4.sysctl_igmp_llm_reports) +if (ipv4_is_local_multicast (im->multiaddr) && + !READ_ONCE (net->ipv4.sysctl_igmp_llm_reports))return ;if (in_dev->dead)
@@ -1621,7 +1626,7 @@ static void ip_mc_rejoin_groups(struct in_device *in_dev)if (im->multiaddr ==IGMP_ALL_HOSTS )continue ;if (ipv4_is_local_multicast (im->multiaddr) && - !net->ipv4.sysctl_igmp_llm_reports) + !READ_ONCE (net->ipv4.sysctl_igmp_llm_reports))continue ;/* a failover is happening and switches
@@ -2166,7 +2171,7 @@ int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr) count++; } err = -ENOBUFS ; -if (count >= net->ipv4.sysctl_igmp_max_memberships) +if (count >=READ_ONCE (net->ipv4.sysctl_igmp_max_memberships)) goto done; iml =sock_kmalloc (sk,sizeof (*iml),GFP_KERNEL );if (!iml)
net/ipv4/tcp_output.c +1 -1
@@ -2005,7 +2005,7 @@ static int tcp_mtu_probe(struct sock *sk)* probing process by not resetting search range to its orignal. */ if (probe_size >tcp_mtu_to_mss (sk, icsk->icsk_mtup.search_high) || - interval < net->ipv4.sysctl_tcp_probe_threshold) { + interval <READ_ONCE (net->ipv4.sysctl_tcp_probe_threshold)) {/* Check whether enough time has elaplased for * another round of probing. */
net/xfrm/xfrm_policy.c +4 -1
@@ -1819,8 +1819,10 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, *num_xfrms =0 ;return 0 ; } -if (IS_ERR (pols[0 ])) +if (IS_ERR (pols[0 ])) { + *num_pols =0 ;return PTR_ERR (pols[0 ]); + } *num_xfrms = pols[0 ]->xfrm_nr;
@@ -1834,6 +1836,7 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family,if (pols[1 ]) {if (IS_ERR (pols[1 ])) {xfrm_pols_put (pols, *num_pols); + *num_pols =0 ;return PTR_ERR (pols[1 ]); } (*num_pols)++;
security/security.c +0 -6
@@ -1032,11 +1032,6 @@ int security_task_kill(struct task_struct *p, struct siginfo *info,return call_int_hook (task_kill,0 , p, info, sig, secid); } -int security_task_wait (struct task_struct *p) -{ -return call_int_hook (task_wait,0 , p); -} -int security_task_prctl (int option,unsigned long arg2,unsigned long arg3,unsigned long arg4,unsigned long arg5) {
@@ -1776,7 +1771,6 @@ struct security_hook_heads security_hook_heads = { .task_movememory = LIST_HEAD_INIT(security_hook_heads.task_movememory), .task_kill = LIST_HEAD_INIT(security_hook_heads.task_kill), - .task_wait = LIST_HEAD_INIT(security_hook_heads.task_wait), .task_prctl = LIST_HEAD_INIT(security_hook_heads.task_prctl), .task_to_inode = LIST_HEAD_INIT(security_hook_heads.task_to_inode),
security/selinux/hooks.c +0 -6
@@ -3951,11 +3951,6 @@ static int selinux_task_kill(struct task_struct *p, struct siginfo *info,return rc; } -static int selinux_task_wait (struct task_struct *p) -{ -return task_has_perm (p, current,PROCESS__SIGCHLD ); -} -static void selinux_task_to_inode (struct task_struct *p,struct inode *inode) {
@@ -6220,7 +6215,6 @@ static struct security_hook_list selinux_hooks[] = {LSM_HOOK_INIT (task_getscheduler, selinux_task_getscheduler),LSM_HOOK_INIT (task_movememory, selinux_task_movememory),LSM_HOOK_INIT (task_kill, selinux_task_kill), -LSM_HOOK_INIT (task_wait, selinux_task_wait),LSM_HOOK_INIT (task_to_inode, selinux_task_to_inode), LSM_HOOK_INIT(ipc_permission, selinux_ipc_permission),
security/smack/smack_lsm.c +0 -20
@@ -2276,25 +2276,6 @@ static int smack_task_kill(struct task_struct *p, struct siginfo *info,return rc; } -/** -* smack_task_wait - Smack access check for waiting -* @p: task to wait for -* -* Returns 0 -*/ -static int smack_task_wait (struct task_struct *p) -{ -/* -* Allow the operation to succeed. -* Zombies are bad. -* In userless environments (e.g. phones) programs -* get marked with SMACK64EXEC and even if the parent -* and child shouldn't be talking the parent still -* may expect to know when the child exits. -*/ -return 0 ; -} -/** * smack_task_to_inode - copy task smack into the inode blob * @p: task to copy from
@@ -4686,7 +4667,6 @@ static struct security_hook_list smack_hooks[] = {LSM_HOOK_INIT (task_getscheduler, smack_task_getscheduler),LSM_HOOK_INIT (task_movememory, smack_task_movememory),LSM_HOOK_INIT (task_kill, smack_task_kill), -LSM_HOOK_INIT (task_wait, smack_task_wait),LSM_HOOK_INIT (task_to_inode, smack_task_to_inode), LSM_HOOK_INIT(ipc_permission, smack_ipc_permission),
sound/core/memalloc.c +1 -0
@@ -177,6 +177,7 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size,if (WARN_ON (!dmab))return -ENXIO ; + size =PAGE_ALIGN (size); dmab->dev.type = type; dmab->dev.dev = device; dmab->bytes =0 ;