Linux 4.14.214
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.214 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/powerpc/include/asm/bitops.h | 23 +++ arch/powerpc/sysdev/mpic_msgr.c | 2 arch/x86/entry/entry_64.S | 2 drivers/iio/imu/bmi160/bmi160_core.c | 13 +- drivers/iio/magnetometer/mag3110.c | 13 +- drivers/md/dm-verity-target.c | 12 +- drivers/md/raid10.c | 3 drivers/media/usb/dvb-usb/gp8psk.c | 2 drivers/misc/vmw_vmci/vmci_context.c | 2 drivers/net/wireless/marvell/mwifiex/join.c | 2 drivers/rtc/rtc-sun6i.c | 8 - drivers/s390/block/dasd_alias.c | 10 + drivers/usb/serial/digi_acceleport.c | 45 ++----- drivers/vfio/pci/vfio_pci.c | 3 fs/quota/quota_tree.c | 8 - fs/reiserfs/stree.c | 6 + include/linux/kdev_t.h | 22 +-- include/linux/memcontrol.h | 165 +++++++++++++++++----------- include/linux/of.h | 1 include/uapi/linux/const.h | 5 include/uapi/linux/ethtool.h | 2 include/uapi/linux/kernel.h | 9 - include/uapi/linux/lightnvm.h | 2 include/uapi/linux/mroute6.h | 2 include/uapi/linux/netfilter/x_tables.h | 2 include/uapi/linux/netlink.h | 2 include/uapi/linux/sysctl.h | 2 kernel/module.c | 6 - mm/memcontrol.c | 160 ++++++++++++--------------- sound/core/pcm_native.c | 9 + sound/core/seq/seq_queue.h | 8 - sound/pci/hda/patch_ca0132.c | 16 ++ sound/usb/pcm.c | 52 +++----- 34 files changed, 347 insertions(+), 274 deletions(-)
Alberto Aguirre (1):
ALSA: usb-audio: simplify set_sync_ep_implicit_fb_quirk
Anant Thazhemadam (1):
misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells()
Christophe Leroy (1):
powerpc/bitops: Fix possible undefined behaviour with fls() and fls64()
Dinghao Liu (1):
rtc: sun6i: Fix memleak in sun6i_rtc_clk_init
Eric Auger (1):
vfio/pci: Move dummy_resources_list init in vfio_pci_probe()
Greg Kroah-Hartman (1):
Linux 4.14.214
Hyeongseok Kim (1):
dm verity: skip verity work if I/O error when system is shutting down
Jan Beulich (1):
x86/entry/64: Add instruction suffix
Jan Kara (1):
quota: Don't overflow quota file offsets
Jessica Yu (1):
module: delay kobject uevent until after module init call
Johan Hovold (3):
ALSA: usb-audio: fix sync-ep altsetting sanity check
USB: serial: digi_acceleport: fix write-wakeup deadlocks
of: fix linker-section match-table corruption
Johannes Weiner (3):
mm: memcontrol: eliminate raw access to stat and event counters
mm: memcontrol: implement lruvec stat functions on top of each other
mm: memcontrol: fix excessive complexity in memory.stat reporting
Jonathan Cameron (2):
iio:imu:bmi160: Fix alignment and data leak issues iio:magnetometer:mag3110: Fix alignment and data leak issues.
Josh Poimboeuf (1):
kdev_t: always inline major/minor helper functions
Kevin Vigor (1):
md/raid10: initialize r10_bio->read_slot before use.
Mauro Carvalho Chehab (1):
media: gp8psk: initialize stats at power control logic
Miroslav Benes (1):
module: set MODULE_STATE_GOING state when a module fails to load
Petr Vorel (1):
uapi: move constants from <linux/kernel.h> to <linux/const.h>
Qinglang Miao (1):
powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()
Rustam Kovhaev (1):
reiserfs: add check for an invalid ih_entry_count
Stefan Haberland (1):
s390/dasd: fix hanging device offline processing
Takashi Iwai (3):
ALSA: hda/ca0132 - Fix work handling in delayed HP detection
ALSA: seq: Use bool for snd_seq_queue internal flags
ALSA: pcm: Clear the full allocated memory at hw_params
Zhang Xiaohui (1):
mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 213 +SUBLEVEL = 214 EXTRAVERSION = NAME = Petit Gorille
arch/powerpc/include/asm/bitops.h +21 -2
@@ -220,15 +220,34 @@ static __inline__ void __clear_bit_unlock(int nr, volatile unsigned long *addr)*/ static __inline__int fls (unsigned int x) { -return 32 -__builtin_clz (x); +int lz; + +if (__builtin_constant_p (x)) +return x ?32 -__builtin_clz (x) :0 ; + asm("cntlzw %0,%1" :"=r" (lz) :"r" (x)); +return 32 - lz; }#include <asm-generic/bitops/builtin-__fls.h> +/* +* 64-bit can do this using one cntlzd (count leading zeroes doubleword) +* instruction; for 32-bit we use the generic version, which does two +* 32-bit fls calls. +*/ +#ifdef CONFIG_PPC64 static __inline__int fls64 (__u64 x) { -return 64 -__builtin_clzll (x); +int lz; + +if (__builtin_constant_p (x)) +return x ?64 -__builtin_clzll (x) :0 ; + asm("cntlzd %0,%1" :"=r" (lz) :"r" (x)); +return 64 - lz; } +#else +#include <asm-generic/bitops/fls64.h> +#endif #ifdef CONFIG_PPC64 unsigned int __arch_hweight8 (unsigned int w);
arch/powerpc/sysdev/mpic_msgr.c +1 -1
@@ -196,7 +196,7 @@ static int mpic_msgr_probe(struct platform_device *dev)/* IO map the message register block. */ of_address_to_resource (np,0 , &rsrc); - msgr_block_addr =ioremap (rsrc.start,resource_size (&rsrc)); + msgr_block_addr =devm_ioremap (&dev->dev, rsrc.start,resource_size (&rsrc));if (!msgr_block_addr) {dev_err (&dev->dev,"Failed to iomap MPIC message registers" );return -EFAULT ;
arch/x86/entry/entry_64.S +1 -1
@@ -55,7 +55,7 @@ END(native_usergs_sysret64) .macro TRACE_IRQS_IRETQ #ifdef CONFIG_TRACE_IRQFLAGS - bt $9, EFLAGS(%rsp) /* interrupts off? */ + btl $9, EFLAGS(%rsp) /* interrupts off? */ jnc 1f TRACE_IRQS_ON 1:
drivers/iio/imu/bmi160/bmi160_core.c +9 -4
@@ -110,6 +110,13 @@ enum bmi160_sensor_type {struct bmi160_data {struct regmap *regmap; +/* +* Ensure natural alignment for timestamp if present. +* Max length needed: 2 * 3 channels + 4 bytes padding + 8 byte ts. +* If fewer channels are enabled, less space may be needed, as +* long as the timestamp is still aligned to 8 bytes. +*/ +__le16 buf[12 ]__aligned(8) ; };const struct regmap_config bmi160_regmap_config = {
@@ -385,8 +392,6 @@ static irqreturn_t bmi160_trigger_handler(int irq, void *p)struct iio_poll_func *pf = p;struct iio_dev *indio_dev = pf->indio_dev;struct bmi160_data *data =iio_priv (indio_dev); -__le16 buf[12 ]; -/* 2 sens x 3 axis x __le16 + 2 x __le16 pad + 4 x __le16 tstamp */ int i, ret, j =0 , base =BMI160_REG_DATA_MAGN_XOUT_L ;__le16 sample;
@@ -396,10 +401,10 @@ static irqreturn_t bmi160_trigger_handler(int irq, void *p) &sample, sizeof(sample));if (ret <0 ) goto done; - buf[j++] = sample; + data->buf[j++] = sample; } -iio_push_to_buffers_with_timestamp (indio_dev, buf, +iio_push_to_buffers_with_timestamp (indio_dev, data->buf,iio_get_time_ns (indio_dev)); done:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/magnetometer/mag3110.c +9 -4
@@ -52,6 +52,12 @@ struct mag3110_data {struct i2c_client *client;struct mutex lock;u8 ctrl_reg1; +/* Ensure natural alignment of timestamp */ +struct { +__be16 channels[3 ]; +u8 temperature; +s64 ts__aligned(8) ; + } scan; };static int mag3110_request (struct mag3110_data *data)
@@ -262,10 +268,9 @@ static irqreturn_t mag3110_trigger_handler(int irq, void *p)struct iio_poll_func *pf = p;struct iio_dev *indio_dev = pf->indio_dev;struct mag3110_data *data =iio_priv (indio_dev); -u8 buffer[16 ];/* 3 16-bit channels + 1 byte temp + padding + ts */ int ret; - ret =mag3110_read (data, (__be16 *) buffer); + ret =mag3110_read (data, data->scan.channels);if (ret <0 ) goto done;
@@ -274,10 +279,10 @@ static irqreturn_t mag3110_trigger_handler(int irq, void *p) MAG3110_DIE_TEMP);if (ret <0 ) goto done; - buffer[6 ] = ret; + data->scan.temperature = ret; } -iio_push_to_buffers_with_timestamp (indio_dev, buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan,iio_get_time_ns (indio_dev)); done:
drivers/md/dm-verity-target.c +11 -1
@@ -551,6 +551,15 @@ static int verity_verify_io(struct dm_verity_io *io)return 0 ; } +/* +* Skip verity work in response to I/O error when system is shutting down. +*/ +static inline bool verity_is_system_shutting_down (void ) +{ +return system_state ==SYSTEM_HALT || system_state ==SYSTEM_POWER_OFF + || system_state ==SYSTEM_RESTART ; +} +/* * End one "io" structure with a given error. */
@@ -578,7 +587,8 @@ static void verity_end_io(struct bio *bio) {struct dm_verity_io *io = bio->bi_private; -if (bio->bi_status && !verity_fec_is_enabled (io->v)) { +if (bio->bi_status && + (!verity_fec_is_enabled (io->v) ||verity_is_system_shutting_down ())) {verity_finish_io (io, bio->bi_status);return ; }
drivers/md/raid10.c +2 -1
@@ -1120,7 +1120,7 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio,struct md_rdev *err_rdev =NULL ;gfp_t gfp =GFP_NOIO ; -if (r10_bio->devs[slot].rdev) { +if (slot >=0 && r10_bio->devs[slot].rdev) {/* * This is an error retry, but we cannot * safely dereference the rdev in the r10_bio,
@@ -1513,6 +1513,7 @@ static void __make_request(struct mddev *mddev, struct bio *bio, int sectors) r10_bio->mddev = mddev; r10_bio->sector = bio->bi_iter.bi_sector; r10_bio->state =0 ; + r10_bio->read_slot =-1 ;memset (r10_bio->devs,0 ,sizeof (r10_bio->devs[0 ]) * conf->copies);if (bio_data_dir (bio) ==READ )
drivers/media/usb/dvb-usb/gp8psk.c +1 -1
@@ -185,7 +185,7 @@ static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d)static int gp8psk_power_ctrl (struct dvb_usb_device *d,int onoff) { -u8 status, buf; +u8 status =0 , buf;int gp_product_id =le16_to_cpu (d->udev->descriptor.idProduct);if (onoff) {
drivers/misc/vmw_vmci/vmci_context.c +1 -1
@@ -751,7 +751,7 @@ static int vmci_ctx_get_chkpt_doorbells(struct vmci_ctx *context,return VMCI_ERROR_MORE_DATA ; } - dbells =kmalloc (data_size,GFP_ATOMIC ); + dbells =kzalloc (data_size,GFP_ATOMIC );if (!dbells)return VMCI_ERROR_NO_MEM ;
drivers/net/wireless/marvell/mwifiex/join.c +2 -0
@@ -877,6 +877,8 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,memset (adhoc_start->ssid,0 ,IEEE80211_MAX_SSID_LEN ); +if (req_ssid->ssid_len >IEEE80211_MAX_SSID_LEN ) + req_ssid->ssid_len =IEEE80211_MAX_SSID_LEN ;memcpy (adhoc_start->ssid, req_ssid->ssid, req_ssid->ssid_len); mwifiex_dbg(adapter, INFO, "info: ADHOC_S_CMD: SSID = %s\n",
drivers/rtc/rtc-sun6i.c +5 -3
@@ -230,7 +230,7 @@ static void __init sun6i_rtc_clk_init(struct device_node *node) 300000000);if (IS_ERR (rtc->int_osc)) {pr_crit ("Couldn't register the internal oscillator\n" ); -return ; + goto err; } parents[0 ] =clk_hw_get_name (rtc->int_osc);
@@ -246,7 +246,7 @@ static void __init sun6i_rtc_clk_init(struct device_node *node) rtc->losc =clk_register (NULL , &rtc->hw);if (IS_ERR (rtc->losc)) {pr_crit ("Couldn't register the LOSC clock\n" ); -return ; + goto err_register; } of_property_read_string_index(node, "clock-output-names", 1,
@@ -257,7 +257,7 @@ static void __init sun6i_rtc_clk_init(struct device_node *node) &rtc->lock);if (IS_ERR (rtc->ext_losc)) {pr_crit ("Couldn't register the LOSC external gate\n" ); -return ; + goto err_register; } clk_data->num =2 ;
@@ -266,6 +266,8 @@ static void __init sun6i_rtc_clk_init(struct device_node *node)of_clk_add_hw_provider (node, of_clk_hw_onecell_get, clk_data);return ; +err_register: +clk_hw_unregister_fixed_rate (rtc->int_osc); err:kfree (clk_data); }
drivers/s390/block/dasd_alias.c +9 -1
@@ -462,11 +462,19 @@ static int read_unit_address_configuration(struct dasd_device *device,spin_unlock_irqrestore (&lcu->lock, flags); rc =dasd_sleep_on (cqr); -if (rc && !suborder_not_supported (cqr)) { +if (!rc) + goto out; + +if (suborder_not_supported (cqr)) { +/* suborder not supported or device unusable for IO */ + rc = -EOPNOTSUPP ; + }else { +/* IO failed but should be retried */ spin_lock_irqsave (&lcu->lock, flags); lcu->flags |=NEED_UAC_UPDATE ;spin_unlock_irqrestore (&lcu->lock, flags); } +out:dasd_kfree_request (cqr, cqr->memdev);return rc; }
drivers/usb/serial/digi_acceleport.c +13 -32
117 lines not on this page · raw message
drivers/vfio/pci/vfio_pci.c +1 -2
@@ -118,8 +118,6 @@ static void vfio_pci_probe_mmaps(struct vfio_pci_device *vdev)int bar;struct vfio_pci_dummy_resource *dummy_res; -INIT_LIST_HEAD (&vdev->dummy_resources_list); -for (bar =PCI_STD_RESOURCES ; bar <=PCI_STD_RESOURCE_END ; bar++) { res = vdev->pdev->resource + bar;
@@ -1524,6 +1522,7 @@ static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) vdev->irq_type =VFIO_PCI_NUM_IRQS ;mutex_init (&vdev->igate);spin_lock_init (&vdev->irqlock); +INIT_LIST_HEAD (&vdev->dummy_resources_list);mutex_init (&vdev->vma_lock);INIT_LIST_HEAD (&vdev->vma_list);init_rwsem (&vdev->memory_lock);
fs/quota/quota_tree.c +4 -4
@@ -61,7 +61,7 @@ static ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf)memset (buf,0 , info->dqi_usable_bs);return sb->s_op->quota_read (sb, info->dqi_type, buf, - info->dqi_usable_bs, blk << info->dqi_blocksize_bits); + info->dqi_usable_bs, (loff_t )blk << info->dqi_blocksize_bits); }static ssize_t write_blk (struct qtree_mem_dqinfo *info,uint blk,char *buf)
@@ -70,7 +70,7 @@ static ssize_t write_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf)ssize_t ret; ret = sb->s_op->quota_write (sb, info->dqi_type, buf, - info->dqi_usable_bs, blk << info->dqi_blocksize_bits); + info->dqi_usable_bs, (loff_t )blk << info->dqi_blocksize_bits);if (ret != info->dqi_usable_bs) {quota_error (sb,"dquota write failed" );if (ret >=0 )
@@ -283,7 +283,7 @@ static uint find_free_dqentry(struct qtree_mem_dqinfo *info, blk); goto out_buf; } - dquot->dq_off = (blk << info->dqi_blocksize_bits) + + dquot->dq_off = ((loff_t )blk << info->dqi_blocksize_bits) +sizeof (struct qt_disk_dqdbheader ) + i * info->dqi_entry_size;kfree (buf);
@@ -558,7 +558,7 @@ static loff_t find_block_dqentry(struct qtree_mem_dqinfo *info, ret = -EIO ; goto out_buf; }else { - ret = (blk << info->dqi_blocksize_bits) +sizeof (struct + ret = ((loff_t )blk << info->dqi_blocksize_bits) +sizeof (struct qt_disk_dqdbheader ) + i * info->dqi_entry_size; } out_buf:
fs/reiserfs/stree.c +6 -0
@@ -454,6 +454,12 @@ static int is_leaf(char *buf, int blocksize, struct buffer_head *bh) "(second one): %h", ih);return 0 ; } +if (is_direntry_le_ih (ih) && (ih_item_len (ih) < (ih_entry_count (ih) *IH_SIZE ))) { +reiserfs_warning (NULL ,"reiserfs-5093" , +"item entry count seems wrong %h" , + ih); +return 0 ; + } prev_location =ih_location (ih); }
include/linux/kdev_t.h +11 -11
@@ -21,61 +21,61 @@ })/* acceptable for old filesystems */ -static inline bool old_valid_dev (dev_t dev) +static __always_inline bool old_valid_dev(dev_t dev) {return MAJOR (dev) <256 &&MINOR (dev) <256 ; } -static inline u16 old_encode_dev (dev_t dev) +static __always_inline u16 old_encode_dev(dev_t dev) {return (MAJOR (dev) <<8 ) |MINOR (dev); } -static inline dev_t old_decode_dev (u16 val) +static __always_inline dev_t old_decode_dev(u16 val) {return MKDEV ((val >>8 ) &255 , val &255 ); } -static inline u32 new_encode_dev (dev_t dev) +static __always_inline u32 new_encode_dev(dev_t dev) {unsigned major =MAJOR (dev);unsigned minor =MINOR (dev);return (minor &0xff ) | (major <<8 ) | ((minor & ~0xff ) <<12 ); } -static inline dev_t new_decode_dev (u32 dev) +static __always_inline dev_t new_decode_dev(u32 dev) {unsigned major = (dev &0xfff00 ) >>8 ;unsigned minor = (dev &0xff ) | ((dev >>12 ) &0xfff00 );return MKDEV (major, minor); } -static inline u64 huge_encode_dev (dev_t dev) +static __always_inline u64 huge_encode_dev(dev_t dev) {return new_encode_dev (dev); } -static inline dev_t huge_decode_dev (u64 dev) +static __always_inline dev_t huge_decode_dev(u64 dev) {return new_decode_dev (dev); } -static inline int sysv_valid_dev (dev_t dev) +static __always_inline int sysv_valid_dev(dev_t dev) {return MAJOR (dev) < (1 <<14 ) &&MINOR (dev) < (1 <<18 ); } -static inline u32 sysv_encode_dev (dev_t dev) +static __always_inline u32 sysv_encode_dev(dev_t dev) {return MINOR (dev) | (MAJOR (dev) <<18 ); } -static inline unsigned sysv_major (u32 dev) +static __always_inline unsigned sysv_major (u32 dev) {return (dev >>18 ) &0x3fff ; } -static inline unsigned sysv_minor (u32 dev) +static __always_inline unsigned sysv_minor (u32 dev) {return dev &0x3ffff ; }
include/linux/memcontrol.h +101 -64
268 lines not on this page · raw message
include/linux/of.h +1 -0
@@ -1163,6 +1163,7 @@ static inline int of_get_available_child_count(const struct device_node *np)#define _OF_DECLARE (table, name, compat, fn, fn_type) \ static const struct of_device_id __of_table_##name \ __used __section(__##table##_of_table) \ + __aligned(__alignof__(struct of_device_id)) \ = { .compatible = compat, \ .data = (fn == (fn_type)NULL) ? fn : fn }#else
include/uapi/linux/const.h +5 -0
@@ -25,4 +25,9 @@#define _BITUL (x) (_AC(1,UL) << (x))#define _BITULL (x) (_AC(1,ULL) << (x)) +#define __ALIGN_KERNEL (x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) +#define __ALIGN_KERNEL_MASK (x, mask) (((x) + (mask)) & ~(mask)) + +#define __KERNEL_DIV_ROUND_UP (n, d) (((n) + (d) - 1) / (d)) +#endif /* !(_LINUX_CONST_H) */
include/uapi/linux/ethtool.h +1 -1
@@ -14,7 +14,7 @@#ifndef _UAPI_LINUX_ETHTOOL_H#define _UAPI_LINUX_ETHTOOL_H -#include <linux/kernel.h> +#include <linux/const.h> #include <linux/types.h> #include <linux/if_ether.h>
include/uapi/linux/kernel.h +1 -8
@@ -3,13 +3,6 @@#define _UAPI_LINUX_KERNEL_H#include <linux/sysinfo.h> - -/* -* 'kernel.h' contains some often-used function prototypes etc -*/ -#define __ALIGN_KERNEL (x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) -#define __ALIGN_KERNEL_MASK (x, mask) (((x) + (mask)) & ~(mask)) - -#define __KERNEL_DIV_ROUND_UP (n, d) (((n) + (d) - 1) / (d)) +#include <linux/const.h> #endif /* _UAPI_LINUX_KERNEL_H */
include/uapi/linux/lightnvm.h +1 -1
@@ -21,7 +21,7 @@#define _UAPI_LINUX_LIGHTNVM_H#ifdef __KERNEL__ -#include <linux/kernel.h> +#include <linux/const.h> #include <linux/ioctl.h> #else /* __KERNEL__ */ #include <stdio.h>
include/uapi/linux/mroute6.h +1 -1
@@ -2,7 +2,7 @@#ifndef _UAPI__LINUX_MROUTE6_H#define _UAPI__LINUX_MROUTE6_H -#include <linux/kernel.h> +#include <linux/const.h> #include <linux/types.h> #include <linux/sockios.h> #include <linux/in6.h> /* For struct sockaddr_in6. */
include/uapi/linux/netfilter/x_tables.h +1 -1
@@ -1,7 +1,7 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _UAPI_X_TABLES_H#define _UAPI_X_TABLES_H -#include <linux/kernel.h> +#include <linux/const.h> #include <linux/types.h> #define XT_FUNCTION_MAXNAMELEN 30
include/uapi/linux/netlink.h +1 -1
@@ -2,7 +2,7 @@#ifndef _UAPI__LINUX_NETLINK_H#define _UAPI__LINUX_NETLINK_H -#include <linux/kernel.h> +#include <linux/const.h> #include <linux/socket.h> /* for __kernel_sa_family_t */ #include <linux/types.h>
include/uapi/linux/sysctl.h +1 -1
@@ -23,7 +23,7 @@#ifndef _UAPI_LINUX_SYSCTL_H#define _UAPI_LINUX_SYSCTL_H -#include <linux/kernel.h> +#include <linux/const.h> #include <linux/types.h> #include <linux/compiler.h>
kernel/module.c +4 -2
@@ -1789,7 +1789,6 @@ static int mod_sysfs_init(struct module *mod)if (err)mod_kobject_put (mod); -/* delay uevent until full sysfs population */ out:return err; }
@@ -1826,7 +1825,6 @@ static int mod_sysfs_setup(struct module *mod,add_sect_attrs (mod, info);add_notes_attrs (mod, info); -kobject_uevent (&mod->mkobj.kobj,KOBJ_ADD );return 0 ; out_unreg_modinfo_attrs:
@@ -3481,6 +3479,9 @@ static noinline int do_init_module(struct module *mod)blocking_notifier_call_chain (&module_notify_list,MODULE_STATE_LIVE , mod); +/* Delay uevent until module has finished its init routine */ +kobject_uevent (&mod->mkobj.kobj,KOBJ_ADD ); +/* * We need to finish all async code before the module init sequence * is done. This has potential to deadlock. For example, a newly
@@ -3801,6 +3802,7 @@ static int load_module(struct load_info *info, const char __user *uargs, MODULE_STATE_GOING, mod);klp_module_going (mod); bug_cleanup: + mod->state =MODULE_STATE_GOING ;/* module_bug_cleanup needs module_mutex protection */ mutex_lock (&module_mutex);module_bug_cleanup (mod);
mm/memcontrol.c +76 -84
332 lines not on this page · raw message
sound/core/pcm_native.c +7 -2
@@ -721,8 +721,13 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream, runtime->boundary *=2 ;/* clear the buffer for avoiding possible kernel info leaks */ -if (runtime->dma_area && !substream->ops->copy_user) -memset (runtime->dma_area,0 , runtime->dma_bytes); +if (runtime->dma_area && !substream->ops->copy_user) { +size_t size = runtime->dma_bytes; + +if (runtime->info &SNDRV_PCM_INFO_MMAP ) + size =PAGE_ALIGN (size); +memset (runtime->dma_area,0 , size); + }snd_pcm_timer_resolution_change (substream);snd_pcm_set_state (substream,SNDRV_PCM_STATE_SETUP );
sound/core/seq/seq_queue.h +4 -4
@@ -40,10 +40,10 @@ struct snd_seq_queue {struct snd_seq_timer *timer;/* time keeper for this queue */ int owner;/* client that 'owns' the timer */ - unsigned int locked:1, /* timer is only accesibble by owner if set */ - klocked:1, /* kernel lock (after START) */ - check_again:1, - check_blocked:1; +bool locked;/* timer is only accesibble by owner if set */ +bool klocked;/* kernel lock (after START) */ +bool check_again;/* concurrent access happened during check */ +bool check_blocked;/* queue being checked */ unsigned int flags;/* status flags */ unsigned int info_flags;/* info for sync */
sound/pci/hda/patch_ca0132.c +14 -2
@@ -4443,11 +4443,10 @@ static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)/* Delay enabling the HP amp, to let the mic-detection * state machine run. */ -cancel_delayed_work (&spec->unsol_hp_work); -schedule_delayed_work (&spec->unsol_hp_work,msecs_to_jiffies (500 )); tbl =snd_hda_jack_tbl_get (codec, cb->nid);if (tbl) tbl->block_report =1 ; +schedule_delayed_work (&spec->unsol_hp_work,msecs_to_jiffies (500 )); }static void amic_callback (struct hda_codec *codec,struct hda_jack_callback *cb)
@@ -4625,12 +4624,25 @@ static void ca0132_free(struct hda_codec *codec)kfree (codec->spec); } +#ifdef CONFIG_PM +static int ca0132_suspend (struct hda_codec *codec) +{ +struct ca0132_spec *spec = codec->spec; + +cancel_delayed_work_sync (&spec->unsol_hp_work); +return 0 ; +} +#endif +static const struct hda_codec_ops ca0132_patch_ops = { .build_controls = ca0132_build_controls, .build_pcms = ca0132_build_pcms, .init = ca0132_init, .free = ca0132_free, .unsol_event = snd_hda_jack_unsol_event, +#ifdef CONFIG_PM + .suspend = ca0132_suspend, +#endif };static void ca0132_config (struct hda_codec *codec)
sound/usb/pcm.c +20 -32
76 lines not on this page · raw message