Linux 3.18.56
Greg KH
maintainerI'm announcing the release of the 3.18.56 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - drivers/char/pcmcia/cm4040_cs.c | 6 +-- drivers/gpu/drm/gma500/psb_intel_lvds.c | 18 +++++++---- drivers/gpu/drm/radeon/ci_dpm.c | 6 +++ drivers/i2c/busses/i2c-tiny-usb.c | 25 +++++++++++++--- drivers/net/usb/qmi_wwan.c | 2 + drivers/s390/net/qeth_core.h | 4 ++ drivers/s390/net/qeth_core_main.c | 21 +++++++------ drivers/s390/net/qeth_core_sys.c | 24 ++++++++++----- drivers/s390/net/qeth_l2.h | 2 + drivers/s390/net/qeth_l2_main.c | 26 +++++++++++++--- drivers/s390/net/qeth_l2_sys.c | 8 +++++ drivers/s390/net/qeth_l3_main.c | 6 +++ fs/xfs/libxfs/xfs_bmap.c | 7 ++-- fs/xfs/libxfs/xfs_btree.c | 2 - fs/xfs/xfs_bmap_util.c | 2 - fs/xfs/xfs_buf.c | 24 +++++++++++++++ fs/xfs/xfs_buf.h | 1 fs/xfs/xfs_dir2_readdir.c | 15 +++++++-- fs/xfs/xfs_file.c | 31 ++++++-------------- fs/xfs/xfs_ioctl.c | 5 +-- fs/xfs/xfs_qm.c | 7 ---- kernel/fork.c | 2 - mm/memory-failure.c | 8 +---- mm/mlock.c | 5 +-- mm/slub.c | 6 ++- net/core/sock.c | 12 +++---- net/ipv4/inet_connection_sock.c | 2 + net/ipv4/tcp.c | 7 +++- net/ipv4/tcp_input.c | 11 +++---- net/ipv6/ip6_offload.c | 7 ++-- net/ipv6/ip6_output.c | 20 +++++++------ net/ipv6/output_core.c | 14 +++++---- net/ipv6/udp_offload.c | 6 +++ net/sctp/input.c | 16 +++++----- net/sctp/ipv6.c | 49 ++++++++++++++++++++------------ sound/pci/hda/patch_sigmatel.c | 2 + 37 files changed, 268 insertions(+), 143 deletions(-)
Alex Deucher (1):
drm/radeon/ci: disable mclk switching for high refresh rates (v2)
Alexander Tsoy (1):
ALSA: hda - apply STAC_9200_DELL_M22 quirk for Dell Latitude D430
Bjørn Mork (1):
qmi_wwan: add another Lenovo EM74xx device ID
Brian Foster (3):
xfs: prevent multi-fsb dir readahead from reading random blocks
xfs: fix up quotacheck buffer list error handling
xfs: fix indlen accounting error on partial delalloc conversion
Craig Gallek (1):
ipv6: Prevent overrun when parsing v6 header options
Darrick J. Wong (1):
xfs: fix over-copying of getbmap parameters from userspace
David S. Miller (1):
ipv6: Check ip6_find_1stfragopt() return value properly.
Davide Caratti (1):
sctp: fix ICMP processing if skb is non-linear
Eric Dumazet (4):
netem: fix skb_orphan_partial()
dccp/tcp: do not inherit mc_list from parent
sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
ipv6: fix out of bound writes in __ip6_append_data()
Eric Sandeen (2):
xfs: handle array index overrun in xfs_dir2_leaf_readbuf()
xfs: fix unaligned access in xfs_btree_visit_blocks
Eryu Guan (1):
xfs: fix off-by-one on max nr_pages in xfs_find_get_desired_pgoff()
Greg Kroah-Hartman (2):
Revert "stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms" Linux 3.18.56
Jan Kara (1):
xfs: Fix missed holes in SEEK_HOLE implementation
Julian Wiedmann (2):
s390/qeth: unbreak OSM and OSN support s390/qeth: avoid null pointer dereference on OSN
Nicolas Iooss (1):
pcmcia: remove left-over %Z format
Patrik Jakobsson (1):
drm/gma500/psb: Actually use VBT mode when it is found
Punit Agrawal (1):
mm/migrate: fix refcount handling when !hugepage_migration_supported()
Sebastian Reichel (1):
i2c: i2c-tiny-usb: fix buffer not being DMA capable
Soheil Hassas Yeganeh (1):
tcp: eliminate negative reordering in tcp_clean_rtx_queue
Thomas Gleixner (1):
slub/memcg: cure the brainless abuse of sysfs attributes
Ursula Braun (1):
s390/qeth: handle sysfs error during initialization
Wei Wang (1):
tcp: avoid fastopen API to be used on AF_UNSPEC
Xin Long (1):
sctp: fix src address selection if using secondary addresses for ipv6
Yisheng Xie (1):
mlock: fix mlock count can not decrease in race condition
Yuchung Cheng (1):
tcp: avoid fragmenting peculiar skbs in SACK
Zorro Lang (1):
xfs: bad assertion for delalloc an extent that start at i_size
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 55 +SUBLEVEL = 56 EXTRAVERSION = NAME = Diseased Newt
drivers/char/pcmcia/cm4040_cs.c +3 -3
@@ -374,7 +374,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf, rc =write_sync_reg (SCR_HOST_TO_READER_START , dev);if (rc <=0 ) { -DEBUGP (5 , dev,"write_sync_reg c=%.2Zx\n" , rc); +DEBUGP (5 , dev,"write_sync_reg c=%.2zx\n" , rc);DEBUGP (2 , dev,"<- cm4040_write (failed)\n" );if (rc == -ERESTARTSYS )return rc;
@@ -387,7 +387,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,for (i =0 ; i < bytes_to_write; i++) { rc =wait_for_bulk_out_ready (dev);if (rc <=0 ) { -DEBUGP (5 , dev,"wait_for_bulk_out_ready rc=%.2Zx\n" , +DEBUGP (5 , dev,"wait_for_bulk_out_ready rc=%.2zx\n" , rc);DEBUGP (2 , dev,"<- cm4040_write (failed)\n" );if (rc == -ERESTARTSYS )
@@ -403,7 +403,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf, rc =write_sync_reg (SCR_HOST_TO_READER_DONE , dev);if (rc <=0 ) { -DEBUGP (5 , dev,"write_sync_reg c=%.2Zx\n" , rc); +DEBUGP (5 , dev,"write_sync_reg c=%.2zx\n" , rc);DEBUGP (2 , dev,"<- cm4040_write (failed)\n" );if (rc == -ERESTARTSYS )return rc;
drivers/gpu/drm/gma500/psb_intel_lvds.c +11 -7
@@ -783,20 +783,23 @@ void psb_intel_lvds_init(struct drm_device *dev,if (scan->type &DRM_MODE_TYPE_PREFERRED ) { mode_dev->panel_fixed_mode =drm_mode_duplicate (dev, scan); +DRM_DEBUG_KMS ("Using mode from DDC\n" ); goto out;/* FIXME: check for quirks */ } }/* Failed to get EDID, what about VBT? do we need this? */ -if (mode_dev->vbt_mode) +if (dev_priv->lfp_lvds_vbt_mode) { mode_dev->panel_fixed_mode = -drm_mode_duplicate (dev, mode_dev->vbt_mode); +drm_mode_duplicate (dev, dev_priv->lfp_lvds_vbt_mode); -if (!mode_dev->panel_fixed_mode) -if (dev_priv->lfp_lvds_vbt_mode) - mode_dev->panel_fixed_mode = -drm_mode_duplicate (dev, - dev_priv->lfp_lvds_vbt_mode); +if (mode_dev->panel_fixed_mode) { + mode_dev->panel_fixed_mode->type |= +DRM_MODE_TYPE_PREFERRED ; +DRM_DEBUG_KMS ("Using mode from VBT\n" ); + goto out; + } + }/* * If we didn't get EDID, try checking if the panel is already turned
@@ -813,6 +816,7 @@ void psb_intel_lvds_init(struct drm_device *dev,if (mode_dev->panel_fixed_mode) { mode_dev->panel_fixed_mode->type |=DRM_MODE_TYPE_PREFERRED ; +DRM_DEBUG_KMS ("Using pre-programmed mode\n" ); goto out;/* FIXME: check for quirks */ } }
drivers/gpu/drm/radeon/ci_dpm.c +6 -0
@@ -732,6 +732,12 @@ bool ci_dpm_vblank_too_short(struct radeon_device *rdev)u32 vblank_time =r600_dpm_get_vblank_time (rdev);u32 switch_limit = pi->mem_gddr5 ?450 :300 ; +/* disable mclk switching if the refresh is >120Hz, even if the +* blanking period would allow it +*/ +if (r600_dpm_get_vrefresh (rdev) >120 ) +return true; +if (vblank_time < switch_limit)return true;else
drivers/i2c/busses/i2c-tiny-usb.c +21 -4
@@ -178,22 +178,39 @@ static int usb_read(struct i2c_adapter *adapter, int cmd, int value, int index, void *data, int len) { struct i2c_tiny_usb *dev = (struct i2c_tiny_usb *)adapter->algo_data; +void *dmadata =kmalloc (len,GFP_KERNEL ); +int ret; + +if (!dmadata) +return -ENOMEM ;/* do control transfer */ -return usb_control_msg (dev->usb_dev,usb_rcvctrlpipe (dev->usb_dev,0 ), + ret =usb_control_msg (dev->usb_dev,usb_rcvctrlpipe (dev->usb_dev,0 ), cmd,USB_TYPE_VENDOR |USB_RECIP_INTERFACE | -USB_DIR_IN , value, index, data, len,2000 ); +USB_DIR_IN , value, index, dmadata, len,2000 ); + +memcpy (data, dmadata, len); +kfree (dmadata); +return ret; }static int usb_write (struct i2c_adapter *adapter,int cmd,int value,int index,void *data,int len) {struct i2c_tiny_usb *dev = (struct i2c_tiny_usb *)adapter->algo_data; +void *dmadata =kmemdup (data, len,GFP_KERNEL ); +int ret; + +if (!dmadata) +return -ENOMEM ;/* do control transfer */ -return usb_control_msg (dev->usb_dev,usb_sndctrlpipe (dev->usb_dev,0 ), + ret =usb_control_msg (dev->usb_dev,usb_sndctrlpipe (dev->usb_dev,0 ), cmd,USB_TYPE_VENDOR |USB_RECIP_INTERFACE , - value, index, data, len,2000 ); + value, index, dmadata, len,2000 ); + +kfree (dmadata); +return ret; }static void i2c_tiny_usb_free (struct i2c_tiny_usb *dev)
drivers/net/usb/qmi_wwan.c +2 -0
@@ -771,6 +771,8 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1199, 0x9071, 10)}, /* Sierra Wireless MC74xx */ {QMI_FIXED_INTF(0x1199, 0x9079, 8)}, /* Sierra Wireless EM74xx */ {QMI_FIXED_INTF(0x1199, 0x9079, 10)}, /* Sierra Wireless EM74xx */ + {QMI_FIXED_INTF(0x1199, 0x907b, 8)}, /* Sierra Wireless EM74xx */ + {QMI_FIXED_INTF(0x1199, 0x907b, 10)}, /* Sierra Wireless EM74xx */ {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */ {QMI_FIXED_INTF(0x1bbb, 0x0203, 2)}, /* Alcatel L800MA */ {QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */
drivers/s390/net/qeth_core.h +4 -0
@@ -722,6 +722,7 @@ enum qeth_discipline_id { };struct qeth_discipline { +const struct device_type *devtype;void (*start_poll)(struct ccw_device *,int ,unsigned long );qdio_handler_t *input_handler;qdio_handler_t *output_handler;
@@ -887,6 +888,9 @@ extern struct qeth_discipline qeth_l2_discipline;extern struct qeth_discipline qeth_l3_discipline;extern const struct attribute_group *qeth_generic_attr_groups[];extern const struct attribute_group *qeth_osn_attr_groups[]; +extern const struct attribute_group qeth_device_attr_group; +extern const struct attribute_group qeth_device_blkt_group; +extern const struct device_type qeth_generic_devtype;extern struct workqueue_struct *qeth_wq;int qeth_card_hw_is_reachable (struct qeth_card *);
drivers/s390/net/qeth_core_main.c +12 -9
@@ -5304,10 +5304,12 @@ void qeth_core_free_discipline(struct qeth_card *card) card->discipline =NULL ; } -static const struct device_type qeth_generic_devtype = { +const struct device_type qeth_generic_devtype = { .name ="qeth_generic" , .groups = qeth_generic_attr_groups, }; +EXPORT_SYMBOL_GPL (qeth_generic_devtype); +static const struct device_type qeth_osn_devtype = { .name ="qeth_osn" , .groups = qeth_osn_attr_groups,
@@ -5433,23 +5435,22 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev) goto err_card; } -if (card->info.type ==QETH_CARD_TYPE_OSN ) - gdev->dev.type = &qeth_osn_devtype; -else - gdev->dev.type = &qeth_generic_devtype; -switch (card->info.type) {case QETH_CARD_TYPE_OSN :case QETH_CARD_TYPE_OSM : rc =qeth_core_load_discipline (card,QETH_DISCIPLINE_LAYER2 );if (rc) goto err_card; + + gdev->dev.type = (card->info.type !=QETH_CARD_TYPE_OSN ) + ? card->discipline->devtype + : &qeth_osn_devtype; rc = card->discipline->setup (card->gdev);if (rc) goto err_disc; -case QETH_CARD_TYPE_OSD : -case QETH_CARD_TYPE_OSX : +break ;default : + gdev->dev.type = &qeth_generic_devtype;break ; }
@@ -5505,8 +5506,10 @@ static int qeth_core_set_online(struct ccwgroup_device *gdev)if (rc) goto err; rc = card->discipline->setup (card->gdev); -if (rc) +if (rc) { +qeth_core_free_discipline (card); goto err; + } } rc = card->discipline->set_online (gdev); err:
drivers/s390/net/qeth_core_sys.c +16 -8
@@ -446,12 +446,16 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,if (card->options.layer2 == newdis) goto out; -else { - card->info.mac_bits =0 ; -if (card->discipline) { - card->discipline->remove (card->gdev); -qeth_core_free_discipline (card); - } +if (card->info.type ==QETH_CARD_TYPE_OSM ) { +/* fixed layer, can't switch */ + rc = -EOPNOTSUPP ; + goto out; + } + + card->info.mac_bits =0 ; +if (card->discipline) { + card->discipline->remove (card->gdev); +qeth_core_free_discipline (card); } rc =qeth_core_load_discipline (card, newdis);
@@ -459,6 +463,8 @@ static ssize_t qeth_dev_layer2_store(struct device *dev, goto out; rc = card->discipline->setup (card->gdev); +if (rc) +qeth_core_free_discipline (card); out:mutex_unlock (&card->discipline_mutex);return rc ? rc : count;
@@ -743,10 +749,11 @@ static struct attribute *qeth_blkt_device_attrs[] = { &dev_attr_inter_jumbo.attr, NULL, }; -static struct attribute_group qeth_device_blkt_group = { +const struct attribute_group qeth_device_blkt_group = { .name ="blkt" , .attrs = qeth_blkt_device_attrs, }; +EXPORT_SYMBOL_GPL (qeth_device_blkt_group);static struct attribute *qeth_device_attrs[] = { &dev_attr_state.attr,
@@ -766,9 +773,10 @@ static struct attribute *qeth_device_attrs[] = { &dev_attr_switch_attrs.attr, NULL, }; -static struct attribute_group qeth_device_attr_group = { +const struct attribute_group qeth_device_attr_group = { .attrs = qeth_device_attrs, }; +EXPORT_SYMBOL_GPL (qeth_device_attr_group);const struct attribute_group *qeth_generic_attr_groups[] = { &qeth_device_attr_group,
drivers/s390/net/qeth_l2.h +2 -0
@@ -8,6 +8,8 @@#include "qeth_core.h" +extern const struct attribute_group *qeth_l2_attr_groups[]; +int qeth_l2_create_device_attributes (struct device *);void qeth_l2_remove_device_attributes (struct device *);void qeth_l2_setup_bridgeport_attrs (struct qeth_card *card);
drivers/s390/net/qeth_l2_main.c +20 -6
@@ -887,11 +887,21 @@ static int qeth_l2_stop(struct net_device *dev)return 0 ; } +static const struct device_type qeth_l2_devtype = { + .name ="qeth_layer2" , + .groups = qeth_l2_attr_groups, +}; +static int qeth_l2_probe_device (struct ccwgroup_device *gdev) {struct qeth_card *card =dev_get_drvdata (&gdev->dev); +int rc; -qeth_l2_create_device_attributes (&gdev->dev); +if (gdev->dev.type == &qeth_generic_devtype) { + rc =qeth_l2_create_device_attributes (&gdev->dev); +if (rc) +return rc; + }INIT_LIST_HEAD (&card->vid_list);INIT_LIST_HEAD (&card->mc_list); card->options.layer2 =1 ;
@@ -903,7 +913,8 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev) {struct qeth_card *card =dev_get_drvdata (&cgdev->dev); -qeth_l2_remove_device_attributes (&cgdev->dev); +if (cgdev->dev.type == &qeth_generic_devtype) +qeth_l2_remove_device_attributes (&cgdev->dev);qeth_set_allowed_threads (card,0 ,1 );wait_event (card->wait_q,qeth_threads_running (card,0xffffffff ) ==0 );
@@ -959,7 +970,6 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)case QETH_CARD_TYPE_OSN : card->dev =alloc_netdev (0 ,"osn%d" ,NET_NAME_UNKNOWN , ether_setup); - card->dev->flags |=IFF_NOARP ;break ;default : card->dev =alloc_etherdev (0 );
@@ -972,9 +982,12 @@ static int qeth_l2_setup_netdev(struct qeth_card *card) card->dev->watchdog_timeo =QETH_TX_TIMEOUT ; card->dev->mtu = card->info.initial_mtu; card->dev->netdev_ops = &qeth_l2_netdev_ops; - card->dev->ethtool_ops = - (card->info.type !=QETH_CARD_TYPE_OSN ) ? - &qeth_l2_ethtool_ops : &qeth_l2_osn_ops; +if (card->info.type ==QETH_CARD_TYPE_OSN ) { + card->dev->ethtool_ops = &qeth_l2_osn_ops; + card->dev->flags |=IFF_NOARP ; + }else { + card->dev->ethtool_ops = &qeth_l2_ethtool_ops; + } card->dev->features |=NETIF_F_HW_VLAN_CTAG_FILTER ; card->info.broadcast_capable =1 ;qeth_l2_request_initial_mac (card);
@@ -1273,6 +1286,7 @@ static int qeth_l2_control_event(struct qeth_card *card, }struct qeth_discipline qeth_l2_discipline = { + .devtype = &qeth_l2_devtype, .start_poll = qeth_qdio_start_poll, .input_handler = (qdio_handler_t *) qeth_qdio_input_handler, .output_handler = (qdio_handler_t *) qeth_qdio_output_handler,
drivers/s390/net/qeth_l2_sys.c +8 -0
@@ -216,3 +216,11 @@ void qeth_l2_setup_bridgeport_attrs(struct qeth_card *card) }else qeth_bridgeport_an_set (card,0 ); } + +const struct attribute_group *qeth_l2_attr_groups[] = { + &qeth_device_attr_group, + &qeth_device_blkt_group, +/* l2 specific, see l2_{create,remove}_device_attributes(): */ + &qeth_l2_bridgeport_attr_group, +NULL , +};
drivers/s390/net/qeth_l3_main.c +5 -1
@@ -3317,8 +3317,11 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)static int qeth_l3_probe_device (struct ccwgroup_device *gdev) {struct qeth_card *card =dev_get_drvdata (&gdev->dev); +int rc; -qeth_l3_create_device_attributes (&gdev->dev); + rc =qeth_l3_create_device_attributes (&gdev->dev); +if (rc) +return rc; card->options.layer2 =0 ; card->info.hwtrap =0 ;return 0 ;
@@ -3609,6 +3612,7 @@ static int qeth_l3_control_event(struct qeth_card *card, }struct qeth_discipline qeth_l3_discipline = { + .devtype = &qeth_generic_devtype, .start_poll = qeth_qdio_start_poll, .input_handler = (qdio_handler_t *) qeth_qdio_input_handler, .output_handler = (qdio_handler_t *) qeth_qdio_output_handler,
fs/xfs/libxfs/xfs_bmap.c +4 -3
@@ -2214,8 +2214,10 @@ xfs_bmap_add_extent_delay_real( } temp =xfs_bmap_worst_indlen (bma->ip, temp); temp2 =xfs_bmap_worst_indlen (bma->ip, temp2); - diff = (int )(temp + temp2 -startblockval (PREV .br_startblock) - - (bma->cur ? bma->cur->bc_private.b.allocated :0 )); + diff = (int )(temp + temp2 - + (startblockval (PREV .br_startblock) - + (bma->cur ? + bma->cur->bc_private.b.allocated :0 )));if (diff >0 ) { error = xfs_icsb_modify_counters(bma->ip->i_mount, XFS_SBS_FDBLOCKS,
@@ -2268,7 +2270,6 @@ xfs_bmap_add_extent_delay_real( temp = da_new;if (bma->cur) temp += bma->cur->bc_private.b.allocated; -ASSERT (temp <= da_old);if (temp < da_old) xfs_icsb_modify_counters(bma->ip->i_mount, XFS_SBS_FDBLOCKS,
fs/xfs/libxfs/xfs_btree.c +1 -1
@@ -4051,7 +4051,7 @@ xfs_btree_change_owner(xfs_btree_readahead_ptr (cur, ptr,1 );/* save for the next iteration of the loop */ - lptr = *ptr; +xfs_btree_copy_ptrs (cur, &lptr, ptr,1 ); }/* for each buffer in the level */
fs/xfs/xfs_bmap_util.c +1 -1
@@ -659,7 +659,7 @@ xfs_getbmap(* extents. */ if (map[i].br_startblock ==DELAYSTARTBLOCK && - map[i].br_startoff <=XFS_B_TO_FSB (mp,XFS_ISIZE (ip))) + map[i].br_startoff <XFS_B_TO_FSB (mp,XFS_ISIZE (ip)))ASSERT ((iflags &BMV_IF_DELALLOC ) !=0 ); if (map[i].br_startblock == HOLESTARTBLOCK &&
fs/xfs/xfs_buf.c +24 -0
@@ -982,6 +982,8 @@ voidxfs_buf_unlock ( struct xfs_buf *bp) { +ASSERT (xfs_buf_islocked (bp)); +XB_CLEAR_OWNER (bp);up (&bp->b_sema);
@@ -1698,6 +1700,28 @@ error: }/* +* Cancel a delayed write list. +* +* Remove each buffer from the list, clear the delwri queue flag and drop the +* associated buffer reference. +*/ +void +xfs_buf_delwri_cancel ( +struct list_head *list) +{ +struct xfs_buf *bp; + +while (!list_empty (list)) { + bp = list_first_entry(list, struct xfs_buf, b_list); + +xfs_buf_lock (bp); + bp->b_flags &= ~_XBF_DELWRI_Q; +list_del_init (&bp->b_list); +xfs_buf_relse (bp); + } +} + +/* * Add a buffer to the delayed write list. * * This queues a buffer for writeout if it hasn't already been. Note that
fs/xfs/xfs_buf.h +1 -0
@@ -302,6 +302,7 @@ extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, void *,extern xfs_caddr_t xfs_buf_offset (xfs_buf_t *,size_t );/* Delayed Write Buffer Routines */ +extern void xfs_buf_delwri_cancel (struct list_head *);extern bool xfs_buf_delwri_queue (struct xfs_buf *,struct list_head *);extern int xfs_buf_delwri_submit (struct list_head *);extern int xfs_buf_delwri_submit_nowait (struct list_head *);
fs/xfs/xfs_dir2_readdir.c +11 -4
@@ -422,6 +422,7 @@ xfs_dir2_leaf_readbuf(/* * Do we need more readahead? +* Each loop tries to process 1 full dir blk; last may be partial. */ blk_start_plug (&plug); for (mip->ra_index = mip->ra_offset = i = 0;
@@ -432,7 +433,8 @@ xfs_dir2_leaf_readbuf(* Read-ahead a contiguous directory block. */ if (i > mip->ra_current && - map[mip->ra_index].br_blockcount >= geo->fsbcount) { + (map[mip->ra_index].br_blockcount - mip->ra_offset) >= + geo->fsbcount) { xfs_dir3_data_readahead(dp, map[mip->ra_index].br_startoff + mip->ra_offset, XFS_FSB_TO_DADDR(dp->i_mount,
@@ -453,14 +455,19 @@ xfs_dir2_leaf_readbuf( }/* -* Advance offset through the mapping table. +* Advance offset through the mapping table, processing a full +* dir block even if it is fragmented into several extents. +* But stop if we have consumed all valid mappings, even if +* it's not yet a full directory block. */ -for (j =0 ; j < geo->fsbcount; j += length ) { +for (j =0 ; + j < geo->fsbcount && mip->ra_index < mip->map_valid; + j += length ) {/* * The rest of this extent but not more than a dir * block. */ - length =min_t (int, geo->fsbcount, + length =min_t (int, geo->fsbcount - j, map[mip->ra_index].br_blockcount - mip->ra_offset); mip->ra_offset += length;
fs/xfs/xfs_file.c +10 -21
@@ -1083,7 +1083,7 @@ xfs_find_get_desired_pgoff(unsigned nr_pages;unsigned int i; - want =min_t (pgoff_t, end - index,PAGEVEC_SIZE ); + want =min_t (pgoff_t, end - index,PAGEVEC_SIZE -1 ) +1 ; nr_pages =pagevec_lookup (&pvec, inode->i_mapping, index, want);/*
@@ -1110,17 +1110,6 @@ xfs_find_get_desired_pgoff(break ; } -/* -* At lease we found one page. If this is the first time we -* step into the loop, and if the first page index offset is -* greater than the given search offset, a hole was found. -*/ -if (type ==HOLE_OFF && lastoff == startoff && - lastoff <page_offset (pvec.pages[0 ])) { - found = true; -break ; - } -for (i =0 ; i < nr_pages; i++) {struct page *page = pvec.pages[i];loff_t b_offset;
@@ -1132,18 +1121,18 @@ xfs_find_get_desired_pgoff(* file mapping. However, page->index will not change * because we have a reference on the page. * -* Searching done if the page index is out of range. -* If the current offset is not reaches the end of -* the specified search range, there should be a hole -* between them. +* If current page offset is beyond where we've ended, +* we've found a hole. */ -if (page->index > end) { -if (type ==HOLE_OFF && lastoff < endoff) { - *offset = lastoff; - found = true; - } +if (type ==HOLE_OFF && lastoff < endoff && + lastoff <page_offset (pvec.pages[i])) { + found = true; + *offset = lastoff; goto out; } +/* Searching done if the page index is out of range. */ +if (page->index > end) + goto out;lock_page (page);/*
fs/xfs/xfs_ioctl.c +3 -2
@@ -1378,10 +1378,11 @@ xfs_ioc_getbmap(unsigned int cmd, void __user *arg) { - struct getbmapx bmx; + struct getbmapx bmx = { 0 };int error; -if (copy_from_user (&bmx, arg,sizeof (struct getbmapx ))) +/* struct getbmap is a strict subset of struct getbmapx. */ +if (copy_from_user (&bmx, arg, offsetof(struct getbmapx , bmv_iflags)))return -EFAULT ;if (bmx.bmv_count <2 )
fs/xfs/xfs_qm.c +1 -6
@@ -1359,12 +1359,7 @@ xfs_qm_quotacheck( mp->m_qflags |= flags; error_return: -while (!list_empty (&buffer_list)) { -struct xfs_buf *bp = - list_first_entry(&buffer_list, struct xfs_buf, b_list); -list_del_init (&bp->b_list); -xfs_buf_relse (bp); - } +xfs_buf_delwri_cancel (&buffer_list);if (error) { xfs_warn(mp,
kernel/fork.c +1 -1
@@ -338,7 +338,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)set_task_stack_end_magic (tsk);#ifdef CONFIG_CC_STACKPROTECTOR - tsk->stack_canary =get_random_long (); + tsk->stack_canary =get_random_int ();#endif /*
mm/memory-failure.c +2 -6
@@ -1570,12 +1570,8 @@ static int soft_offline_huge_page(struct page *page, int flags)if (ret) {pr_info ("soft offline: %#lx: migration failed %d, type %lx\n" , pfn, ret, page->flags); -/* -* We know that soft_offline_huge_page() tries to migrate -* only one hugepage pointed to by hpage, so we need not -* run through the pagelist here. -*/ -putback_active_hugepage (hpage); +if (!list_empty (&pagelist)) +putback_movable_pages (&pagelist);if (ret >0 ) ret = -EIO ; }else {
mm/mlock.c +3 -2
@@ -333,7 +333,7 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone) {int i;int nr =pagevec_count (pvec); -int delta_munlocked; +int delta_munlocked = -nr;struct pagevec pvec_putback;int pgrescued =0 ;
@@ -353,6 +353,8 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)continue ; else__munlock_isolation_failed (page ); + }else { + delta_munlocked++; }/*
@@ -364,7 +366,6 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)pagevec_add (&pvec_putback, pvec->pages[i]); pvec->pages[i] =NULL ; } - delta_munlocked = -nr +pagevec_count (&pvec_putback);__mod_zone_page_state (zone,NR_MLOCK , delta_munlocked);spin_unlock_irq (&zone->lru_lock);
mm/slub.c +4 -2
@@ -4959,6 +4959,7 @@ static void memcg_propagate_slab_attrs(struct kmem_cache *s)char mbuf[64 ];char *buf;struct slab_attribute *attr =to_slab_attr (slab_attrs[i]); +ssize_t len;if (!attr || !attr->store || !attr->show)continue ;
@@ -4983,8 +4984,9 @@ static void memcg_propagate_slab_attrs(struct kmem_cache *s) buf = buffer; } - attr->show (root_cache, buf); - attr->store (s, buf,strlen (buf)); + len = attr->show (root_cache, buf); +if (len >0 ) + attr->store (s, buf, len); }if (buffer)
net/core/sock.c +6 -6
@@ -1633,17 +1633,17 @@ EXPORT_SYMBOL(sock_wfree);void skb_orphan_partial (struct sk_buff *skb) { -/* TCP stack sets skb->ooo_okay based on sk_wmem_alloc, -* so we do not completely orphan skb, but transfert all -* accounted bytes but one, to avoid unexpected reorders. -*/ if (skb->destructor == sock_wfree #ifdef CONFIG_INET || skb->destructor == tcp_wfree #endif ) { -atomic_sub (skb->truesize -1 , &skb->sk->sk_wmem_alloc); - skb->truesize =1 ; +struct sock *sk = skb->sk; + +if (atomic_inc_not_zero (&sk->sk_refcnt)) { +atomic_sub (skb->truesize, &sk->sk_wmem_alloc); + skb->destructor = sock_efree; + } }else {skb_orphan (skb); }
net/ipv4/inet_connection_sock.c +2 -0
@@ -677,6 +677,8 @@ struct sock *inet_csk_clone_lock(const struct sock *sk,inet_sk (newsk)->inet_sport =htons (inet_rsk (req)->ir_num); newsk->sk_write_space = sk_stream_write_space; +inet_sk (newsk)->mc_list =NULL ; + newsk->sk_mark =inet_rsk (req)->ir_mark; newicsk->icsk_retransmits =0 ;
net/ipv4/tcp.c +5 -2
@@ -1066,9 +1066,12 @@ static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, int *copied, size_t size) {struct tcp_sock *tp =tcp_sk (sk); +struct sockaddr *uaddr = msg->msg_name;int err, flags; -if (!(sysctl_tcp_fastopen &TFO_CLIENT_ENABLE )) +if (!(sysctl_tcp_fastopen &TFO_CLIENT_ENABLE ) || + (uaddr && msg->msg_namelen >=sizeof (uaddr->sa_family) && + uaddr->sa_family ==AF_UNSPEC ))return -EOPNOTSUPP ;if (tp->fastopen_req !=NULL )return -EALREADY ;/* Another Fast Open is in progress */
@@ -1081,7 +1084,7 @@ static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, tp->fastopen_req->size = size; flags = (msg->msg_flags &MSG_DONTWAIT ) ?O_NONBLOCK :0 ; - err =__inet_stream_connect (sk->sk_socket, msg->msg_name, + err =__inet_stream_connect (sk->sk_socket, uaddr, msg->msg_namelen, flags); *copied = tp->fastopen_req->copied;tcp_free_fastopen_req (tp);
net/ipv4/tcp_input.c +6 -5
@@ -1171,13 +1171,14 @@ static int tcp_match_skb_to_sack(struct sock *sk, struct sk_buff *skb,*/ if (pkt_len > mss) {unsigned int new_len = (pkt_len / mss) * mss; -if (!in_sack && new_len < pkt_len) { +if (!in_sack && new_len < pkt_len) new_len += mss; -if (new_len >= skb->len) -return 0 ; - } pkt_len = new_len; } + +if (pkt_len >= skb->len && !in_sack) +return 0 ; + err =tcp_fragment (sk, skb, pkt_len, mss,GFP_ATOMIC );if (err <0 )return err;
@@ -3172,7 +3173,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,int delta;/* Non-retransmitted hole got filled? That's reordering */ -if (reord < prior_fackets) +if (reord < prior_fackets && reord <= tp->fackets_out)tcp_update_reordering (sk, tp->fackets_out - reord,0 ); delta = tcp_is_fack(tp) ? pkts_acked :
net/ipv6/ip6_offload.c +4 -3
@@ -62,7 +62,6 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,const struct net_offload *ops;int proto;struct frag_hdr *fptr; -unsigned int unfrag_ip6hlen;u8 *prevhdr;int offset =0 ;bool encap, udpfrag;
@@ -121,8 +120,10 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, skb->network_header = (u8 *)ipv6h - skb->head;if (udpfrag) { - unfrag_ip6hlen =ip6_find_1stfragopt (skb, &prevhdr); - fptr = (struct frag_hdr *)((u8 *)ipv6h + unfrag_ip6hlen); +int err =ip6_find_1stfragopt (skb, &prevhdr); +if (err <0 ) +return ERR_PTR (err); + fptr = (struct frag_hdr *)((u8 *)ipv6h + err); fptr->frag_off =htons (offset);if (skb->next !=NULL ) fptr->frag_off |=htons (IP6_MF );
net/ipv6/ip6_output.c +12 -8
@@ -569,7 +569,10 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))u8 *prevhdr, nexthdr =0 ;struct net *net =dev_net (skb_dst (skb)->dev); - hlen =ip6_find_1stfragopt (skb, &prevhdr); + err =ip6_find_1stfragopt (skb, &prevhdr); +if (err <0 ) + goto fail; + hlen = err; nexthdr = *prevhdr; mtu =ip6_skb_dst_mtu (skb);
@@ -1373,6 +1376,11 @@ alloc_new_skb:*/ alloclen +=sizeof (struct frag_hdr ); + copy = datalen - transhdrlen - fraggap; +if (copy <0 ) { + err = -EINVAL ; + goto error; + }if (transhdrlen) { skb = sock_alloc_send_skb(sk, alloclen + hh_len,
@@ -1422,13 +1430,9 @@ alloc_new_skb: data += fraggap;pskb_trim_unique (skb_prev, maxfraglen); } - copy = datalen - transhdrlen - fraggap; - -if (copy <0 ) { - err = -EINVAL ; -kfree_skb (skb); - goto error; - }else if (copy >0 &&getfrag (from, data + transhdrlen, offset, copy, fraggap, skb) <0 ) { +if (copy >0 && +getfrag (from, data + transhdrlen, offset, + copy, fraggap, skb) <0 ) { err = -EFAULT ;kfree_skb (skb); goto error;
net/ipv6/output_core.c +8 -6
@@ -45,14 +45,13 @@ EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);int ip6_find_1stfragopt (struct sk_buff *skb,u8 **nexthdr) {u16 offset =sizeof (struct ipv6hdr ); -struct ipv6_opt_hdr *exthdr = - (struct ipv6_opt_hdr *)(ipv6_hdr (skb) +1 );unsigned int packet_len =skb_tail_pointer (skb) -skb_network_header (skb);int found_rhdr =0 ; *nexthdr = &ipv6_hdr (skb)->nexthdr; -while (offset +1 <= packet_len) { +while (offset <= packet_len) { +struct ipv6_opt_hdr *exthdr;switch (**nexthdr) {
@@ -73,13 +72,16 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr)return offset; } - offset +=ipv6_optlen (exthdr); - *nexthdr = &exthdr->nexthdr; +if (offset +sizeof (struct ipv6_opt_hdr ) > packet_len) +return -EINVAL ; + exthdr = (struct ipv6_opt_hdr *)(skb_network_header (skb) + offset); + offset +=ipv6_optlen (exthdr); + *nexthdr = &exthdr->nexthdr; } -return offset; +return -EINVAL ; }EXPORT_SYMBOL (ip6_find_1stfragopt);
net/ipv6/udp_offload.c +5 -1
@@ -29,6 +29,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,u8 frag_hdr_sz =sizeof (struct frag_hdr );__wsum csum;int tnl_hlen; +int err; mss =skb_shinfo (skb)->gso_size;if (unlikely (skb->len <= mss))
@@ -93,7 +94,10 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,/* Find the unfragmentable header and shift it left by frag_hdr_sz * bytes to insert fragment header. */ - unfrag_ip6hlen =ip6_find_1stfragopt (skb, &prevhdr); + err =ip6_find_1stfragopt (skb, &prevhdr); +if (err <0 ) +return ERR_PTR (err); + unfrag_ip6hlen = err; nexthdr = *prevhdr; *prevhdr =NEXTHDR_FRAGMENT ; unfrag_len = (skb_network_header(skb) - skb_mac_header(skb)) +
net/sctp/input.c +9 -7
@@ -472,15 +472,14 @@ struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *skb,struct sctp_association **app, struct sctp_transport **tpp) { + struct sctp_init_chunk *chunkhdr, _chunkhdr;union sctp_addr saddr;union sctp_addr daddr;struct sctp_af *af;struct sock *sk =NULL ;struct sctp_association *asoc;struct sctp_transport *transport =NULL ; -struct sctp_init_chunk *chunkhdr;__u32 vtag =ntohl (sctphdr->vtag); -int len = skb->len - ((void *)sctphdr - (void *)skb->data); *app =NULL ; *tpp =NULL ;
@@ -515,13 +514,16 @@ struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *skb,* discard the packet. */ if (vtag ==0 ) { - chunkhdr = (void *)sctphdr +sizeof (struct sctphdr ); -if (len <sizeof (struct sctphdr ) +sizeof (sctp_chunkhdr_t) - +sizeof (__be32) || +/* chunk header + first 4 octects of init header */ + chunkhdr =skb_header_pointer (skb,skb_transport_offset (skb) + +sizeof (struct sctphdr ), +sizeof (struct sctp_chunkhdr ) + +sizeof (__be32), &_chunkhdr); +if (!chunkhdr || chunkhdr->chunk_hdr.type !=SCTP_CID_INIT || -ntohl (chunkhdr->init_hdr.init_tag) != asoc->c.my_vtag) { +ntohl (chunkhdr->init_hdr.init_tag) != asoc->c.my_vtag) goto out; - } + }else if (vtag != asoc->c.peer_vtag) { goto out; }
net/sctp/ipv6.c +32 -17
73 lines not on this page · raw message
sound/pci/hda/patch_sigmatel.c +2 -0
@@ -1537,6 +1537,8 @@ static const struct snd_pci_quirk stac9200_fixup_tbl[] = { "Dell Inspiron 1501", STAC_9200_DELL_M26),SND_PCI_QUIRK (PCI_VENDOR_ID_DELL ,0x01f6 ,"unknown Dell" ,STAC_9200_DELL_M26 ), +SND_PCI_QUIRK (PCI_VENDOR_ID_DELL ,0x0201 , +"Dell Latitude D430" ,STAC_9200_DELL_M22 ),/* Panasonic */ SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_9200_PANASONIC),/* Gateway machines needs EAPD to be set on resume */
Greg KH wrote...
Quoted 1 line
I'm announcing the release of the 3.18.56 kernel.
Just a small observation, 3.18 is listed as "EOL" on
https://www.kernel.org/, and in that RSS feed as well. Perhaps untag that one as long as you actually provide updates?
Cheers,
Christoph
Quoted 7 lines · Christoph Biedl
Greg KH wrote...
Quoted 1 line
I'm announcing the release of the 3.18.56 kernel.
Just a small observation, 3.18 is listed as "EOL" on
https://www.kernel.org/, and in that RSS feed as well. Perhaps untag that one as long as you actually provide updates?
Better keep it marked EOL so that it remains dissuasive enough. Greg inherited from that kernel which he didn't choose to tag LTS and it got used and deployed to a point where not fixing it leaves many users at risk. Hopefully he'll be able to kill it without prior public warning, so EOL seems to make sense here.
Willy
Greg KH
maintainerQuoted 9 lines · Willy Tarreau
Quoted 7 lines · Christoph Biedl
Greg KH wrote...
Quoted 1 line
I'm announcing the release of the 3.18.56 kernel.
Just a small observation, 3.18 is listed as "EOL" on
https://www.kernel.org/, and in that RSS feed as well. Perhaps untag that one as long as you actually provide updates?
Quoted 5 lines
Better keep it marked EOL so that it remains dissuasive enough. Greg inherited from that kernel which he didn't choose to tag LTS and it got used and deployed to a point where not fixing it leaves many users at risk. Hopefully he'll be able to kill it without prior public warning, so EOL seems to make sense here.
Yes, it will stay marked EOL as I could drop it at any moment!
Hopefully at least :)
thanks,
greg k-h
Greg KH wrote...
Quoted 1 line
Yes, it will stay marked EOL as I could drop it at any moment!
Fair enough. Perhaps introduce a "Zombie" label for that?
Cheers,
Christoph