Linux 4.16.14
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 16 -SUBLEVEL = 13 +SUBLEVEL = 14 EXTRAVERSION = NAME = Fearless Coyote
arch/mips/kernel/process.c +4 -0
@@ -721,6 +721,10 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)if (value & ~known_bits)return -EOPNOTSUPP ; +/* Setting FRE without FR is not supported. */ +if ((value & (PR_FP_MODE_FR |PR_FP_MODE_FRE )) ==PR_FP_MODE_FRE ) +return -EOPNOTSUPP ; +/* Avoid inadvertently triggering emulation */ if ((value &PR_FP_MODE_FR ) && raw_cpu_has_fpu && !(raw_current_cpu_data.fpu_id &MIPS_FPIR_F64 ))
arch/mips/kernel/ptrace.c +1 -1
@@ -818,7 +818,7 @@ long arch_ptrace(struct task_struct *child, long request, break; }#endif - tmp =get_fpr32 (&fregs[addr -FPR_BASE ],0 ); + tmp =get_fpr64 (&fregs[addr -FPR_BASE ],0 );break ;case PC : tmp = regs->cp0_epc;
arch/mips/kernel/ptrace32.c +1 -1
@@ -109,7 +109,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, addr & 1);break ; } - tmp =get_fpr32 (&fregs[addr -FPR_BASE ],0 ); + tmp =get_fpr64 (&fregs[addr -FPR_BASE ],0 );break ;case PC : tmp = regs->cp0_epc;
arch/x86/kernel/cpu/mcheck/mce_amd.c +38 -34
96 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c +4 -4
@@ -166,10 +166,10 @@ void cz_dpm_powergate_uvd(struct pp_hwmgr *hwmgr, bool bgate)cz_dpm_powerup_uvd (hwmgr);cgs_set_clockgating_state (hwmgr->device,AMD_IP_BLOCK_TYPE_UVD , -AMD_PG_STATE_UNGATE ); +AMD_CG_STATE_UNGATE );cgs_set_powergating_state (hwmgr->device,AMD_IP_BLOCK_TYPE_UVD , -AMD_CG_STATE_UNGATE ); +AMD_PG_STATE_UNGATE );cz_dpm_update_uvd_dpm (hwmgr, false); }
@@ -197,11 +197,11 @@ void cz_dpm_powergate_vce(struct pp_hwmgr *hwmgr, bool bgate)cgs_set_clockgating_state ( hwmgr->device,AMD_IP_BLOCK_TYPE_VCE , -AMD_PG_STATE_UNGATE ); +AMD_CG_STATE_UNGATE );cgs_set_powergating_state ( hwmgr->device,AMD_IP_BLOCK_TYPE_VCE , -AMD_CG_STATE_UNGATE ); +AMD_PG_STATE_UNGATE );cz_dpm_update_vce_dpm (hwmgr);cz_enable_disable_vce_dpm (hwmgr, true); }
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c +1 -1
@@ -162,7 +162,7 @@ void smu7_powergate_uvd(struct pp_hwmgr *hwmgr, bool bgate) AMD_CG_STATE_UNGATE);cgs_set_powergating_state (hwmgr->device,AMD_IP_BLOCK_TYPE_UVD , -AMD_CG_STATE_UNGATE ); +AMD_PG_STATE_UNGATE );smu7_update_uvd_dpm (hwmgr, false); }
drivers/gpu/drm/drm_dp_helper.c +1 -0
@@ -1141,6 +1141,7 @@ int drm_dp_psr_setup_time(const u8 psr_cap[EDP_PSR_RECEIVER_CAP_SIZE])static const u16 psr_setup_time_us[] = {PSR_SETUP_TIME (330 ),PSR_SETUP_TIME (275 ), +PSR_SETUP_TIME (220 ),PSR_SETUP_TIME (165 ),PSR_SETUP_TIME (110 ),PSR_SETUP_TIME (55 ),
drivers/gpu/drm/i915/intel_lvds.c +40 -11
81 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c +33 -26
104 lines not on this page · raw message
drivers/hwtracing/intel_th/msu.c +3 -3
@@ -741,8 +741,8 @@ static int msc_buffer_win_alloc(struct msc *msc, unsigned int nr_blocks)/* Reset the page to write-back before releasing */ set_memory_wb ((unsigned long )win->block[i].bdesc,1 );#endif -dma_free_coherent (msc_dev (msc), size, win->block[i].bdesc, - win->block[i].addr); +dma_free_coherent (msc_dev (msc)->parent->parent, size, + win->block[i].bdesc, win->block[i].addr); }kfree (win);
@@ -777,7 +777,7 @@ static void msc_buffer_win_free(struct msc *msc, struct msc_window *win)/* Reset the page to write-back before releasing */ set_memory_wb ((unsigned long )win->block[i].bdesc,1 );#endif -dma_free_coherent (msc_dev (win->msc),PAGE_SIZE , +dma_free_coherent (msc_dev (win->msc)->parent->parent,PAGE_SIZE , win->block[i].bdesc, win->block[i].addr); }
drivers/hwtracing/stm/core.c +4 -3
@@ -27,6 +27,7 @@#include <linux/stm.h> #include <linux/fs.h> #include <linux/mm.h> +#include <linux/vmalloc.h> #include "stm.h" #include <uapi/linux/stm.h>
@@ -682,7 +683,7 @@ static void stm_device_release(struct device *dev) {struct stm_device *stm =to_stm_device (dev); -kfree (stm); +vfree (stm); } int stm_register_device(struct device *parent, struct stm_data *stm_data,
@@ -699,7 +700,7 @@ int stm_register_device(struct device *parent, struct stm_data *stm_data,return -EINVAL ; nmasters = stm_data->sw_end - stm_data->sw_start +1 ; - stm =kzalloc (sizeof (*stm) + nmasters *sizeof (void *),GFP_KERNEL ); + stm =vzalloc (sizeof (*stm) + nmasters *sizeof (void *));if (!stm)return -ENOMEM ;
@@ -752,7 +753,7 @@ int stm_register_device(struct device *parent, struct stm_data *stm_data,/* matches device_initialize() above */ put_device (&stm->dev); err_free: -kfree (stm); +vfree (stm);return err; }
drivers/iio/adc/Kconfig +1 -0
@@ -159,6 +159,7 @@ config AT91_SAMA5D2_ADC depends on ARCH_AT91 || COMPILE_TEST depends on HAS_IOMEM depends on HAS_DMA + select IIO_BUFFER select IIO_TRIGGERED_BUFFER help Say yes here to build support for Atmel SAMA5D2 ADC which is
drivers/iio/adc/ad7793.c +24 -51
105 lines not on this page · raw message
drivers/iio/adc/at91-sama5d2_adc.c +37 -4
74 lines not on this page · raw message
drivers/iio/adc/stm32-dfsdm-adc.c +14 -3
@@ -144,6 +144,7 @@ static int stm32_dfsdm_set_osrs(struct stm32_dfsdm_filter *fl,* Leave as soon as if exact resolution if reached. * Otherwise the higher resolution below 32 bits is kept. */ + fl->res =0 ;for (fosr =1 ; fosr <=DFSDM_MAX_FL_OVERSAMPLING ; fosr++) {for (iosr =1 ; iosr <=DFSDM_MAX_INT_OVERSAMPLING ; iosr++) {if (fast)
@@ -193,7 +194,7 @@ static int stm32_dfsdm_set_osrs(struct stm32_dfsdm_filter *fl, } } -if (!fl->fosr) +if (!fl->res)return -EINVAL ;return 0 ;
@@ -770,7 +771,7 @@ static int stm32_dfsdm_write_raw(struct iio_dev *indio_dev,struct stm32_dfsdm_adc *adc =iio_priv (indio_dev);struct stm32_dfsdm_filter *fl = &adc->dfsdm->fl_list[adc->fl_id];struct stm32_dfsdm_channel *ch = &adc->dfsdm->ch_list[chan->channel]; -unsigned int spi_freq = adc->spi_freq; +unsigned int spi_freq;int ret = -EINVAL ;switch (mask) {
@@ -784,8 +785,18 @@ static int stm32_dfsdm_write_raw(struct iio_dev *indio_dev,case IIO_CHAN_INFO_SAMP_FREQ :if (!val)return -EINVAL ; -if (ch->src !=DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL ) + +switch (ch->src) { +case DFSDM_CHANNEL_SPI_CLOCK_INTERNAL : spi_freq = adc->dfsdm->spi_master_freq; +break ; +case DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING : +case DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING : + spi_freq = adc->dfsdm->spi_master_freq /2 ; +break ; +default : + spi_freq = adc->spi_freq; + }if (spi_freq % val) dev_warn(&indio_dev->dev,
drivers/iio/buffer/industrialio-buffer-dma.c +1 -1
@@ -587,7 +587,7 @@ EXPORT_SYMBOL_GPL(iio_dma_buffer_set_bytes_per_datum);* Should be used as the set_length callback for iio_buffer_access_ops * struct for DMA buffers. */ -int iio_dma_buffer_set_length (struct iio_buffer *buffer,int length) +int iio_dma_buffer_set_length (struct iio_buffer *buffer,unsigned int length) {/* Avoid an invalid state */ if (length <2 )
drivers/iio/buffer/kfifo_buf.c +9 -2
@@ -22,11 +22,18 @@ struct iio_kfifo {#define iio_to_kfifo (r) container_of(r, struct iio_kfifo, buffer)static inline int __iio_allocate_kfifo (struct iio_kfifo *buf, -int bytes_per_datum,int length) +size_t bytes_per_datum,unsigned int length) {if ((length ==0 ) || (bytes_per_datum ==0 ))return -EINVAL ; +/* +* Make sure we don't overflow an unsigned int after kfifo rounds up to +* the next power of 2. +*/ +if (roundup_pow_of_two (length) >UINT_MAX / bytes_per_datum) +return -EINVAL ; +return __kfifo_alloc ((struct __kfifo *)&buf->kf, length, bytes_per_datum,GFP_KERNEL ); }
@@ -67,7 +74,7 @@ static int iio_set_bytes_per_datum_kfifo(struct iio_buffer *r, size_t bpd)return 0 ; } -static int iio_set_length_kfifo (struct iio_buffer *r,int length) +static int iio_set_length_kfifo (struct iio_buffer *r,unsigned int length) {/* Avoid an invalid state */ if (length <2 )
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +4 -4
@@ -178,14 +178,14 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)#ifdef CONFIG_PM int ret; -atomic_set (&st->user_requested_state, state); -if (atomic_add_unless (&st->runtime_pm_enable,1 ,1 ))pm_runtime_enable (&st->pdev->dev); -if (state) +if (state) { +atomic_inc (&st->user_requested_state); ret =pm_runtime_get_sync (&st->pdev->dev); -else { + }else { +atomic_dec (&st->user_requested_state);pm_runtime_mark_last_busy (&st->pdev->dev);pm_runtime_use_autosuspend (&st->pdev->dev); ret =pm_runtime_put_autosuspend (&st->pdev->dev);
drivers/infiniband/core/cache.c +1 -1
@@ -434,7 +434,7 @@ static int __ib_cache_gid_get(struct ib_device *ib_dev, u8 port, int index,return -EINVAL ;if (table->data_vec[index].props &GID_TABLE_ENTRY_INVALID ) -return -EAGAIN ; +return -EINVAL ;memcpy (gid, &table->data_vec[index].gid,sizeof (*gid));if (attr) {
drivers/input/mouse/elan_i2c_smbus.c +11 -11
@@ -130,7 +130,7 @@ static int elan_smbus_get_baseline_data(struct i2c_client *client, bool max_baseline, u8 *value) { int error; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; error = i2c_smbus_read_block_data(client, max_baseline ?
@@ -149,7 +149,7 @@ static int elan_smbus_get_version(struct i2c_client *client, bool iap, u8 *version) { int error; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; error = i2c_smbus_read_block_data(client, iap ? ETP_SMBUS_IAP_VERSION_CMD :
@@ -170,7 +170,7 @@ static int elan_smbus_get_sm_version(struct i2c_client *client, u8 *clickpad) {int error; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; error =i2c_smbus_read_block_data (client,ETP_SMBUS_SM_VERSION_CMD , val);
@@ -188,7 +188,7 @@ static int elan_smbus_get_sm_version(struct i2c_client *client,static int elan_smbus_get_product_id (struct i2c_client *client,u16 *id) {int error; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; error =i2c_smbus_read_block_data (client,ETP_SMBUS_UNIQUEID_CMD , val);
@@ -205,7 +205,7 @@ static int elan_smbus_get_checksum(struct i2c_client *client, bool iap, u16 *csum) { int error; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; error = i2c_smbus_read_block_data(client, iap ? ETP_SMBUS_FW_CHECKSUM_CMD :
@@ -226,7 +226,7 @@ static int elan_smbus_get_max(struct i2c_client *client, {int ret;int error; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; ret =i2c_smbus_read_block_data (client,ETP_SMBUS_RANGE_CMD , val);if (ret !=3 ) {
@@ -246,7 +246,7 @@ static int elan_smbus_get_resolution(struct i2c_client *client, {int ret;int error; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; ret =i2c_smbus_read_block_data (client,ETP_SMBUS_RESOLUTION_CMD , val);if (ret !=3 ) {
@@ -267,7 +267,7 @@ static int elan_smbus_get_num_traces(struct i2c_client *client, {int ret;int error; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; ret =i2c_smbus_read_block_data (client,ETP_SMBUS_XY_TRACENUM_CMD , val);if (ret !=3 ) {
@@ -294,7 +294,7 @@ static int elan_smbus_iap_get_mode(struct i2c_client *client, {int error;u16 constant; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 }; error =i2c_smbus_read_block_data (client,ETP_SMBUS_IAP_CTRL_CMD , val);if (error <0 ) {
@@ -345,7 +345,7 @@ static int elan_smbus_prepare_fw_update(struct i2c_client *client)int len;int error;enum tp_mode mode; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 };u8 cmd[4 ] = {0x0F ,0x78 ,0x00 ,0x06 };u16 password;
@@ -419,7 +419,7 @@ static int elan_smbus_write_fw_block(struct i2c_client *client,struct device *dev = &client->dev;int error;u16 result; -u8 val[3 ]; +u8 val[I2C_SMBUS_BLOCK_MAX ] = {0 };/* * Due to the limitation of smbus protocol limiting
drivers/input/mouse/synaptics.c +6 -0
@@ -172,6 +172,12 @@ static const char * const smbus_pnp_ids[] = {"LEN0048" ,/* X1 Carbon 3 */ "LEN0046" ,/* X250 */ "LEN004a" ,/* W541 */ +"LEN0071" ,/* T480 */ +"LEN0072" ,/* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */ +"LEN0073" ,/* X1 Carbon G5 (Elantech) */ +"LEN0092" ,/* X1 Carbon 6 */ +"LEN0096" ,/* X280 */ +"LEN0097" ,/* X280 -> ALPS trackpoint */ "LEN200f" ,/* T450s */ NULL };
drivers/net/wireless/ralink/rt2x00/rt2x00queue.c +3 -4
@@ -372,16 +372,15 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,/* * Determine IFS values -* - Use TXOP_BACKOFF for probe and management frames except beacons +* - Use TXOP_BACKOFF for management frames except beacons * - Use TXOP_SIFS for fragment bursts * - Use TXOP_HTTXOP for everything else * * Note: rt2800 devices won't use CTS protection (if used) * for frames not transmitted with TXOP_HTTXOP */ -if ((ieee80211_is_mgmt (hdr->frame_control) && - !ieee80211_is_beacon (hdr->frame_control)) || - (tx_info->flags &IEEE80211_TX_CTL_RATE_CTRL_PROBE )) +if (ieee80211_is_mgmt (hdr->frame_control) && + !ieee80211_is_beacon (hdr->frame_control)) txdesc->u.ht.txop =TXOP_BACKOFF ;else if (!(tx_info->flags &IEEE80211_TX_CTL_FIRST_FRAGMENT )) txdesc->u.ht.txop =TXOP_SIFS ;
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c +0 -3
@@ -299,9 +299,6 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, writeVal =0x00000000 ;if (rtlpriv->dm.dynamic_txhighpower_lvl ==TXHIGHPWRLEVEL_BT1 ) writeVal = writeVal -0x06060606 ; -else if (rtlpriv->dm.dynamic_txhighpower_lvl == -TXHIGHPWRLEVEL_BT2 ) - writeVal = writeVal; *(p_outwriteval + rf) = writeVal; } }
drivers/nvme/host/core.c +1 -1
@@ -1446,8 +1446,8 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)if (ns->lba_shift ==0 ) ns->lba_shift =9 ; ns->noiob =le16_to_cpu (id->noiob); - ns->ext = ns->ms && (id->flbas &NVME_NS_FLBAS_META_EXT ); ns->ms =le16_to_cpu (id->lbaf[id->flbas &NVME_NS_FLBAS_LBA_MASK ].ms); + ns->ext = ns->ms && (id->flbas &NVME_NS_FLBAS_META_EXT );/* the PI implementation requires metadata equal t10 pi tuple size */ if (ns->ms ==sizeof (struct t10_pi_tuple )) ns->pi_type = id->dps &NVME_NS_DPS_PI_MASK ;
drivers/pinctrl/qcom/pinctrl-msm.c +1 -1
@@ -818,7 +818,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)return -EINVAL ; chip = &pctrl->chip; - chip->base =-1 ; + chip->base =0 ; chip->ngpio = ngpio; chip->label =dev_name (pctrl->dev); chip->parent = pctrl->dev;
drivers/scsi/scsi_transport_srp.c +20 -2
@@ -51,6 +51,8 @@ struct srp_internal {struct transport_container rport_attr_cont; }; +static int scsi_is_srp_rport (const struct device *dev); +#define to_srp_internal (tmpl) container_of(tmpl, struct srp_internal, t)#define dev_to_rport (d) container_of(d, struct srp_rport, dev)
@@ -60,9 +62,24 @@ static inline struct Scsi_Host *rport_to_shost(struct srp_rport *r)return dev_to_shost (r->dev.parent); } +static int find_child_rport (struct device *dev,void *data) +{ +struct device **child = data; + +if (scsi_is_srp_rport (dev)) { +WARN_ON_ONCE (*child); + *child = dev; + } +return 0 ; +} +static inline struct srp_rport *shost_to_rport (struct Scsi_Host *shost) { -return transport_class_to_srp_rport (&shost->shost_gendev); +struct device *child =NULL ; + +WARN_ON_ONCE (device_for_each_child (&shost->shost_gendev, &child, + find_child_rport) <0 ); +return child ?dev_to_rport (child) :NULL ; }/**
@@ -600,7 +617,8 @@ enum blk_eh_timer_return srp_timed_out(struct scsi_cmnd *scmd)struct srp_rport *rport =shost_to_rport (shost);pr_debug ("timeout for sdev %s\n" ,dev_name (&sdev->sdev_gendev)); -return rport->fast_io_fail_tmo <0 && rport->dev_loss_tmo <0 && +return rport && rport->fast_io_fail_tmo <0 && + rport->dev_loss_tmo <0 && i->f->reset_timer_if_blocked &&scsi_device_blocked (sdev) ?BLK_EH_RESET_TIMER :BLK_EH_NOT_HANDLED ; }
drivers/soc/lantiq/gphy.c +0 -36
@@ -30,7 +30,6 @@ struct xway_gphy_priv {struct clk *gphy_clk_gate;struct reset_control *gphy_reset;struct reset_control *gphy_reset2; -struct notifier_block gphy_reboot_nb;void __iomem *membase;char *fw_name; };
@@ -64,24 +63,6 @@ static const struct of_device_id xway_gphy_match[] = { };MODULE_DEVICE_TABLE (of, xway_gphy_match); -static struct xway_gphy_priv *to_xway_gphy_priv (struct notifier_block *nb) -{ - return container_of(nb, struct xway_gphy_priv, gphy_reboot_nb); -} - -static int xway_gphy_reboot_notify (struct notifier_block *reboot_nb, -unsigned long code,void *unused) -{ -struct xway_gphy_priv *priv =to_xway_gphy_priv (reboot_nb); - -if (priv) { -reset_control_assert (priv->gphy_reset); -reset_control_assert (priv->gphy_reset2); - } - -return NOTIFY_DONE ; -} -static int xway_gphy_load (struct device *dev,struct xway_gphy_priv *priv,dma_addr_t *dev_addr) {
@@ -205,14 +186,6 @@ static int xway_gphy_probe(struct platform_device *pdev)reset_control_deassert (priv->gphy_reset);reset_control_deassert (priv->gphy_reset2); -/* assert the gphy reset because it can hang after a reboot: */ - priv->gphy_reboot_nb.notifier_call = xway_gphy_reboot_notify; - priv->gphy_reboot_nb.priority =-1 ; - - ret =register_reboot_notifier (&priv->gphy_reboot_nb); -if (ret) -dev_warn (dev,"Failed to register reboot notifier\n" ); -platform_set_drvdata (pdev, priv);return ret;
@@ -220,21 +193,12 @@ static int xway_gphy_probe(struct platform_device *pdev)static int xway_gphy_remove (struct platform_device *pdev) { -struct device *dev = &pdev->dev;struct xway_gphy_priv *priv =platform_get_drvdata (pdev); -int ret; - -reset_control_assert (priv->gphy_reset); -reset_control_assert (priv->gphy_reset2);iowrite32be (0 , priv->membase);clk_disable_unprepare (priv->gphy_clk_gate); - ret =unregister_reboot_notifier (&priv->gphy_reboot_nb); -if (ret) -dev_warn (dev,"Failed to unregister reboot notifier\n" ); -return 0 ; }
fs/aio.c +1 -2
@@ -643,9 +643,8 @@ static void free_ioctx_users(struct percpu_ref *ref)while (!list_empty (&ctx->active_reqs)) { req =list_first_entry (&ctx->active_reqs, struct aio_kiocb, ki_list); - -list_del_init (&req->ki_list);kiocb_cancel (req); +list_del_init (&req->ki_list); }spin_unlock_irq (&ctx->ctx_lock);
fs/xfs/libxfs/xfs_alloc.c +118 -7
185 lines not on this page · raw message
fs/xfs/libxfs/xfs_alloc.h +2 -0
@@ -26,6 +26,8 @@ struct xfs_trans;extern struct workqueue_struct *xfs_alloc_wq; +unsigned int xfs_agfl_size (struct xfs_mount *mp); +/* * Freespace allocation types. Argument to xfs_alloc_[v]extent. */
fs/xfs/libxfs/xfs_format.h +1 -12
@@ -803,24 +803,13 @@ typedef struct xfs_agi { &(XFS_BUF_TO_AGFL(bp)->agfl_bno[0]) : \ (__be32 *)(bp)->b_addr) -/* -* Size of the AGFL. For CRC-enabled filesystes we steal a couple of -* slots in the beginning of the block for a proper header with the -* location information and CRC. -*/ -#define XFS_AGFL_SIZE (mp) \ - (((mp)->m_sb.sb_sectsize - \ - (xfs_sb_version_hascrc(&((mp)->m_sb)) ? \ - sizeof(struct xfs_agfl) : 0)) / \ - sizeof(xfs_agblock_t)) -typedef struct xfs_agfl {__be32 agfl_magicnum;__be32 agfl_seqno;uuid_t agfl_uuid;__be64 agfl_lsn;__be32 agfl_crc; -__be32 agfl_bno[];/* actually XFS_AGFL_SIZE(mp) */ +__be32 agfl_bno[];/* actually xfs_agfl_size(mp) */ } __attribute__((packed))xfs_agfl_t ;#define XFS_AGFL_CRC_OFF offsetof(struct xfs_agfl, agfl_crc)
fs/xfs/scrub/agheader.c +3 -3
@@ -80,7 +80,7 @@ xfs_scrub_walk_agfl( }/* first to the end */ -for (i = flfirst; i <XFS_AGFL_SIZE (mp); i++) { +for (i = flfirst; i <xfs_agfl_size (mp); i++) { error =fn (sc,be32_to_cpu (agfl_bno[i]), priv);if (error)return error;
@@ -664,7 +664,7 @@ xfs_scrub_agf(if (agfl_last > agfl_first) fl_count = agfl_last - agfl_first +1 ;else - fl_count =XFS_AGFL_SIZE (mp) - agfl_first + agfl_last +1 ; + fl_count =xfs_agfl_size (mp) - agfl_first + agfl_last +1 ;if (agfl_count !=0 && fl_count != agfl_count)xfs_scrub_block_set_corrupt (sc, sc->sa.agf_bp);
@@ -791,7 +791,7 @@ xfs_scrub_agfl(/* Allocate buffer to ensure uniqueness of AGFL entries. */ agf =XFS_BUF_TO_AGF (sc->sa.agf_bp); agflcount =be32_to_cpu (agf->agf_flcount); -if (agflcount >XFS_AGFL_SIZE (sc->mp)) { +if (agflcount >xfs_agfl_size (sc->mp)) {xfs_scrub_block_set_corrupt (sc, sc->sa.agf_bp); goto out; }
fs/xfs/xfs_fsops.c +1 -1
@@ -217,7 +217,7 @@ xfs_growfs_data_private( } agfl_bno =XFS_BUF_TO_AGFL_BNO (mp, bp); -for (bucket =0 ; bucket <XFS_AGFL_SIZE (mp); bucket++) +for (bucket =0 ; bucket <xfs_agfl_size (mp); bucket++) agfl_bno[bucket] =cpu_to_be32 (NULLAGBLOCK ); error =xfs_bwrite (bp);
fs/xfs/xfs_mount.h +1 -0
@@ -353,6 +353,7 @@ typedef struct xfs_perag {char pagi_inodeok;/* The agi is ok for inodes */ uint8_t pagf_levels[XFS_BTNUM_AGF ];/* # of levels in bno & cnt btree */ +bool pagf_agflreset;/* agfl requires reset before use */ uint32_t pagf_flcount;/* count of blocks in freelist */ xfs_extlen_t pagf_freeblks;/* total free blocks */ xfs_extlen_t pagf_longest;/* longest free space */
fs/xfs/xfs_trace.h +8 -1
@@ -1477,7 +1477,7 @@ TRACE_EVENT(xfs_extent_busy_trim, __entry->tlen) ); -TRACE_EVENT(xfs_agf, +DECLARE_EVENT_CLASS(xfs_agf_class, TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags, unsigned long caller_ip), TP_ARGS(mp, agf, flags, caller_ip),
@@ -1533,6 +1533,13 @@ TRACE_EVENT(xfs_agf, __entry->longest, (void *)__entry->caller_ip) ); +#define DEFINE_AGF_EVENT (name) \ +DEFINE_EVENT(xfs_agf_class, name, \ + TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags, \ + unsigned long caller_ip), \ + TP_ARGS(mp, agf, flags, caller_ip)) +DEFINE_AGF_EVENT (xfs_agf); +DEFINE_AGF_EVENT (xfs_agfl_reset); TRACE_EVENT(xfs_free_extent, TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno,
include/linux/iio/buffer_impl.h +3 -3
@@ -53,7 +53,7 @@ struct iio_buffer_access_funcs {int (*request_update)(struct iio_buffer *buffer);int (*set_bytes_per_datum)(struct iio_buffer *buffer,size_t bpd); -int (*set_length)(struct iio_buffer *buffer,int length); +int (*set_length)(struct iio_buffer *buffer,unsigned int length);int (*enable)(struct iio_buffer *buffer,struct iio_dev *indio_dev);int (*disable)(struct iio_buffer *buffer,struct iio_dev *indio_dev);
@@ -72,10 +72,10 @@ struct iio_buffer_access_funcs {*/ struct iio_buffer {/** @length: Number of datums in buffer. */ -int length; +unsigned int length;/** @bytes_per_datum: Size of individual datum including timestamp. */ -int bytes_per_datum; +size_t bytes_per_datum;/** * @access: Buffer access functions associated with the
include/uapi/linux/nl80211.h +1 -1
@@ -2618,7 +2618,7 @@ enum nl80211_attrs {#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS -#define NL80211_WIPHY_NAME_MAXLEN 128 +#define NL80211_WIPHY_NAME_MAXLEN 64#define NL80211_MAX_SUPP_RATES 32#define NL80211_MAX_SUPP_HT_RATES 77
kernel/trace/trace.c +6 -6
@@ -892,7 +892,7 @@ int __trace_bputs(unsigned long ip, const char *str)EXPORT_SYMBOL_GPL (__trace_bputs);#ifdef CONFIG_TRACER_SNAPSHOT -static void tracing_snapshot_instance (struct trace_array *tr) +void tracing_snapshot_instance (struct trace_array *tr) {struct tracer *tracer = tr->current_trace;unsigned long flags;
@@ -948,7 +948,7 @@ static int resize_buffer_duplicate_size(struct trace_buffer *trace_buf, struct trace_buffer *size_buf, int cpu_id);static void set_buffer_entries (struct trace_buffer *buf,unsigned long val); -static int alloc_snapshot (struct trace_array *tr) +int tracing_alloc_snapshot_instance (struct trace_array *tr) {int ret;
@@ -994,7 +994,7 @@ int tracing_alloc_snapshot(void)struct trace_array *tr = &global_trace;int ret; - ret =alloc_snapshot (tr); + ret =tracing_alloc_snapshot_instance (tr);WARN_ON (ret <0 );return ret;
@@ -5395,7 +5395,7 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)#ifdef CONFIG_TRACER_MAX_TRACE if (t->use_max_tr && !had_max_tr) { - ret =alloc_snapshot (tr); + ret =tracing_alloc_snapshot_instance (tr);if (ret <0 ) goto out; }
@@ -6373,7 +6373,7 @@ tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt, }#endif if (!tr->allocated_snapshot) { - ret =alloc_snapshot (tr); + ret =tracing_alloc_snapshot_instance (tr);if (ret <0 )break ; }
@@ -7094,7 +7094,7 @@ ftrace_trace_snapshot_callback(struct trace_array *tr, struct ftrace_hash *hash,return ret; out_reg: - ret =alloc_snapshot (tr); + ret =tracing_alloc_snapshot_instance (tr);if (ret <0 ) goto out;
kernel/trace/trace.h +11 -0
@@ -1812,6 +1812,17 @@ static inline void __init trace_event_init(void) { }static inline void trace_event_eval_update (struct trace_eval_map **map,int len) { }#endif +#ifdef CONFIG_TRACER_SNAPSHOT +void tracing_snapshot_instance (struct trace_array *tr); +int tracing_alloc_snapshot_instance (struct trace_array *tr); +#else +static inline void tracing_snapshot_instance (struct trace_array *tr) { } +static inline int tracing_alloc_snapshot_instance (struct trace_array *tr) +{ +return 0 ; +} +#endif +extern struct trace_iterator *tracepoint_print_iter;#endif /* _LINUX_KERNEL_TRACE_H */
kernel/trace/trace_events_trigger.c +11 -4
@@ -482,9 +482,10 @@ clear_event_triggers(struct trace_array *tr)struct trace_event_file *file;list_for_each_entry (file, &tr->events, list) { -struct event_trigger_data *data; -list_for_each_entry_rcu (data, &file->triggers, list) { +struct event_trigger_data *data, *n; +list_for_each_entry_safe (data, n, &file->triggers, list) {trace_event_trigger_enable_disable (file,0 ); +list_del_rcu (&data->list);if (data->ops->free) data->ops->free (data->ops, data); }
@@ -641,6 +642,7 @@ event_trigger_callback(struct event_command *cmd_ops, trigger_data->count =-1 ; trigger_data->ops = trigger_ops; trigger_data->cmd_ops = cmd_ops; + trigger_data->private_data = file;INIT_LIST_HEAD (&trigger_data->list);INIT_LIST_HEAD (&trigger_data->named_list);
@@ -1041,7 +1043,12 @@ static struct event_command trigger_traceoff_cmd = {static void snapshot_trigger (struct event_trigger_data *data,void *rec) { -tracing_snapshot (); +struct trace_event_file *file = data->private_data; + +if (file) +tracing_snapshot_instance (file->tr); +else +tracing_snapshot (); } static void
@@ -1063,7 +1070,7 @@ register_snapshot_trigger(char *glob, struct event_trigger_ops *ops, {int ret =register_trigger (glob, ops, data, file); -if (ret >0 &&tracing_alloc_snapshot () !=0 ) { +if (ret >0 &&tracing_alloc_snapshot_instance (file->tr) !=0 ) {unregister_trigger (glob, ops, data, file); ret =0 ; }
mm/huge_memory.c +1 -1
@@ -2432,7 +2432,7 @@ static void __split_huge_page(struct page *page, struct list_head *list,__split_huge_page_tail (head, i, lruvec, list);/* Some pages can be beyond i_size: drop them from page cache */ if (head[i].index >= end) { -__ClearPageDirty (head + i); +ClearPageDirty (head + i);__delete_from_page_cache (head + i,NULL );if (IS_ENABLED (CONFIG_SHMEM ) &&PageSwapBacked (head))shmem_uncharge (head->mapping->host,1 );
mm/vmscan.c +1 -1
@@ -1392,7 +1392,7 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)return ret; mapping =page_mapping (page); - migrate_dirty = mapping && mapping->a_ops->migratepage; + migrate_dirty = !mapping || mapping->a_ops->migratepage;unlock_page (page);if (!migrate_dirty)return ret;
security/selinux/ss/services.c +1 -1
@@ -1448,7 +1448,7 @@ static int security_context_to_sid_core(const char *scontext, u32 scontext_len, scontext_len, &context, def_sid);if (rc == -EINVAL && force) { context.str = str; - context.len = scontext_len; + context.len =strlen (str) +1 ; str =NULL ; }else if (rc) goto out_unlock;
tools/objtool/check.c +95 -72
305 lines not on this page · raw message
tools/objtool/elf.c +40 -2
62 lines not on this page · raw message
tools/objtool/elf.h +2 -0
@@ -61,6 +61,7 @@ struct symbol {unsigned char bind, type;unsigned long offset;unsigned int len; +struct symbol *pfunc, *cfunc; };struct rela {
@@ -86,6 +87,7 @@ struct elf {struct elf *elf_open (const char *name,int flags);struct section *find_section_by_name (struct elf *elf,const char *name);struct symbol *find_symbol_by_offset (struct section *sec,unsigned long offset); +struct symbol *find_symbol_by_name (struct elf *elf,const char *name);struct symbol *find_symbol_containing (struct section *sec,unsigned long offset);struct rela *find_rela_by_dest (struct section *sec,unsigned long offset); struct rela *find_rela_by_dest_range(struct section *sec, unsigned long offset,
Greg KH
maintainerI'm announcing the release of the 4.16.14 kernel.
All users of the 4.16 kernel series must upgrade.
The updated 4.16.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.16.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 arch/mips/kernel/process.c | 4 arch/mips/kernel/ptrace.c | 2 arch/mips/kernel/ptrace32.c | 2 arch/x86/kernel/cpu/mcheck/mce_amd.c | 72 ++--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 8 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c | 2 drivers/gpu/drm/drm_dp_helper.c | 1 drivers/gpu/drm/i915/intel_lvds.c | 51 ++- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 59 ++-- drivers/hwtracing/intel_th/msu.c | 6 drivers/hwtracing/stm/core.c | 7 drivers/iio/adc/Kconfig | 1 drivers/iio/adc/ad7793.c | 75 +---- drivers/iio/adc/at91-sama5d2_adc.c | 41 ++ drivers/iio/adc/stm32-dfsdm-adc.c | 17 + drivers/iio/buffer/industrialio-buffer-dma.c | 2 drivers/iio/buffer/kfifo_buf.c | 11 drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 8 drivers/infiniband/core/cache.c | 2 drivers/input/mouse/elan_i2c_smbus.c | 22 - drivers/input/mouse/synaptics.c | 6 drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 7 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c | 3 drivers/nvme/host/core.c | 2 drivers/pinctrl/qcom/pinctrl-msm.c | 2 drivers/scsi/scsi_transport_srp.c | 22 + drivers/soc/lantiq/gphy.c | 36 -- fs/aio.c | 3 fs/xfs/libxfs/xfs_alloc.c | 125 ++++++++ fs/xfs/libxfs/xfs_alloc.h | 2 fs/xfs/libxfs/xfs_format.h | 13 fs/xfs/scrub/agheader.c | 6 fs/xfs/xfs_fsops.c | 2 fs/xfs/xfs_mount.h | 1 fs/xfs/xfs_trace.h | 9 include/linux/iio/buffer_impl.h | 6 include/uapi/linux/nl80211.h | 2 kernel/trace/trace.c | 12 kernel/trace/trace.h | 11 kernel/trace/trace_events_trigger.c | 15 - mm/huge_memory.c | 2 mm/vmscan.c | 2 security/selinux/ss/services.c | 2 tools/objtool/check.c | 167 ++++++------ tools/objtool/elf.c | 42 ++- tools/objtool/elf.h | 2 47 files changed, 571 insertions(+), 326 deletions(-)
Aaron Ma (1):
Input: synaptics - add Intertouch support on X1 Carbon 6th and X280
Al Viro (1):
fix io_destroy()/aio_complete() race
Alexander Shishkin (2):
stm class: Use vmalloc for the master map
intel_th: Use correct device when freeing buffers
Bart Van Assche (1):
scsi: scsi_transport_srp: Fix shost to rport translation
Benjamin Tissoires (2):
Input: synaptics - add Lenovo 80 series ids to SMBus
Input: elan_i2c_smbus - fix corrupted stack
Borislav Petkov (1):
x86/MCE/AMD: Cache SMCA MISC block addresses
Brian Foster (1):
xfs: detect agfl count corruption and reset agfl
Chris Wilson (1):
drm/i915/lvds: Move acpi lid notification registration to registration phase
Dave Chinner (1):
xfs: convert XFS_AGFL_SIZE to a helper function
Dhinakaran Pandiyan (1):
drm/psr: Fix missed entry in PSR setup time table.
Dmitry Torokhov (1):
Input: synaptics - Lenovo Carbon X1 Gen5 (2017) devices should use RMI
Edvard Holst (1):
Input: synaptics - Lenovo Thinkpad X1 Carbon G5 (2017) with Elantech trackpoints should use RMI
Eric Biggers (1):
cfg80211: further limit wiphy names to 64 bytes
Eugen Hristev (2):
iio: adc: at91-sama5d2_adc: fix channel configuration for differential channels
iio: adc: select buffer for at91-sama5d2_adc
Fabrice Gasnier (2):
iio: adc: stm32-dfsdm: fix successive oversampling settings
iio: adc: stm32-dfsdm: fix sample rate for div2 spi clock
Greg Kroah-Hartman (3):
Revert "pinctrl: msm: Use dynamic GPIO numbering"
hwtracing: stm: fix build error on some arches Linux 4.16.14
Hans de Goede (1):
iio: hid-sensor-trigger: Fix sometimes not powering up the sensor after resume
Himanshu Jha (1):
drm/vmwgfx: Use kasprintf
Hugh Dickins (2):
mm/huge_memory.c: __split_huge_page() use atomic ClearPageDirty()
mm: fix the NULL mapping case in __isolate_lru_page()
Josh Poimboeuf (5):
objtool: Support GCC 8's cold subfunctions
objtool: Support GCC 8 switch tables
objtool: Detect RIP-relative switch table references
objtool: Detect RIP-relative switch table references, part 2
objtool: Fix "noreturn" detection for recursive sibling calls
Maciej W. Rozycki (2):
MIPS: ptrace: Fix PTRACE_PEEKUSR requests for 64-bit FGRs
MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests
Martin Kelly (2):
iio:buffer: make length types match kfifo types iio:kfifo_buf: check for uint overflow
Mathias Kresin (1):
MIPS: lantiq: gphy: Drop reboot/remove reset asserts
Matthias Kaehlcke (2):
drm/amd/powerplay: Fix enum mismatch
rtlwifi: rtl8192cu: Remove variable self-assignment in rf.c
Max Gurtovoy (1):
nvme: fix extended data LBA supported setting
Michael Nosthoff (1):
iio: ad7793: implement IIO_CHAN_INFO_SAMP_FREQ
Ondrej Zary (1):
drm/i915: Disable LVDS on Radiant P845
Parav Pandit (1):
IB/core: Fix error code for invalid GID entry
Sachin Grover (1):
selinux: KASAN: slab-out-of-bounds in xattr_getsecurity
Stanislaw Gruszka (1):
Revert "rt2800: use TXOP_BACKOFF for probe frames"
Steven Rostedt (VMware) (2):
tracing: Fix crash when freeing instances with event triggers
tracing: Make the snapshot trigger work with instances
Thomas Hellstrom (1):
drm/vmwgfx: Fix host logging / guestinfo reading error paths
Yazen Ghannam (1):
x86/mce/AMD: Carve out SMCA get_block_address() code