Linux 3.18.89
Greg KH
maintainerI'm announcing the release of the 3.18.89 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 arch/blackfin/Kconfig | 7 +- arch/blackfin/Kconfig.debug | 1 arch/openrisc/include/asm/uaccess.h | 2 arch/powerpc/platforms/powernv/opal-async.c | 6 - arch/powerpc/platforms/powernv/setup.c | 2 arch/powerpc/sysdev/ipic.c | 4 - arch/x86/crypto/salsa20_glue.c | 7 -- crypto/hmac.c | 6 + crypto/salsa20_generic.c | 7 -- crypto/shash.c | 5 - drivers/bus/arm-ccn.c | 1 drivers/clk/tegra/clk-tegra30.c | 2 drivers/dma/dmaengine.c | 2 drivers/gpu/drm/radeon/si_dpm.c | 10 +++ drivers/input/serio/i8042-x86ia64io.h | 7 ++ drivers/md/bcache/request.c | 6 + drivers/md/bcache/super.c | 6 + drivers/md/raid5.c | 5 + drivers/net/ethernet/broadcom/genet/bcmgenet.c | 79 +++++++++++++++++++++---- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 10 ++- drivers/net/macvlan.c | 2 drivers/net/ppp/ppp_generic.c | 1 drivers/net/wimax/i2400m/usb.c | 3 drivers/net/wireless/ath/ath9k/tx99.c | 5 + drivers/pci/pcie/pme.c | 5 + drivers/pci/remove.c | 2 drivers/pinctrl/Kconfig | 3 drivers/scsi/bfa/bfad_debugfs.c | 5 - drivers/scsi/scsi_devinfo.c | 2 drivers/target/iscsi/iscsi_target.c | 3 drivers/target/iscsi/iscsi_target_configfs.c | 3 drivers/target/target_core_alua.c | 8 -- drivers/target/target_core_file.c | 4 + drivers/target/target_core_pr.c | 4 - drivers/thermal/step_wise.c | 11 +-- drivers/usb/core/config.c | 4 - drivers/usb/host/xhci-mem.c | 15 +++- drivers/usb/musb/da8xx.c | 10 ++- drivers/usb/phy/phy-isp1301.c | 7 ++ drivers/usb/storage/unusual_devs.h | 7 ++ drivers/usb/storage/unusual_uas.h | 7 ++ drivers/usb/usbip/stub_tx.c | 7 ++ drivers/video/fbdev/au1200fb.c | 7 +- drivers/video/fbdev/controlfb.h | 2 drivers/video/fbdev/udlfb.c | 10 +-- fs/afs/file.c | 1 fs/afs/fsclient.c | 20 +++--- fs/afs/inode.c | 4 - fs/afs/internal.h | 1 fs/afs/security.c | 7 +- fs/afs/write.c | 32 ++++++++-- fs/autofs4/waitq.c | 1 fs/btrfs/inode.c | 14 ++++ fs/ext4/namei.c | 4 + fs/gfs2/file.c | 4 - fs/nfs/nfs4client.c | 4 - fs/nfsd/nfssvc.c | 30 ++++----- fs/proc/proc_tty.c | 3 fs/udf/super.c | 2 fs/xfs/xfs_log_recover.c | 2 include/crypto/internal/hash.h | 8 ++ include/linux/mman.h | 3 kernel/sched/deadline.c | 8 +- net/core/dev.c | 1 net/mac80211/mesh.c | 2 security/keys/request_key.c | 4 + tools/perf/util/symbol.c | 2 68 files changed, 343 insertions(+), 128 deletions(-)
Alan Stern (1):
USB: core: prevent malicious bNumInterfaces overflow
Alex Deucher (2):
drm/radeon/si: add dpm quirk for Oland drm/radeon: reinstate oland workaround for sclk
Alex Williamson (1):
PCI: Detach driver before procfs & sysfs teardown on device remove
Alexander Duyck (1):
macvlan: Only deliver one copy of the frame to the macvlan interface
Bart Van Assche (1):
target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd()
Bin Liu (1):
usb: musb: da8xx: fix babble condition handling
Bob Peterson (1):
GFS2: Take inode off order_write list when setting jdata flag
Brian Foster (1):
xfs: fix log block underflow during recovery cycle verification
Chandan Rajendra (1):
ext4: fix crash when a directory's i_size is too small
Christophe JAILLET (2):
video: fbdev: au1200fb: Release some resources if a memory allocation fails
video: fbdev: au1200fb: Return an error code if a memory allocation fails
Christophe Leroy (1):
powerpc/ipic: Fix status get and status clear
Dan Carpenter (1):
scsi: bfa: integer overflow in debugfs
Daniel Borkmann (1):
perf symbols: Fix symbols__fixup_end heuristic for corner cases
Daniel Lezcano (1):
thermal/drivers/step_wise: Fix temperature regulation misbehavior
David Howells (6):
KEYS: Don't permit request_key() to construct a new keyring
afs: Fix missing put_page()
afs: Flush outstanding writes when an fd is closed
afs: Fix the maths in afs_fs_store_data()
afs: Fix page leak in afs_write_begin()
afs: Fix afs_kill_pages()
David Jeffery (1):
Don't leak a key reference if request_key() tries to use a revoked keyring
David Kozub (1):
USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID
Dmitry Torokhov (1):
Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list
Doug Berger (3):
net: bcmgenet: correct the RBUF_OVFL_CNT and RBUF_ERR_CNT MIB values
net: bcmgenet: correct MIB access of UniMAC RUNT counters
net: bcmgenet: Power up the internal PHY before probing the MII
Eric Biggers (2):
crypto: hmac - require that the underlying hash algorithm is unkeyed
crypto: salsa20 - fix blkcipher_walk API usage
Gao Feng (1):
ppp: Destroy the mutex when cleanup
Geert Uytterhoeven (1):
fbdev: controlfb: Add missing modes to fix out of bounds access
Greg Kroah-Hartman (1):
Linux 3.18.89
Ilan peer (1):
mac80211: Fix addition of mesh configuration element
Jan Kara (2):
mm: Handle 0 flags in _calc_vm_trans() macro
udf: Avoid overflow when session starts at large offset
Javier Martinez Canillas (1):
usb: phy: isp1301: Add OF device ID table
Jiang Yi (1):
target/file: Do not return error for UNMAP if length is zero
Johan Hovold (1):
net: wimax/i2400m: fix NULL-deref at probe
Kurt Garloff (1):
scsi: scsi_devinfo: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry
Ladislav Michl (1):
video: udlfb: Fix read EDID timeout
Liang Chen (1):
bcache: explicitly destroy mutex while exiting
Linus Walleij (1):
pinctrl: adi2: Fix Kconfig build problem
Marc Dionne (3):
afs: Populate group ID from vnode status
afs: Adjust mode bits processing
afs: Populate and use client modification time
Mathias Nyman (1):
xhci: Don't add a virt_dev to the devs array before it's fully allocated
Matthias Kaehlcke (1):
dmaengine: Fix array index out of bounds warning in __get_unmap_pool()
Miaoqing Pan (1):
ath9k: fix tx99 potential info leak
Michał Mirosław (1):
clk: tegra: Fix cclk_lp divisor register
Mike Christie (1):
target: Use system workqueue for ALUA transitions
NeilBrown (4):
autofs: fix careless error in recent commit
NFSD: fix nfsd_minorversion(.., NFSD_AVAIL)
NFSD: fix nfsd_reset_versions for NFSv4.
raid5: Set R5_Expanded on parity devices as well as data.
Olga Kornievskaia (1):
NFSv4.1 respect server's max size in CREATE_SESSION
Qiang (1):
PCI/PME: Handle invalid data when reading Root Status
Shriya (1):
powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo
Shuah Khan (1):
usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer
Stafford Horne (1):
openrisc: fix issue handling 8 byte get_user calls
Steven Rostedt (VMware) (1):
sched/deadline: Use deadline instead of period when calculating overflow
Suzuki K Poulose (1):
arm-ccn: perf: Prevent module unload while PMU is in use
Vlad Yasevich (1):
net: Resend IGMP memberships upon peer notification.
William A. Kennington III (1):
powerpc/opal: Fix EBUSY bug in acquiring tokens
Zygo Blaxell (1):
btrfs: add missing memset while reading compressed inline extents
nixiaoming (1):
tty fix oops when rmmod 8250
tang.junhui (1):
bcache: fix wrong cache_misses statistics
tangwenji (2):
iscsi-target: fix memory leak in lio_target_tiqn_addtpg() target:fix condition return in core_pr_dump_initiator_port()
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 88 +SUBLEVEL = 89 EXTRAVERSION = NAME = Diseased Newt
arch/blackfin/Kconfig +5 -2
@@ -318,11 +318,14 @@ config BF53x config GPIO_ADI def_bool y + depends on !PINCTRL depends on (BF51x || BF52x || BF53x || BF538 || BF539 || BF561) -config PINCTRL +config PINCTRL_BLACKFIN_ADI2 def_bool y - depends on BF54x || BF60x + depends on (BF54x || BF60x) + select PINCTRL + select PINCTRL_ADI2 config MEM_MT48LC64M4A2FB_7E bool
arch/blackfin/Kconfig.debug +1 -0
@@ -17,6 +17,7 @@ config DEBUG_VERBOSE config DEBUG_MMRS tristate "Generate Blackfin MMR tree" + depends on !PINCTRL select DEBUG_FS help Create a tree of Blackfin MMRs via the debugfs tree. If
arch/openrisc/include/asm/uaccess.h +1 -1
@@ -215,7 +215,7 @@ do { \case 1 :__get_user_asm (x, ptr, retval,"l.lbz" );break ; \case 2 :__get_user_asm (x, ptr, retval,"l.lhz" );break ; \case 4 :__get_user_asm (x, ptr, retval,"l.lwz" );break ; \ -case 8 :__get_user_asm2 (x, ptr, retval); \ +case 8 :__get_user_asm2 (x, ptr, retval);break ; \default : (x) =__get_user_bad (); \ } \ }while (0 )
arch/powerpc/platforms/powernv/opal-async.c +3 -3
@@ -39,18 +39,18 @@ int __opal_async_get_token(void)int token;spin_lock_irqsave (&opal_async_comp_lock, flags); - token =find_first_bit (opal_async_complete_map, opal_max_async_tokens); + token =find_first_zero_bit (opal_async_token_map, opal_max_async_tokens);if (token >= opal_max_async_tokens) { token = -EBUSY ; goto out; } -if (__test_and_set_bit (token, opal_async_token_map)) { +if (!__test_and_clear_bit (token, opal_async_complete_map)) { token = -EBUSY ; goto out; } -__clear_bit (token, opal_async_complete_map); +__set_bit (token, opal_async_token_map); out:spin_unlock_irqrestore (&opal_async_comp_lock, flags);
arch/powerpc/platforms/powernv/setup.c +1 -1
@@ -319,7 +319,7 @@ static unsigned long pnv_get_proc_freq(unsigned int cpu) {unsigned long ret_freq; - ret_freq =cpufreq_quick_get (cpu) *1000ul ; + ret_freq =cpufreq_get (cpu) *1000ul ;/* * If the backend cpufreq driver does not exist,
arch/powerpc/sysdev/ipic.c +2 -2
@@ -844,12 +844,12 @@ void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq)u32 ipic_get_mcp_status (void ) { -return ipic_read (primary_ipic->regs,IPIC_SERMR ); +return ipic_read (primary_ipic->regs,IPIC_SERSR ); }void ipic_clear_mcp_status (u32 mask) { -ipic_write (primary_ipic->regs,IPIC_SERMR , mask); +ipic_write (primary_ipic->regs,IPIC_SERSR , mask); }/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
arch/x86/crypto/salsa20_glue.c +0 -7
@@ -59,13 +59,6 @@ static int encrypt(struct blkcipher_desc *desc,salsa20_ivsetup (ctx, walk.iv); -if (likely (walk.nbytes == nbytes)) - { -salsa20_encrypt_bytes (ctx, walk.src.virt.addr, - walk.dst.virt.addr, nbytes); -return blkcipher_walk_done (desc, &walk,0 ); - } -while (walk.nbytes >=64 ) { salsa20_encrypt_bytes(ctx, walk.src.virt.addr, walk.dst.virt.addr,
crypto/hmac.c +5 -1
@@ -194,11 +194,15 @@ static int hmac_create(struct crypto_template *tmpl, struct rtattr **tb) salg =shash_attr_alg (tb[1 ],0 ,0 );if (IS_ERR (salg))return PTR_ERR (salg); + alg = &salg->base; +/* The underlying hash algorithm must be unkeyed */ err = -EINVAL ; +if (crypto_shash_alg_has_setkey (salg)) + goto out_put_alg; + ds = salg->digestsize; ss = salg->statesize; - alg = &salg->base;if (ds > alg->cra_blocksize || ss < alg->cra_blocksize) goto out_put_alg;
crypto/salsa20_generic.c +0 -7
@@ -188,13 +188,6 @@ static int encrypt(struct blkcipher_desc *desc,salsa20_ivsetup (ctx, walk.iv); -if (likely (walk.nbytes == nbytes)) - { -salsa20_encrypt_bytes (ctx, walk.dst.virt.addr, - walk.src.virt.addr, nbytes); -return blkcipher_walk_done (desc, &walk,0 ); - } -while (walk.nbytes >=64 ) { salsa20_encrypt_bytes(ctx, walk.dst.virt.addr, walk.src.virt.addr,
crypto/shash.c +3 -2
@@ -24,11 +24,12 @@static const struct crypto_type crypto_shash_type; -static int shash_no_setkey (struct crypto_shash *tfm,const u8 *key, -unsigned int keylen) +int shash_no_setkey (struct crypto_shash *tfm,const u8 *key, +unsigned int keylen) {return -ENOSYS ; } +EXPORT_SYMBOL_GPL (shash_no_setkey);static int shash_setkey_unaligned (struct crypto_shash *tfm,const u8 *key,unsigned int keylen)
drivers/bus/arm-ccn.c +1 -0
@@ -1157,6 +1157,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)/* Perf driver registration */ ccn->dt.pmu = (struct pmu ) { + .module =THIS_MODULE , .attr_groups = arm_ccn_pmu_attr_groups, .task_ctx_nr = perf_invalid_context, .event_init = arm_ccn_pmu_event_init,
drivers/clk/tegra/clk-tegra30.c +1 -1
@@ -1063,7 +1063,7 @@ static void __init tegra30_super_clk_init(void)* U71 divider of cclk_lp. */ clk =tegra_clk_register_divider ("pll_p_out3_cclklp" ,"pll_p_out3" , - clk_base +SUPER_CCLKG_DIVIDER ,0 , + clk_base +SUPER_CCLKLP_DIVIDER ,0 ,TEGRA_DIVIDER_INT ,16 ,8 ,1 ,NULL );clk_register_clkdev (clk,"pll_p_out3_cclklp" ,NULL );
drivers/dma/dmaengine.c +2 -0
@@ -976,12 +976,14 @@ static struct dmaengine_unmap_pool *__get_unmap_pool(int nr)switch (order) { case 0 ... 1:return &unmap_pool[0 ]; +#if IS_ENABLED (CONFIG_DMA_ENGINE_RAID ) case 2 ... 4:return &unmap_pool[1 ]; case 5 ... 7:return &unmap_pool[2 ];case 8 :return &unmap_pool[3 ]; +#endif default :BUG ();return NULL ;
drivers/gpu/drm/radeon/si_dpm.c +10 -0
@@ -2988,6 +2988,16 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev, max_sclk =75000 ; max_mclk =80000 ; } + }else if (rdev->family ==CHIP_OLAND ) { +if ((rdev->pdev->revision ==0xC7 ) || + (rdev->pdev->revision ==0x80 ) || + (rdev->pdev->revision ==0x81 ) || + (rdev->pdev->revision ==0x83 ) || + (rdev->pdev->revision ==0x87 ) || + (rdev->pdev->device ==0x6604 ) || + (rdev->pdev->device ==0x6605 )) { + max_sclk =75000 ; + } }/* Apply dpm quirks */ while (p && p->chip_device !=0 ) {
drivers/input/serio/i8042-x86ia64io.h +7 -0
@@ -514,6 +514,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "IC4I"), }, }, + { + /* TUXEDO BU1406 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Notebook"), + DMI_MATCH(DMI_PRODUCT_NAME, "N24_25BU"), + }, + }, { } };
drivers/md/bcache/request.c +5 -1
@@ -464,6 +464,7 @@ struct search { unsigned recoverable:1; unsigned write:1; unsigned read_dirty_data:1; + unsigned cache_missed:1;unsigned long start_time;
@@ -651,6 +652,7 @@ static inline struct search *search_alloc(struct bio *bio, s->orig_bio = bio; s->cache_miss =NULL ; + s->cache_missed =0 ; s->d = d; s->recoverable =1 ; s->write = (bio->bi_rw &REQ_WRITE ) !=0 ;
@@ -774,7 +776,7 @@ static void cached_dev_read_done_bh(struct closure *cl) struct cached_dev *dc = container_of(s->d, struct cached_dev, disk);bch_mark_cache_accounting (s->iop.c, s->d, - !s->cache_miss, s->iop.bypass); + !s->cache_missed, s->iop.bypass);trace_bcache_read (s->orig_bio, !s->cache_miss, s->iop.bypass);if (s->iop.error)
@@ -793,6 +795,8 @@ static int cached_dev_cache_miss(struct btree *b, struct search *s, struct cached_dev *dc = container_of(s->d, struct cached_dev, disk);struct bio *miss, *cache_bio; + s->cache_missed =1 ; +if (s->cache_miss || s->iop.bypass) { miss =bio_next_split (bio, sectors,GFP_NOIO , s->d->bio_split); ret = miss == bio ?MAP_DONE :MAP_CONTINUE ;
drivers/md/bcache/super.c +4 -2
@@ -2120,6 +2120,7 @@ static void bcache_exit(void)if (bcache_major)unregister_blkdev (bcache_major,"bcache" );unregister_reboot_notifier (&reboot); +mutex_destroy (&bch_register_lock); }static int __init bcache_init (void )
@@ -2138,14 +2139,15 @@ static int __init bcache_init(void) bcache_major =register_blkdev (0 ,"bcache" );if (bcache_major <0 ) {unregister_reboot_notifier (&reboot); +mutex_destroy (&bch_register_lock);return bcache_major; }if (!(bcache_wq =create_workqueue ("bcache" )) || !(bcache_kobj =kobject_create_and_add ("bcache" , fs_kobj)) || -sysfs_create_files (bcache_kobj, files) ||bch_request_init () || -bch_debug_init (bcache_kobj)) +bch_debug_init (bcache_kobj) || +sysfs_create_files (bcache_kobj, files)) goto err;return 0 ;
drivers/md/raid5.c +4 -1
@@ -1454,8 +1454,11 @@ static void ops_complete_reconstruct(void *stripe_head_ref)struct r5dev *dev = &sh->dev[i];if (dev->written || i == pd_idx || i == qd_idx) { -if (!discard && !test_bit (R5_SkipCopy, &dev->flags)) +if (!discard && !test_bit (R5_SkipCopy, &dev->flags)) {set_bit (R5_UPTODATE , &dev->flags); +if (test_bit (STRIPE_EXPAND_READY , &sh->state)) +set_bit (R5_Expanded, &dev->flags); + }if (fua)set_bit (R5_WantFUA, &dev->flags);if (sync)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +68 -11
120 lines not on this page · raw message
drivers/net/ethernet/broadcom/genet/bcmgenet.h +7 -3
@@ -1,5 +1,5 @@/* -* Copyright (c) 2014 Broadcom Corporation +* Copyright (c) 2014-2017 Broadcom * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -196,7 +196,9 @@ struct bcmgenet_mib_counters {#define MDIO_REG_SHIFT 16#define MDIO_REG_MASK 0x1F -#define UMAC_RBUF_OVFL_CNT 0x61C +#define UMAC_RBUF_OVFL_CNT_V1 0x61C +#define RBUF_OVFL_CNT_V2 0x80 +#define RBUF_OVFL_CNT_V3PLUS 0x94#define UMAC_MPD_CTRL 0x620#define MPD_EN (1 << 0)
@@ -206,7 +208,9 @@ struct bcmgenet_mib_counters {#define UMAC_MPD_PW_MS 0x624#define UMAC_MPD_PW_LS 0x628 -#define UMAC_RBUF_ERR_CNT 0x634 +#define UMAC_RBUF_ERR_CNT_V1 0x634 +#define RBUF_ERR_CNT_V2 0x84 +#define RBUF_ERR_CNT_V3PLUS 0x98#define UMAC_MDF_ERR_CNT 0x638#define UMAC_MDF_CTRL 0x650#define UMAC_MDF_ADDR 0x654
drivers/net/macvlan.c +1 -1
@@ -440,7 +440,7 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) struct macvlan_dev, list); else vlan =macvlan_hash_lookup (port, eth->h_dest); -if (vlan ==NULL ) +if (!vlan || vlan->mode ==MACVLAN_MODE_SOURCE )return RX_HANDLER_PASS ; dev = vlan->dev;
drivers/net/ppp/ppp_generic.c +1 -0
@@ -916,6 +916,7 @@ static __net_exit void ppp_exit_net(struct net *net) {struct ppp_net *pn =net_generic (net, ppp_net_id); +mutex_destroy (&pn->all_ppp_mutex);idr_destroy (&pn->units_idr); }
drivers/net/wimax/i2400m/usb.c +3 -0
@@ -467,6 +467,9 @@ int i2400mu_probe(struct usb_interface *iface,struct i2400mu *i2400mu;struct usb_device *usb_dev =interface_to_usbdev (iface); +if (iface->cur_altsetting->desc.bNumEndpoints <4 ) +return -ENODEV ; +if (usb_dev->speed !=USB_SPEED_HIGH )dev_err (dev,"device not connected as high speed\n" );
drivers/net/wireless/ath/ath9k/tx99.c +5 -0
@@ -180,6 +180,9 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf,ssize_t len;int r; +if (count <1 ) +return -EINVAL ; +if (sc->cur_chan->nvifs >1 )return -EOPNOTSUPP ;
@@ -187,6 +190,8 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf,if (copy_from_user (buf, user_buf, len))return -EFAULT ; + buf[len] ='\0' ; +if (strtobool (buf, &start))return -EINVAL ;
drivers/pci/pcie/pme.c +4 -1
@@ -233,6 +233,9 @@ static void pcie_pme_work_fn(struct work_struct *work)break ;pcie_capability_read_dword (port,PCI_EXP_RTSTA , &rtsta); +if (rtsta == (u32 ) ~0 ) +break ; +if (rtsta &PCI_EXP_RTSTA_PME ) {/* * Clear PME status of the port. If there are other
@@ -280,7 +283,7 @@ static irqreturn_t pcie_pme_irq(int irq, void *context)spin_lock_irqsave (&data->lock, flags);pcie_capability_read_dword (port,PCI_EXP_RTSTA , &rtsta); -if (!(rtsta &PCI_EXP_RTSTA_PME )) { +if (rtsta == (u32 ) ~0 || !(rtsta &PCI_EXP_RTSTA_PME )) {spin_unlock_irqrestore (&data->lock, flags);return IRQ_NONE ; }
drivers/pci/remove.c +1 -1
@@ -20,9 +20,9 @@ static void pci_stop_dev(struct pci_dev *dev)pci_pme_active (dev, false);if (dev->is_added) { +device_release_driver (&dev->dev);pci_proc_detach_device (dev);pci_remove_sysfs_dev_files (dev); -device_release_driver (&dev->dev); dev->is_added =0 ; }
drivers/pinctrl/Kconfig +2 -1
@@ -28,7 +28,8 @@ config DEBUG_PINCTRL config PINCTRL_ADI2 bool "ADI pin controller driver" - depends on BLACKFIN + depends on (BF54x || BF60x) + depends on !GPIO_ADI select PINMUX select IRQ_DOMAIN help
drivers/scsi/bfa/bfad_debugfs.c +3 -2
@@ -254,7 +254,8 @@ bfad_debugfs_write_regrd(struct file *file, const char __user *buf,struct bfad_s *bfad = port->bfad;struct bfa_s *bfa = &bfad->bfa;struct bfa_ioc_s *ioc = &bfa->ioc; -int addr, len, rc, i; +int addr, rc, i; +u32 len;u32 *regbuf;void __iomem *rb, *reg_addr;unsigned long flags;
@@ -274,7 +275,7 @@ bfad_debugfs_write_regrd(struct file *file, const char __user *buf, } rc =sscanf (kern_buf,"%x:%x" , &addr, &len); -if (rc <2 ) { +if (rc <2 || len > (UINT_MAX >>2 )) {printk (KERN_INFO "bfad[%d]: %s failed to read user buf\n" , bfad->inst_no, __func__);
drivers/scsi/scsi_devinfo.c +1 -1
@@ -160,7 +160,7 @@ static struct { {"DGC", "RAID", NULL, BLIST_SPARSELUN}, /* Dell PV 650F, storage on LUN 0 */ {"DGC", "DISK", NULL, BLIST_SPARSELUN}, /* Dell PV 650F, no storage on LUN 0 */ {"EMC", "Invista", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, - {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_FORCELUN}, + {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_REPORTLUN2}, {"EMULEX", "MD21/S2 ESDI", NULL, BLIST_SINGLELUN}, {"easyRAID", "16P", NULL, BLIST_NOREPORTLUN}, {"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN},
drivers/target/iscsi/iscsi_target.c +2 -1
@@ -674,6 +674,7 @@ static int iscsit_add_reject_from_cmd( unsigned char *buf) {struct iscsi_conn *conn; +const bool do_put = cmd->se_cmd.se_tfo !=NULL ;if (!cmd->conn) { pr_err("cmd->conn is NULL for ITT: 0x%08x\n",
@@ -704,7 +705,7 @@ static int iscsit_add_reject_from_cmd(* Perform the kref_put now if se_cmd has already been setup by * scsit_setup_scsi_cmd() */ -if (cmd->se_cmd.se_tfo !=NULL ) { +if (do_put) {pr_debug ("iscsi reject: calling target_put_sess_cmd >>>>>>\n" );target_put_sess_cmd (&cmd->se_cmd); }
drivers/target/iscsi/iscsi_target_configfs.c +2 -1
@@ -1458,7 +1458,7 @@ static struct se_portal_group *lio_target_tiqn_addtpg( wwn, &tpg->tpg_se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);if (ret <0 ) -return NULL ; + goto free_out; ret =iscsit_tpg_add_portal_group (tiqn, tpg);if (ret !=0 )
@@ -1470,6 +1470,7 @@ static struct se_portal_group *lio_target_tiqn_addtpg(return &tpg->tpg_se_tpg; out:core_tpg_deregister (&tpg->tpg_se_tpg); +free_out:kfree (tpg);return NULL ; }
drivers/target/target_core_alua.c +3 -5
@@ -1126,13 +1126,11 @@ static int core_alua_do_transition_tg_pt(unsigned long transition_tmo; transition_tmo = tg_pt_gp->tg_pt_gp_implicit_trans_secs *HZ ; -queue_delayed_work (tg_pt_gp->tg_pt_gp_dev->tmr_wq, - &tg_pt_gp->tg_pt_gp_transition_work, - transition_tmo); +schedule_delayed_work (&tg_pt_gp->tg_pt_gp_transition_work, + transition_tmo); }else { tg_pt_gp->tg_pt_gp_transition_complete = &wait; -queue_delayed_work (tg_pt_gp->tg_pt_gp_dev->tmr_wq, - &tg_pt_gp->tg_pt_gp_transition_work,0 ); +schedule_delayed_work (&tg_pt_gp->tg_pt_gp_transition_work,0 );wait_for_completion (&wait); tg_pt_gp->tg_pt_gp_transition_complete =NULL ; }
drivers/target/target_core_file.c +4 -0
@@ -592,6 +592,10 @@ fd_do_unmap(struct se_cmd *cmd, void *priv, sector_t lba, sector_t nolb)struct inode *inode = file->f_mapping->host;int ret; +if (!nolb) { +return 0 ; + } +if (cmd->se_dev->dev_attrib.pi_prot_type) { ret =fd_do_prot_unmap (cmd, lba, nolb);if (ret)
drivers/target/target_core_pr.c +3 -1
@@ -58,8 +58,10 @@ void core_pr_dump_initiator_port( char *buf, u32 size) { -if (!pr_reg->isid_present_at_reg) +if (!pr_reg->isid_present_at_reg) { buf[0 ] ='\0' ; +return ; + }snprintf (buf, size,",i,0x%s" , pr_reg->pr_reg_isid); }
drivers/thermal/step_wise.c +6 -5
@@ -31,8 +31,7 @@* If the temperature is higher than a trip point, * a. if the trend is THERMAL_TREND_RAISING, use higher cooling * state for this trip point -* b. if the trend is THERMAL_TREND_DROPPING, use lower cooling -* state for this trip point +* b. if the trend is THERMAL_TREND_DROPPING, do nothing * c. if the trend is THERMAL_TREND_RAISE_FULL, use upper limit * for this trip point * d. if the trend is THERMAL_TREND_DROP_FULL, use lower limit
@@ -94,9 +93,11 @@ static unsigned long get_target_state(struct thermal_instance *instance,if (!throttle) next_target =THERMAL_NO_TARGET ; }else { - next_target = cur_state -1 ; -if (next_target > instance->upper) - next_target = instance->upper; +if (!throttle) { + next_target = cur_state -1 ; +if (next_target > instance->upper) + next_target = instance->upper; + } }break ;case THERMAL_TREND_DROP_FULL :
drivers/usb/core/config.c +3 -1
@@ -450,6 +450,9 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,unsigned iad_num =0 ;memcpy (&config->desc, buffer,USB_DT_CONFIG_SIZE ); + nintf = nintf_orig = config->desc.bNumInterfaces; + config->desc.bNumInterfaces =0 ;// Adjusted later +if (config->desc.bDescriptorType !=USB_DT_CONFIG || config->desc.bLength <USB_DT_CONFIG_SIZE || config->desc.bLength > size) {
@@ -463,7 +466,6 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx, buffer += config->desc.bLength; size -= config->desc.bLength; - nintf = nintf_orig = config->desc.bNumInterfaces;if (nintf >USB_MAXINTERFACES ) { dev_warn(ddev, "config %d has too many interfaces: %d, " "using maximum allowed: %d\n",
drivers/usb/host/xhci-mem.c +11 -4
@@ -978,10 +978,9 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,return 0 ; } - xhci->devs[slot_id] =kzalloc (sizeof (*xhci->devs[slot_id]), flags); -if (!xhci->devs[slot_id]) + dev =kzalloc (sizeof (*dev), flags); +if (!dev)return 0 ; - dev = xhci->devs[slot_id];/* Allocate the (output) device context that will be used in the HC. */ dev->out_ctx =xhci_alloc_container_ctx (xhci,XHCI_CTX_TYPE_DEVICE , flags);
@@ -1029,9 +1028,17 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, &xhci->dcbaa->dev_context_ptrs[slot_id], le64_to_cpu(xhci->dcbaa->dev_context_ptrs[slot_id])); + xhci->devs[slot_id] = dev; +return 1 ; fail: -xhci_free_virt_device (xhci, slot_id); + +if (dev->in_ctx) +xhci_free_container_ctx (xhci, dev->in_ctx); +if (dev->out_ctx) +xhci_free_container_ctx (xhci, dev->out_ctx); +kfree (dev); +return 0 ; }
drivers/usb/musb/da8xx.c +9 -1
@@ -350,7 +350,15 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci) musb->xceiv->state =OTG_STATE_A_WAIT_VRISE ;portstate (musb->port1_status |=USB_PORT_STAT_POWER );del_timer (&otg_workaround); - }else { + }else if (!(musb->int_usb &MUSB_INTR_BABBLE )){ +/* +* When babble condition happens, drvvbus interrupt +* is also generated. Ignore this drvvbus interrupt +* and let babble interrupt handler recovers the +* controller; otherwise, the host-mode flag is lost +* due to the MUSB_DEV_MODE() call below and babble +* recovery logic will not called. +*/ musb->is_active =0 ;MUSB_DEV_MODE (musb); otg->default_a =0 ;
drivers/usb/phy/phy-isp1301.c +7 -0
@@ -32,6 +32,12 @@ static const struct i2c_device_id isp1301_id[] = { { } }; +static const struct of_device_id isp1301_of_match[] = { + {.compatible ="nxp,isp1301" }, + { }, +}; +MODULE_DEVICE_TABLE (of, isp1301_of_match); +static struct i2c_client *isp1301_i2c_client;static int __isp1301_write (struct isp1301 *isp,u8 reg,u8 value,u8 clear)
@@ -129,6 +135,7 @@ static int isp1301_remove(struct i2c_client *client)static struct i2c_driver isp1301_driver = { .driver = { .name =DRV_NAME , + .of_match_table =of_match_ptr (isp1301_of_match), }, .probe = isp1301_probe, .remove = isp1301_remove,
drivers/usb/storage/unusual_devs.h +7 -0
@@ -2131,6 +2131,13 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), +/* Reported by David Kozub <[email protected]> */ +UNUSUAL_DEV (0x152d ,0x0578 ,0x0000 ,0x9999 , +"JMicron" , +"JMS567" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_BROKEN_FUA), +/* * Patch by Constantin Baranov <[email protected]> * Report by Andreas Koenecke.
drivers/usb/storage/unusual_uas.h +7 -0
@@ -139,6 +139,13 @@ UNUSUAL_DEV(0x174c, 0x5106, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_UAS), +/* Reported-by: David Kozub <[email protected]> */ +UNUSUAL_DEV (0x152d ,0x0578 ,0x0000 ,0x9999 , +"JMicron" , +"JMS567" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_BROKEN_FUA ), +/* Reported-by: Hans de Goede <[email protected]> */ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, "VIA",
drivers/usb/usbip/stub_tx.c +7 -0
@@ -178,6 +178,13 @@ static int stub_send_ret_submit(struct stub_device *sdev)memset (&pdu_header,0 ,sizeof (pdu_header));memset (&msg,0 ,sizeof (msg)); +if (urb->actual_length >0 && !urb->transfer_buffer) { +dev_err (&sdev->udev->dev, +"urb: actual_length %d transfer_buffer null\n" , + urb->actual_length); +return -1 ; + } +if (usb_pipetype (urb->pipe) ==PIPE_ISOCHRONOUS ) iovnum =2 + urb->number_of_packets;else
drivers/video/fbdev/au1200fb.c +5 -2
@@ -1680,8 +1680,10 @@ static int au1200fb_drv_probe(struct platform_device *dev) fbi =framebuffer_alloc (sizeof (struct au1200fb_device ), &dev->dev); -if (!fbi) +if (!fbi) { + ret = -ENOMEM ; goto failed; + } _au1200fb_infos[plane] = fbi; fbdev = fbi->par;
@@ -1699,7 +1701,8 @@ static int au1200fb_drv_probe(struct platform_device *dev)if (!fbdev->fb_mem) {print_err ("fail to allocate frambuffer (size: %dK))" , fbdev->fb_len /1024 ); -return -ENOMEM ; + ret = -ENOMEM ; + goto failed; }/*
drivers/video/fbdev/controlfb.h +2 -0
@@ -141,5 +141,7 @@ static struct max_cmodes control_mac_modes[] = { {{ 1, 2}}, /* 1152x870, 75Hz */ {{ 0, 1}}, /* 1280x960, 75Hz */ {{ 0, 1}}, /* 1280x1024, 75Hz */ + {{ 1, 2}}, /* 1152x768, 60Hz */ + {{ 0, 1}}, /* 1600x1024, 60Hz */ };
drivers/video/fbdev/udlfb.c +5 -5
@@ -769,11 +769,11 @@ static int dlfb_get_edid(struct dlfb_data *dev, char *edid, int len)for (i =0 ; i < len; i++) { ret =usb_control_msg (dev->udev, -usb_rcvctrlpipe (dev->udev,0 ), (0x02 ), - (0x80 | (0x02 <<5 )), i <<8 ,0xA1 , rbuf,2 , -HZ ); -if (ret <1 ) { -pr_err ("Read EDID byte %d failed err %x\n" , i, ret); +usb_rcvctrlpipe (dev->udev,0 ),0x02 , + (0x80 | (0x02 <<5 )), i <<8 ,0xA1 , + rbuf,2 ,USB_CTRL_GET_TIMEOUT ); +if (ret <2 ) { +pr_err ("Read EDID byte %d failed: %d\n" , i, ret); i--;break ; }
fs/afs/file.c +1 -0
@@ -29,6 +29,7 @@ static int afs_readpages(struct file *filp, struct address_space *mapping,const struct file_operations afs_file_operations = { .open = afs_open, + .flush = afs_flush, .release = afs_release, .llseek = generic_file_llseek, .read = new_sync_read,
fs/afs/fsclient.c +10 -10
@@ -105,7 +105,7 @@ static void xdr_decode_AFSFetchStatus(const __be32 **_bp, vnode->vfs_inode.i_mode = mode; } - vnode->vfs_inode.i_ctime.tv_sec = status->mtime_server; + vnode->vfs_inode.i_ctime.tv_sec = status->mtime_client; vnode->vfs_inode.i_mtime = vnode->vfs_inode.i_ctime; vnode->vfs_inode.i_atime = vnode->vfs_inode.i_ctime; vnode->vfs_inode.i_version = data_version;
@@ -703,8 +703,8 @@ int afs_fs_create(struct afs_server *server,memset (bp,0 , padsz); bp = (void *) bp + padsz; } - *bp++ =htonl (AFS_SET_MODE ); - *bp++ =0 ;/* mtime */ + *bp++ =htonl (AFS_SET_MODE |AFS_SET_MTIME ); + *bp++ =htonl (vnode->vfs_inode.i_mtime.tv_sec);/* mtime */ *bp++ =0 ;/* owner */ *bp++ =0 ;/* group */ *bp++ =htonl (mode &S_IALLUGO );/* unix mode */
@@ -981,8 +981,8 @@ int afs_fs_symlink(struct afs_server *server,memset (bp,0 , c_padsz); bp = (void *) bp + c_padsz; } - *bp++ =htonl (AFS_SET_MODE ); - *bp++ =0 ;/* mtime */ + *bp++ =htonl (AFS_SET_MODE |AFS_SET_MTIME ); + *bp++ =htonl (vnode->vfs_inode.i_mtime.tv_sec);/* mtime */ *bp++ =0 ;/* owner */ *bp++ =0 ;/* group */ *bp++ =htonl (S_IRWXUGO );/* unix mode */
@@ -1192,8 +1192,8 @@ static int afs_fs_store_data64(struct afs_server *server, *bp++ =htonl (vnode->fid.vnode); *bp++ =htonl (vnode->fid.unique); - *bp++ =0 ;/* mask */ - *bp++ =0 ;/* mtime */ + *bp++ =htonl (AFS_SET_MTIME );/* mask */ + *bp++ =htonl (vnode->vfs_inode.i_mtime.tv_sec);/* mtime */ *bp++ =0 ;/* owner */ *bp++ =0 ;/* group */ *bp++ =0 ;/* unix mode */
@@ -1225,7 +1225,7 @@ int afs_fs_store_data(struct afs_server *server, struct afs_writeback *wb,_enter (",%x,{%x:%u},," ,key_serial (wb->key), vnode->fid.vid, vnode->fid.vnode); - size = to - offset; + size = (loff_t )to - (loff_t )offset;if (first != last) size += (loff_t)(last - first) <<PAGE_SHIFT ; pos = (loff_t )first <<PAGE_SHIFT ;
@@ -1269,8 +1269,8 @@ int afs_fs_store_data(struct afs_server *server, struct afs_writeback *wb, *bp++ =htonl (vnode->fid.vnode); *bp++ =htonl (vnode->fid.unique); - *bp++ =0 ;/* mask */ - *bp++ =0 ;/* mtime */ + *bp++ =htonl (AFS_SET_MTIME );/* mask */ + *bp++ =htonl (vnode->vfs_inode.i_mtime.tv_sec);/* mtime */ *bp++ =0 ;/* owner */ *bp++ =0 ;/* group */ *bp++ =0 ;/* unix mode */
fs/afs/inode.c +2 -2
@@ -69,9 +69,9 @@ static int afs_inode_map_status(struct afs_vnode *vnode, struct key *key)set_nlink (inode, vnode->status.nlink); inode->i_uid = vnode->status.owner; - inode->i_gid =GLOBAL_ROOT_GID ; + inode->i_gid = vnode->status.group; inode->i_size = vnode->status.size; - inode->i_ctime.tv_sec = vnode->status.mtime_server; + inode->i_ctime.tv_sec = vnode->status.mtime_client; inode->i_ctime.tv_nsec =0 ; inode->i_atime = inode->i_mtime = inode->i_ctime; inode->i_blocks =0 ;
fs/afs/internal.h +1 -0
@@ -749,6 +749,7 @@ extern int afs_writepages(struct address_space *, struct writeback_control *);extern void afs_pages_written_back (struct afs_vnode *,struct afs_call *);extern ssize_t afs_file_write (struct kiocb *,struct iov_iter *);extern int afs_writeback_all (struct afs_vnode *); +extern int afs_flush (struct file *,fl_owner_t );extern int afs_fsync (struct file *,loff_t ,loff_t ,int );
fs/afs/security.c +6 -1
@@ -340,17 +340,22 @@ int afs_permission(struct inode *inode, int mask) }else {if (!(access &AFS_ACE_LOOKUP )) goto permission_denied; +if ((mask &MAY_EXEC ) && !(inode->i_mode &S_IXUSR )) + goto permission_denied;if (mask & (MAY_EXEC |MAY_READ )) {if (!(access &AFS_ACE_READ )) goto permission_denied; +if (!(inode->i_mode &S_IRUSR )) + goto permission_denied; }else if (mask &MAY_WRITE ) {if (!(access &AFS_ACE_WRITE )) goto permission_denied; +if (!(inode->i_mode &S_IWUSR )) + goto permission_denied; } }key_put (key); - ret =generic_permission (inode, mask);_leave (" = %d" , ret);return ret;
fs/afs/write.c +27 -5
@@ -149,12 +149,12 @@ int afs_write_begin(struct file *file, struct address_space *mapping,kfree (candidate);return -ENOMEM ; } - *pagep = page; -/* page won't leak in error case: it eventually gets cleaned off LRU */ if (!PageUptodate (page) && len !=PAGE_CACHE_SIZE ) { ret =afs_fill_page (vnode, key, index <<PAGE_CACHE_SHIFT , page);if (ret <0 ) { +unlock_page (page); +put_page (page);kfree (candidate);_leave (" = %d [prep]" , ret);return ret;
@@ -162,6 +162,9 @@ int afs_write_begin(struct file *file, struct address_space *mapping,SetPageUptodate (page); } +/* page won't leak in error case: it eventually gets cleaned off LRU */ + *pagep = page; + try_again:spin_lock (&vnode->writeback_lock);
@@ -297,10 +300,14 @@ static void afs_kill_pages(struct afs_vnode *vnode, bool error, ASSERTCMP(pv.nr, ==, count);for (loop =0 ; loop < count; loop++) { -ClearPageUptodate (pv.pages[loop]); +struct page *page = pv.pages[loop]; +ClearPageUptodate (page);if (error) -SetPageError (pv.pages[loop]); -end_page_writeback (pv.pages[loop]); +SetPageError (page); +if (PageWriteback (page)) +end_page_writeback (page); +if (page->index >= first) + first = page->index +1 ; }__pagevec_release (&pv);
@@ -504,6 +511,7 @@ static int afs_writepages_region(struct address_space *mapping,if (PageWriteback (page) || !PageDirty (page)) {unlock_page (page); +put_page (page);continue ; }
@@ -741,6 +749,20 @@ out:return ret; } +/* +* Flush out all outstanding writes on a file opened for writing when it is +* closed. +*/ +int afs_flush (struct file *file,fl_owner_t id) +{ +_enter ("" ); + +if ((file->f_mode &FMODE_WRITE ) ==0 ) +return 0 ; + +return vfs_fsync (file,0 ); +} +/* * notification that a previously read-only page is about to become writable * - if it returns an error, the caller will deliver a bus error signal
fs/autofs4/waitq.c +0 -1
@@ -174,7 +174,6 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,mutex_unlock (&sbi->wq_mutex); -if (autofs4_write (sbi, pipe, &pkt, pktsz))switch (ret =autofs4_write (sbi, pipe, &pkt, pktsz)) {case 0 :break ;
fs/btrfs/inode.c +14 -0
@@ -6325,6 +6325,20 @@ static noinline int uncompress_inline(struct btrfs_path *path, max_size = min_t(unsigned long, PAGE_CACHE_SIZE, max_size); ret =btrfs_decompress (compress_type, tmp, page, extent_offset, inline_size, max_size); + +/* +* decompression code contains a memset to fill in any space between the end +* of the uncompressed data and the end of max_size in case the decompressed +* data ends up shorter than ram_bytes. That doesn't cover the hole between +* the end of an inline extent and the beginning of the next block, so we +* cover that region here. +*/ + +if (max_size + pg_offset <PAGE_SIZE ) { +char *map =kmap (page); +memset (map + pg_offset + max_size,0 ,PAGE_SIZE - max_size - pg_offset); +kunmap (page); + }kfree (tmp);return ret; }
fs/ext4/namei.c +4 -0
@@ -1244,6 +1244,10 @@ static struct buffer_head * ext4_find_entry (struct inode *dir, "falling back\n")); } nblocks = dir->i_size >>EXT4_BLOCK_SIZE_BITS (sb); +if (!nblocks) { + ret =NULL ; + goto cleanup_and_exit; + } start =EXT4_I (dir)->i_dir_start_lookup;if (start >= nblocks) start =0 ;
fs/gfs2/file.c +3 -1
@@ -256,7 +256,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) goto out; }if ((flags ^ new_flags) &GFS2_DIF_JDATA ) { -if (flags &GFS2_DIF_JDATA ) +if (new_flags &GFS2_DIF_JDATA )gfs2_log_flush (sdp, ip->i_gl,NORMAL_FLUSH ); error =filemap_fdatawrite (inode->i_mapping);if (error)
@@ -264,6 +264,8 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) error =filemap_fdatawait (inode->i_mapping);if (error) goto out; +if (new_flags &GFS2_DIF_JDATA ) +gfs2_ordered_del_inode (ip); } error =gfs2_trans_begin (sdp,RES_DINODE ,0 );if (error)
fs/nfs/nfs4client.c +2 -2
@@ -894,9 +894,9 @@ static void nfs4_session_set_rwsize(struct nfs_server *server) server_resp_sz = sess->fc_attrs.max_resp_sz - nfs41_maxread_overhead; server_rqst_sz = sess->fc_attrs.max_rqst_sz - nfs41_maxwrite_overhead; -if (server->rsize > server_resp_sz) +if (!server->rsize || server->rsize > server_resp_sz) server->rsize = server_resp_sz; -if (server->wsize > server_rqst_sz) +if (!server->wsize || server->wsize > server_rqst_sz) server->wsize = server_rqst_sz;#endif /* CONFIG_NFS_V4_1 */ }
fs/nfsd/nfssvc.c +14 -16
@@ -150,7 +150,8 @@ int nfsd_vers(int vers, enum vers_op change)int nfsd_minorversion (u32 minorversion,enum vers_op change) { -if (minorversion >NFSD_SUPPORTED_MINOR_VERSION ) +if (minorversion >NFSD_SUPPORTED_MINOR_VERSION && + change !=NFSD_AVAIL )return -1 ;switch (change) {case NFSD_SET :
@@ -328,23 +329,20 @@ static void nfsd_last_thread(struct svc_serv *serv, struct net *net)void nfsd_reset_versions (void ) { -int found_one =0 ;int i; -for (i =NFSD_MINVERS ; i <NFSD_NRVERS ; i++) { -if (nfsd_program.pg_vers[i]) - found_one =1 ; - } - -if (!found_one) { -for (i =NFSD_MINVERS ; i <NFSD_NRVERS ; i++) - nfsd_program.pg_vers[i] = nfsd_version[i]; -#if defined(CONFIG_NFSD_V2_ACL ) || defined(CONFIG_NFSD_V3_ACL ) -for (i =NFSD_ACL_MINVERS ; i <NFSD_ACL_NRVERS ; i++) - nfsd_acl_program.pg_vers[i] = - nfsd_acl_version[i]; -#endif - } +for (i =0 ; i <NFSD_NRVERS ; i++) +if (nfsd_vers (i,NFSD_TEST )) +return ; + +for (i =0 ; i <NFSD_NRVERS ; i++) +if (i !=4 ) +nfsd_vers (i,NFSD_SET ); +else { +int minor =0 ; +while (nfsd_minorversion (minor,NFSD_SET ) >=0 ) + minor++; + } }/*
fs/proc/proc_tty.c +2 -1
@@ -14,6 +14,7 @@#include <linux/tty.h> #include <linux/seq_file.h> #include <linux/bitops.h> +#include "internal.h" /* * The /proc/tty directory inodes...
@@ -164,7 +165,7 @@ void proc_tty_unregister_driver(struct tty_driver *driver)if (!ent)return ; -remove_proc_entry (driver->driver_name, proc_tty_driver); +remove_proc_entry (ent->name, proc_tty_driver); driver->proc_entry =NULL ; }
fs/udf/super.c +1 -1
@@ -706,7 +706,7 @@ static loff_t udf_check_vsd(struct super_block *sb)else sectorsize = sb->s_blocksize; - sector += (sbi->s_session << sb->s_blocksize_bits); + sector += (((loff_t )sbi->s_session) << sb->s_blocksize_bits); udf_debug("Starting at sector %u (%ld byte sectors)\n", (unsigned int)(sector >> sb->s_blocksize_bits),
fs/xfs/xfs_log_recover.c +1 -1
@@ -740,7 +740,7 @@ xlog_find_head(* in the in-core log. The following number can be made tighter if * we actually look at the block size of the filesystem. */ - num_scan_bblks =XLOG_TOTAL_REC_SHIFT (log); + num_scan_bblks =min_t (int, log_bbnum,XLOG_TOTAL_REC_SHIFT (log));if (head_blk >= num_scan_bblks) {/* * We are guaranteed that the entire check can be performed
include/crypto/internal/hash.h +8 -0
@@ -83,6 +83,14 @@ int ahash_register_instance(struct crypto_template *tmpl, struct ahash_instance *inst);void ahash_free_instance (struct crypto_instance *inst); +int shash_no_setkey (struct crypto_shash *tfm,const u8 *key, +unsigned int keylen); + +static inline bool crypto_shash_alg_has_setkey (struct shash_alg *alg) +{ +return alg->setkey != shash_no_setkey; +} +int crypto_init_ahash_spawn (struct crypto_ahash_spawn *spawn,struct hash_alg_common *alg,struct crypto_instance *inst);
include/linux/mman.h +2 -1
@@ -63,8 +63,9 @@ static inline int arch_validate_prot(unsigned long prot)* ("bit1" and "bit2" must be single bits) */ #define _calc_vm_trans (x, bit1, bit2) \ + ((!(bit1) || !(bit2)) ? 0 : \ ((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \ - : ((x) & (bit1)) / ((bit1) / (bit2))) + : ((x) & (bit1)) / ((bit1) / (bit2))))/* * Combine the mmap "prot" argument into "vm_flags" used internally.
kernel/sched/deadline.c +4 -4
@@ -368,13 +368,13 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se,* * This function returns true if: * -* runtime / (deadline - t) > dl_runtime / dl_period , +* runtime / (deadline - t) > dl_runtime / dl_deadline , * * IOW we can't recycle current parameters. * -* Notice that the bandwidth check is done against the period. For +* Notice that the bandwidth check is done against the deadline. For * task with deadline equal to period this is the same of using -* dl_deadline instead of dl_period in the equation above. +* dl_period instead of dl_deadline in the equation above. */ static bool dl_entity_overflow (struct sched_dl_entity *dl_se,struct sched_dl_entity *pi_se,u64 t)
@@ -399,7 +399,7 @@ static bool dl_entity_overflow(struct sched_dl_entity *dl_se,* of anything below microseconds resolution is actually fiction * (but still we want to give the user that illusion >;). */ - left = (pi_se->dl_period >>DL_SCALE ) * (dl_se->runtime >>DL_SCALE ); + left = (pi_se->dl_deadline >>DL_SCALE ) * (dl_se->runtime >>DL_SCALE ); right = ((dl_se->deadline - t) >>DL_SCALE ) * (pi_se->dl_runtime >>DL_SCALE );
net/core/dev.c +1 -0
@@ -1248,6 +1248,7 @@ void netdev_notify_peers(struct net_device *dev) {rtnl_lock ();call_netdevice_notifiers (NETDEV_NOTIFY_PEERS , dev); +call_netdevice_notifiers (NETDEV_RESEND_IGMP , dev);rtnl_unlock (); }EXPORT_SYMBOL (netdev_notify_peers);
net/mac80211/mesh.c +0 -2
@@ -289,8 +289,6 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata,/* Mesh PS mode. See IEEE802.11-2012 8.4.2.100.8 */ *pos |= ifmsh->ps_peers_deep_sleep ?IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL :0x00 ; - *pos++ =0x00 ; -return 0 ; }
security/keys/request_key.c +4 -0
@@ -437,6 +437,7 @@ link_check_failed: link_prealloc_failed:mutex_unlock (&user->cons_lock); +key_put (key);kleave (" = %d [prelink]" , ret);return ret;
@@ -466,6 +467,9 @@ static struct key *construct_key_and_link(struct keyring_search_context *ctx,if (ret) goto error; +if (ctx->index_key.type == &key_type_keyring) +return ERR_PTR (-EPERM ); + user =key_user_lookup (current_fsuid ());if (!user) { ret = -ENOMEM ;
tools/perf/util/symbol.c +1 -1
@@ -191,7 +191,7 @@ void symbols__fixup_end(struct rb_root *symbols)/* Last entry */ if (curr->end == curr->start) - curr->end =roundup (curr->start,4096 ); + curr->end =roundup (curr->start,4096 ) +4096 ; }void __map_groups__fixup_end (struct map_groups *mg,enum map_type type)