Linux 4.14.317
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.317 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 | 6 arch/arm/kernel/unwind.c | 25 - arch/x86/boot/boot.h | 36 - arch/x86/boot/main.c | 2 drivers/acpi/thermal.c | 2 drivers/ata/libata-scsi.c | 34 + drivers/block/nbd.c | 4 drivers/dma/pl330.c | 8 drivers/hid/wacom_wac.c | 2 drivers/iio/adc/mxs-lradc-adc.c | 10 drivers/iio/dac/mcp4725.c | 16 drivers/mailbox/mailbox-test.c | 13 drivers/media/dvb-core/dvb_ca_en50221.c | 37 + drivers/media/dvb-core/dvb_frontend.c | 16 drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 17 drivers/media/usb/dvb-usb-v2/ce6230.c | 8 drivers/media/usb/dvb-usb-v2/ec168.c | 12 drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 20 drivers/media/usb/dvb-usb/az6027.c | 12 drivers/media/usb/dvb-usb/digitv.c | 4 drivers/media/usb/dvb-usb/dw2102.c | 2 drivers/media/usb/ttusb-dec/ttusb_dec.c | 3 drivers/mmc/host/vub300.c | 3 drivers/net/dsa/mv88e6xxx/chip.c | 2 drivers/net/ethernet/sun/cassini.c | 4 drivers/net/usb/cdc_ncm.c | 435 ++++++++++++++---- drivers/net/usb/huawei_cdc_ncm.c | 8 drivers/net/usb/qmi_wwan.c | 2 drivers/net/wireless/broadcom/b43/b43.h | 2 drivers/net/wireless/broadcom/b43legacy/b43legacy.h | 2 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 10 drivers/power/supply/bq27xxx_battery.c | 4 drivers/regulator/da9052-regulator.c | 2 drivers/regulator/da9055-regulator.c | 2 drivers/scsi/Kconfig | 2 drivers/scsi/dpt_i2o.c | 262 ---------- drivers/scsi/dpti.h | 1 drivers/scsi/scsi_lib.c | 2 drivers/scsi/stex.c | 4 drivers/tty/serial/fsl_lpuart.c | 44 - drivers/usb/gadget/function/f_fs.c | 2 drivers/vhost/net.c | 15 drivers/video/fbdev/core/bitblit.c | 3 drivers/video/fbdev/core/modedb.c | 5 drivers/video/fbdev/stifb.c | 1 fs/ext4/ext4.h | 2 fs/ext4/xattr.c | 4 include/linux/usb/cdc_ncm.h | 15 kernel/extable.c | 3 lib/dynamic_debug.c | 2 net/atm/resources.c | 2 net/bluetooth/hci_sock.c | 28 + net/core/sock.c | 2 net/ipv4/tcp.c | 3 net/netfilter/nf_conntrack_netlink.c | 4 net/netrom/nr_subr.c | 7 net/packet/af_packet.c | 8 net/packet/diag.c | 2 security/selinux/Makefile | 6 sound/core/oss/pcm_plugin.h | 16 sound/soc/codecs/ssm2602.c | 15 sound/soc/dwc/dwc-i2s.c | 4 sound/soc/intel/skylake/skl-tplg-interface.h | 3 65 files changed, 747 insertions(+), 490 deletions(-)
Adam Borowski (1):
ACPI: thermal: drop an always true check
Al Viro (1):
Fix double fget() in vhost_net_set_backend()
Alexander Bersenev (2):
cdc_ncm: Implement the 32-bit version of NCM Transfer Block
cdc_ncm: Fix the build warning
Andreas Svensson (1):
net: dsa: mv88e6xxx: Increase wait after reset deactivation
Arnd Bergmann (3):
wifi: b43: fix incorrect __packed annotation
ALSA: oss: avoid missing-prototype warnings
atm: hide unused procfs functions
Bart Van Assche (1):
scsi: stex: Fix gcc 13 warnings
Ben Hutchings (2):
scsi: dpt_i2o: Remove broken pass-through ioctl (I2OUSERCMD)
scsi: dpt_i2o: Do not process completions with invalid addresses
Cambda Zhu (1):
tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
Cezary Rojewski (1):
ASoC: Intel: Skylake: Fix declaration of enum skl_ch_cfg
Damien Le Moal (1):
ata: libata-scsi: Use correct device no in ata_find_dev()
Dan Carpenter (1):
mailbox: mailbox-test: fix a locking issue in mbox_test_message_write()
Deren Wu (1):
mmc: vub300: fix invalid response handling
Eric Dumazet (2):
netrom: fix info-leak in nr_write_internal()
af_packet: do not use READ_ONCE() in packet_bind()
Greg Kroah-Hartman (1):
Linux 4.14.317
Haibo Li (1):
ARM: 9295/1: unwind:fix unwind abort for uleb128 case
Hans de Goede (1):
power: supply: bq27xxx: After charger plug in/out wait 0.5s for things to stabilize
Helge Deller (3):
fbdev: modedb: Add 1920x1080 at 60 Hz video mode
fbdev: stifb: Fix info entry in sti_struct on error path
fbcon: Fix null-ptr-deref in soft_cursor
Hyunwoo Kim (2):
media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()
media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221
Ivan Orlov (1):
nbd: Fix debugfs_create_dir error checking
Jakub Kicinski (1):
wifi: rtlwifi: remove always-true condition pointed out by GCC 12
Jiakai Luo (1):
iio: adc: mxs-lradc: fix the order of two cleanup operations
Kees Cook (1):
x86/boot: Wrap literal addresses in absolute_pointer()
Kuniyuki Iwashima (1):
af_packet: Fix data-races of pkt_sk(sk)->num.
Lee Jones (1):
mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
Linus Torvalds (1):
gcc-12: disable '-Wdangling-pointer' warning for now
Marek Vasut (1):
iio: dac: mcp4725: Fix i2c_master_send() return value handling
Martin Liška (1):
eth: sun: cassini: remove dead code
Maxim Kochetkov (1):
ASoC: dwc: limit the number of overrun messages
Nathan Chancellor (3):
kernel/extable.c: use address-of operator on section symbols lib/dynamic_debug.c: use address-of operator on section symbols
regulator: da905{2,5}: Remove unnecessary array check
Nikita Zhandarovich (1):
HID: wacom: avoid integer overflow in wacom_intuos_inout()
Paul Moore (1):
selinux: don't use make's grouped targets feature yet
Paweł Anikiel (1):
ASoC: ssm2602: Add workaround for playback distortions
Ping-Ke Shih (1):
wifi: rtlwifi: 8192de: correct checking of IQK reload
Randy Dunlap (1):
dmaengine: pl330: rename _start to prevent build error
Ruihan Li (1):
bluetooth: Add cmd validity checks at the start of hci_sock_ioctl()
Sebastian Krzyszkowiak (1):
net: usb: qmi_wwan: Set DTR quirk for BroadMobi BM818
Sherry Sun (1):
tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK
Takashi Iwai (1):
media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*()
Theodore Ts'o (1):
ext4: add lockdep annotations for i_data_sem for ea_inode's
Tom Rix (1):
netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
Tudor Ambarus (1):
net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize
Uttkarsh Aggarwal (1):
usb: gadget: f_fs: Add unbind event before functionfs_unbind
Vladislav Efanov (1):
udp6: Fix race condition in udp6_sendmsg & connect
Wei Chen (6):
media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer()
media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer()
media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer()
media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer()
media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address
media: netup_unidvb: fix irq init by register it at the end of probe
Wenchao Hao (1):
scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed
Yun Lu (1):
wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value
Zhang Shurong (1):
media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer
Greg Kroah-Hartman
maintainerMakefile +5 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 316 +SUBLEVEL = 317 EXTRAVERSION = NAME = Petit Gorille
@@ -731,6 +731,10 @@ endif KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) + +# These result in bogus false positives +KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer) + ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls else
arch/arm/kernel/unwind.c +24 -1
@@ -313,6 +313,29 @@ static int unwind_exec_pop_subset_r0_to_r3(struct unwind_ctrl_block *ctrl,return URC_OK ; } +static unsigned long unwind_decode_uleb128 (struct unwind_ctrl_block *ctrl) +{ +unsigned long bytes =0 ; +unsigned long insn; +unsigned long result =0 ; + +/* +* unwind_get_byte() will advance `ctrl` one instruction at a time, so +* loop until we get an instruction byte where bit 7 is not set. +* +* Note: This decodes a maximum of 4 bytes to output 28 bits data where +* max is 0xfffffff: that will cover a vsp increment of 1073742336, hence +* it is sufficient for unwinding the stack. +*/ +do { + insn =unwind_get_byte (ctrl); + result |= (insn &0x7f ) << (bytes *7 ); + bytes++; + }while (!!(insn &0x80 ) && (bytes !=sizeof (result))); + +return result; +} +/* * Execute the current unwind instruction. */
@@ -366,7 +389,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)if (ret) goto error; }else if (insn ==0xb2 ) { -unsigned long uleb128 =unwind_get_byte (ctrl); +unsigned long uleb128 =unwind_decode_uleb128 (ctrl); ctrl->vrs[SP ] +=0x204 + (uleb128 <<2 ); }else {
arch/x86/boot/boot.h +24 -12
@@ -114,66 +114,78 @@ typedef unsigned int addr_t;static inline u8 rdfs8 (addr_t addr) { +u8 *ptr = (u8 *)absolute_pointer (addr);u8 v; - asmvolatile ("movb %%fs:%1,%0" :"=q" (v) :"m" (*(u8 *)addr)); + asmvolatile ("movb %%fs:%1,%0" :"=q" (v) :"m" (*ptr));return v; }static inline u16 rdfs16 (addr_t addr) { +u16 *ptr = (u16 *)absolute_pointer (addr);u16 v; - asmvolatile ("movw %%fs:%1,%0" :"=r" (v) :"m" (*(u16 *)addr)); + asmvolatile ("movw %%fs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline u32 rdfs32 (addr_t addr) { +u32 *ptr = (u32 *)absolute_pointer (addr);u32 v; - asmvolatile ("movl %%fs:%1,%0" :"=r" (v) :"m" (*(u32 *)addr)); + asmvolatile ("movl %%fs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline void wrfs8 (u8 v,addr_t addr) { - asmvolatile ("movb %1,%%fs:%0" :"+m" (*(u8 *)addr) :"qi" (v)); +u8 *ptr = (u8 *)absolute_pointer (addr); + asmvolatile ("movb %1,%%fs:%0" :"+m" (*ptr) :"qi" (v)); }static inline void wrfs16 (u16 v,addr_t addr) { - asmvolatile ("movw %1,%%fs:%0" :"+m" (*(u16 *)addr) :"ri" (v)); +u16 *ptr = (u16 *)absolute_pointer (addr); + asmvolatile ("movw %1,%%fs:%0" :"+m" (*ptr) :"ri" (v)); }static inline void wrfs32 (u32 v,addr_t addr) { - asmvolatile ("movl %1,%%fs:%0" :"+m" (*(u32 *)addr) :"ri" (v)); +u32 *ptr = (u32 *)absolute_pointer (addr); + asmvolatile ("movl %1,%%fs:%0" :"+m" (*ptr) :"ri" (v)); }static inline u8 rdgs8 (addr_t addr) { +u8 *ptr = (u8 *)absolute_pointer (addr);u8 v; - asmvolatile ("movb %%gs:%1,%0" :"=q" (v) :"m" (*(u8 *)addr)); + asmvolatile ("movb %%gs:%1,%0" :"=q" (v) :"m" (*ptr));return v; }static inline u16 rdgs16 (addr_t addr) { +u16 *ptr = (u16 *)absolute_pointer (addr);u16 v; - asmvolatile ("movw %%gs:%1,%0" :"=r" (v) :"m" (*(u16 *)addr)); + asmvolatile ("movw %%gs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline u32 rdgs32 (addr_t addr) { +u32 *ptr = (u32 *)absolute_pointer (addr);u32 v; - asmvolatile ("movl %%gs:%1,%0" :"=r" (v) :"m" (*(u32 *)addr)); + asmvolatile ("movl %%gs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline void wrgs8 (u8 v,addr_t addr) { - asmvolatile ("movb %1,%%gs:%0" :"+m" (*(u8 *)addr) :"qi" (v)); +u8 *ptr = (u8 *)absolute_pointer (addr); + asmvolatile ("movb %1,%%gs:%0" :"+m" (*ptr) :"qi" (v)); }static inline void wrgs16 (u16 v,addr_t addr) { - asmvolatile ("movw %1,%%gs:%0" :"+m" (*(u16 *)addr) :"ri" (v)); +u16 *ptr = (u16 *)absolute_pointer (addr); + asmvolatile ("movw %1,%%gs:%0" :"+m" (*ptr) :"ri" (v)); }static inline void wrgs32 (u32 v,addr_t addr) { - asmvolatile ("movl %1,%%gs:%0" :"+m" (*(u32 *)addr) :"ri" (v)); +u32 *ptr = (u32 *)absolute_pointer (addr); + asmvolatile ("movl %1,%%gs:%0" :"+m" (*ptr) :"ri" (v)); }/* Note: these only return true/false, not a signed return value! */
arch/x86/boot/main.c +1 -1
@@ -34,7 +34,7 @@ static void copy_boot_params(void)u16 cl_offset; };const struct old_cmdline *const oldcmd = - (const struct old_cmdline *)OLD_CL_ADDRESS ; +absolute_pointer (OLD_CL_ADDRESS );BUILD_BUG_ON (sizeof boot_params !=4096 );memcpy (&boot_params.hdr, &hdr,sizeof hdr);
drivers/acpi/thermal.c +0 -2
@@ -1172,8 +1172,6 @@ static int acpi_thermal_resume(struct device *dev)return -EINVAL ;for (i =0 ; i <ACPI_THERMAL_MAX_ACTIVE ; i++) { -if (!(&tz->trips.active[i])) -break ;if (!tz->trips.active[i].flags.valid)break ; tz->trips.active[i].flags.enabled =1 ;
drivers/ata/libata-scsi.c +26 -8
@@ -3054,18 +3054,36 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)return 0 ; } -static struct ata_device *ata_find_dev (struct ata_port *ap,int devno) +static struct ata_device *ata_find_dev (struct ata_port *ap,unsigned int devno) { -if (!sata_pmp_attached (ap)) { -if (likely (devno >=0 && - devno <ata_link_max_devices (&ap->link))) +/* +* For the non-PMP case, ata_link_max_devices() returns 1 (SATA case), +* or 2 (IDE master + slave case). However, the former case includes +* libsas hosted devices which are numbered per scsi host, leading +* to devno potentially being larger than 0 but with each struct +* ata_device having its own struct ata_port and struct ata_link. +* To accommodate these, ignore devno and always use device number 0. +*/ +if (likely (!sata_pmp_attached (ap))) { +int link_max_devices =ata_link_max_devices (&ap->link); + +if (link_max_devices ==1 ) +return &ap->link.device[0 ]; + +if (devno < link_max_devices)return &ap->link.device[devno]; - }else { -if (likely (devno >=0 && - devno < ap->nr_pmp_links)) -return &ap->pmp_link[devno].device[0 ]; + +return NULL ; } +/* +* For PMP-attached devices, the device number corresponds to C +* (channel) of SCSI [H:C:I:L], indicating the port pmp link +* for the device. +*/ +if (devno < ap->nr_pmp_links) +return &ap->pmp_link[devno].device[0 ]; +return NULL ; }
drivers/block/nbd.c +2 -2
@@ -1531,7 +1531,7 @@ static int nbd_dev_dbg_init(struct nbd_device *nbd)return -EIO ; dir =debugfs_create_dir (nbd_name (nbd), nbd_dbg_dir); -if (!dir) { +if (IS_ERR (dir)) {dev_err (nbd_to_dev (nbd),"Failed to create debugfs dir for '%s'\n" ,nbd_name (nbd));return -EIO ;
@@ -1557,7 +1557,7 @@ static int nbd_dbg_init(void)struct dentry *dbg_dir; dbg_dir =debugfs_create_dir ("nbd" ,NULL ); -if (!dbg_dir) +if (IS_ERR (dbg_dir))return -EIO ; nbd_dbg_dir = dbg_dir;
drivers/dma/pl330.c +4 -4
@@ -1041,7 +1041,7 @@ static bool _trigger(struct pl330_thread *thrd)return true; } -static bool _start (struct pl330_thread *thrd) +static bool pl330_start_thread (struct pl330_thread *thrd) {switch (_state (thrd)) {case PL330_STATE_FAULT_COMPLETING :
@@ -1584,7 +1584,7 @@ static int pl330_update(struct pl330_dmac *pl330) thrd->req_running =-1 ;/* Get going again ASAP */ -_start (thrd); +pl330_start_thread (thrd);/* For now, just make a list of callbacks to be done */ list_add_tail (&descdone->rqd, &pl330->req_done);
@@ -1974,7 +1974,7 @@ static void pl330_tasklet(unsigned long data) }else {/* Make sure the PL330 Channel thread is active */ spin_lock (&pch->thread->dmac->lock); -_start (pch->thread); +pl330_start_thread (pch->thread);spin_unlock (&pch->thread->dmac->lock); }
@@ -1992,7 +1992,7 @@ static void pl330_tasklet(unsigned long data)if (power_down) { pch->active = true;spin_lock (&pch->thread->dmac->lock); -_start (pch->thread); +pl330_start_thread (pch->thread);spin_unlock (&pch->thread->dmac->lock); power_down = false; }
drivers/hid/wacom_wac.c +1 -1
@@ -743,7 +743,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)/* Enter report */ if ((data[1 ] &0xfc ) ==0xc0 ) {/* serial number of the tool */ - wacom->serial[idx] = ((data[3 ] &0x0f ) <<28 ) + + wacom->serial[idx] = ((__u64)(data[3 ] &0x0f ) <<28 ) + (data[4 ] <<20 ) + (data[5 ] <<12 ) + (data[6 ] <<4 ) + (data[7 ] >>4 );
drivers/iio/adc/mxs-lradc-adc.c +5 -5
@@ -769,13 +769,13 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) ret =mxs_lradc_adc_trigger_init (iio);if (ret) - goto err_trig; +return ret; ret =iio_triggered_buffer_setup (iio, &iio_pollfunc_store_time, &mxs_lradc_adc_trigger_handler, &mxs_lradc_adc_buffer_ops);if (ret) -return ret; + goto err_trig; adc->vref_mv = mxs_lradc_adc_vref_mv[lradc->soc];
@@ -813,9 +813,9 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) err_dev:mxs_lradc_adc_hw_stop (adc); -mxs_lradc_adc_trigger_remove (iio); -err_trig:iio_triggered_buffer_cleanup (iio); +err_trig: +mxs_lradc_adc_trigger_remove (iio);return ret; }
@@ -826,8 +826,8 @@ static int mxs_lradc_adc_remove(struct platform_device *pdev)iio_device_unregister (iio);mxs_lradc_adc_hw_stop (adc); -mxs_lradc_adc_trigger_remove (iio);iio_triggered_buffer_cleanup (iio); +mxs_lradc_adc_trigger_remove (iio);return 0 ; }
drivers/iio/dac/mcp4725.c +14 -2
@@ -50,12 +50,18 @@ static int mcp4725_suspend(struct device *dev)struct mcp4725_data *data =iio_priv (i2c_get_clientdata (to_i2c_client (dev)));u8 outbuf[2 ]; +int ret; outbuf[0 ] = (data->powerdown_mode +1 ) <<4 ; outbuf[1 ] =0 ; data->powerdown = true; -return i2c_master_send (data->client, outbuf,2 ); + ret =i2c_master_send (data->client, outbuf,2 ); +if (ret <0 ) +return ret; +else if (ret !=2 ) +return -EIO ; +return 0 ; }static int mcp4725_resume (struct device *dev)
@@ -63,13 +69,19 @@ static int mcp4725_resume(struct device *dev)struct mcp4725_data *data =iio_priv (i2c_get_clientdata (to_i2c_client (dev)));u8 outbuf[2 ]; +int ret;/* restore previous DAC value */ outbuf[0 ] = (data->dac_value >>8 ) &0xf ; outbuf[1 ] = data->dac_value &0xff ; data->powerdown = false; -return i2c_master_send (data->client, outbuf,2 ); + ret =i2c_master_send (data->client, outbuf,2 ); +if (ret <0 ) +return ret; +else if (ret !=2 ) +return -EIO ; +return 0 ; }#ifdef CONFIG_PM_SLEEP
drivers/mailbox/mailbox-test.c +11 -2
@@ -16,6 +16,7 @@#include <linux/kernel.h> #include <linux/mailbox_client.h> #include <linux/module.h> +#include <linux/mutex.h> #include <linux/of.h> #include <linux/platform_device.h> #include <linux/poll.h>
@@ -43,6 +44,7 @@ struct mbox_test_device {char *signal;char *message;spinlock_t lock; +struct mutex mutex;wait_queue_head_t waitq;struct fasync_struct *async_queue; };
@@ -99,6 +101,7 @@ static ssize_t mbox_test_message_write(struct file *filp, size_t count, loff_t *ppos) { struct mbox_test_device *tdev = filp->private_data; +char *message;void *data;int ret;
@@ -114,10 +117,13 @@ static ssize_t mbox_test_message_write(struct file *filp,return -EINVAL ; } - tdev->message =kzalloc (MBOX_MAX_MSG_LEN ,GFP_KERNEL ); -if (!tdev->message) + message =kzalloc (MBOX_MAX_MSG_LEN ,GFP_KERNEL ); +if (!message)return -ENOMEM ; +mutex_lock (&tdev->mutex); + + tdev->message = message; ret =copy_from_user (tdev->message, userbuf, count);if (ret) { ret = -EFAULT ;
@@ -148,6 +154,8 @@ static ssize_t mbox_test_message_write(struct file *filp,kfree (tdev->message); tdev->signal =NULL ; +mutex_unlock (&tdev->mutex); +return ret <0 ? ret : count; }
@@ -396,6 +404,7 @@ static int mbox_test_probe(struct platform_device *pdev)platform_set_drvdata (pdev, tdev);spin_lock_init (&tdev->lock); +mutex_init (&tdev->mutex);if (tdev->rx_channel) { tdev->rx_buffer = devm_kzalloc(&pdev->dev,
drivers/media/dvb-core/dvb_ca_en50221.c +36 -1
@@ -161,6 +161,12 @@ struct dvb_ca_private {/* mutex serializing ioctls */ struct mutex ioctl_mutex; + +/* A mutex used when a device is disconnected */ +struct mutex remove_mutex; + +/* Whether the device is disconnected */ +int exit; };static void dvb_ca_private_free (struct dvb_ca_private *ca)
@@ -1713,12 +1719,22 @@ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file)dprintk ("%s\n" , __func__); -if (!try_module_get (ca->pub->owner)) +mutex_lock (&ca->remove_mutex); + +if (ca->exit) { +mutex_unlock (&ca->remove_mutex); +return -ENODEV ; + } + +if (!try_module_get (ca->pub->owner)) { +mutex_unlock (&ca->remove_mutex);return -EIO ; + } err =dvb_generic_open (inode, file);if (err <0 ) {module_put (ca->pub->owner); +mutex_unlock (&ca->remove_mutex);return err; }
@@ -1743,6 +1759,7 @@ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file)dvb_ca_private_get (ca); +mutex_unlock (&ca->remove_mutex);return 0 ; }
@@ -1762,6 +1779,8 @@ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file)dprintk ("%s\n" , __func__); +mutex_lock (&ca->remove_mutex); +/* mark the CA device as closed */ ca->open =0 ;dvb_ca_en50221_thread_update_delay (ca);
@@ -1772,6 +1791,13 @@ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file)dvb_ca_private_put (ca); +if (dvbdev->users ==1 && ca->exit ==1 ) { +mutex_unlock (&ca->remove_mutex); +wake_up (&dvbdev->wait_queue); + }else { +mutex_unlock (&ca->remove_mutex); + } +return err; }
@@ -1896,6 +1922,7 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, }mutex_init (&ca->ioctl_mutex); +mutex_init (&ca->remove_mutex);if (signal_pending (current)) { ret = -EINTR ;
@@ -1939,6 +1966,14 @@ void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca)dprintk ("%s\n" , __func__); +mutex_lock (&ca->remove_mutex); + ca->exit =1 ; +mutex_unlock (&ca->remove_mutex); + +if (ca->dvbdev->users <1 ) +wait_event (ca->dvbdev->wait_queue, + ca->dvbdev->users ==1 ); +/* shutdown the thread if there was one */ kthread_stop (ca->thread);
drivers/media/dvb-core/dvb_frontend.c +12 -4
@@ -301,14 +301,22 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe, }if (events->eventw == events->eventr) { -int ret; +struct wait_queue_entry wait; +int ret =0 ;if (flags &O_NONBLOCK )return -EWOULDBLOCK ; - ret =wait_event_interruptible (events->wait_queue, -dvb_frontend_test_event (fepriv, events)); - +init_waitqueue_entry (&wait, current); +add_wait_queue (&events->wait_queue, &wait); +while (!dvb_frontend_test_event (fepriv, events)) { +wait_woken (&wait,TASK_INTERRUPTIBLE ,0 ); +if (signal_pending (current)) { + ret = -ERESTARTSYS ; +break ; + } + } +remove_wait_queue (&events->wait_queue, &wait);if (ret <0 )return ret; }
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +9 -8
@@ -897,12 +897,7 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev, ndev->lmmio0, (u32 )pci_resource_len (pci_dev,0 ), ndev->lmmio1, (u32 )pci_resource_len (pci_dev,1 ), pci_dev->irq); -if (request_irq (pci_dev->irq, netup_unidvb_isr,IRQF_SHARED , -"netup_unidvb" , pci_dev) <0 ) { -dev_err (&pci_dev->dev, -"%s(): can't get IRQ %d\n" , __func__, pci_dev->irq); - goto irq_request_err; - } + ndev->dma_size =2 *188 *NETUP_DMA_BLOCKS_COUNT *NETUP_DMA_PACKETS_COUNT ; ndev->dma_virt = dma_alloc_coherent(&pci_dev->dev,
@@ -943,6 +938,14 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev,dev_err (&pci_dev->dev,"netup_unidvb: DMA setup failed\n" ); goto dma_setup_err; } + +if (request_irq (pci_dev->irq, netup_unidvb_isr,IRQF_SHARED , +"netup_unidvb" , pci_dev) <0 ) { +dev_err (&pci_dev->dev, +"%s(): can't get IRQ %d\n" , __func__, pci_dev->irq); + goto dma_setup_err; + } +dev_info (&pci_dev->dev,"netup_unidvb: device has been initialized\n" );return 0 ;
@@ -961,8 +964,6 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev,dma_free_coherent (&pci_dev->dev, ndev->dma_size, ndev->dma_virt, ndev->dma_phys); dma_alloc_err: -free_irq (pci_dev->irq, pci_dev); -irq_request_err:iounmap (ndev->lmmio1); pci_bar1_error:iounmap (ndev->lmmio0);
drivers/media/usb/dvb-usb-v2/ce6230.c +8 -0
@@ -111,6 +111,10 @@ static int ce6230_i2c_master_xfer(struct i2c_adapter *adap,if (num > i +1 && (msg[i+1 ].flags &I2C_M_RD )) {if (msg[i].addr == ce6230_zl10353_config.demod_address) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =DEMOD_READ ; req.value = msg[i].addr >>1 ; req.index = msg[i].buf[0 ];
@@ -127,6 +131,10 @@ static int ce6230_i2c_master_xfer(struct i2c_adapter *adap, }else {if (msg[i].addr == ce6230_zl10353_config.demod_address) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =DEMOD_WRITE ; req.value = msg[i].addr >>1 ; req.index = msg[i].buf[0 ];
drivers/media/usb/dvb-usb-v2/ec168.c +12 -0
@@ -125,6 +125,10 @@ static int ec168_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],while (i < num) {if (num > i +1 && (msg[i+1 ].flags &I2C_M_RD )) {if (msg[i].addr == ec168_ec100_config.demod_address) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =READ_DEMOD ; req.value =0 ; req.index =0xff00 + msg[i].buf[0 ];/* reg */
@@ -141,6 +145,10 @@ static int ec168_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], } }else {if (msg[i].addr == ec168_ec100_config.demod_address) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =WRITE_DEMOD ; req.value = msg[i].buf[1 ];/* val */ req.index =0xff00 + msg[i].buf[0 ];/* reg */
@@ -149,6 +157,10 @@ static int ec168_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret =ec168_ctrl_msg (d, &req); i +=1 ; }else { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } req.cmd =WRITE_I2C ; req.value = msg[i].buf[0 ];/* val */ req.index =0x0100 + msg[i].addr;/* I2C addr */
drivers/media/usb/dvb-usb-v2/rtl28xxu.c +20 -0
@@ -189,6 +189,10 @@ static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret = -EOPNOTSUPP ; goto err_mutex_unlock; }else if (msg[0 ].addr ==0x10 ) { +if (msg[0 ].len <1 || msg[1 ].len <1 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* method 1 - integrated demod */ if (msg[0 ].buf[0 ] ==0x00 ) {/* return demod page from driver cache */
@@ -202,6 +206,10 @@ static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret =rtl28xxu_ctrl_msg (d, &req); } }else if (msg[0 ].len <2 ) { +if (msg[0 ].len <1 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* method 2 - old I2C */ req.value = (msg[0 ].buf[0 ] <<8 ) | (msg[0 ].addr <<1 ); req.index =CMD_I2C_RD ;
@@ -230,8 +238,16 @@ static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret = -EOPNOTSUPP ; goto err_mutex_unlock; }else if (msg[0 ].addr ==0x10 ) { +if (msg[0 ].len <1 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* method 1 - integrated demod */ if (msg[0 ].buf[0 ] ==0x00 ) { +if (msg[0 ].len <2 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* save demod page for later demod access */ dev->page = msg[0 ].buf[1 ]; ret =0 ;
@@ -244,6 +260,10 @@ static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], ret =rtl28xxu_ctrl_msg (d, &req); } }else if ((msg[0 ].len <23 ) && (!dev->new_i2c_write)) { +if (msg[0 ].len <1 ) { + ret = -EOPNOTSUPP ; + goto err_mutex_unlock; + }/* method 2 - old I2C */ req.value = (msg[0 ].buf[0 ] <<8 ) | (msg[0 ].addr <<1 ); req.index =CMD_I2C_WR ;
drivers/media/usb/dvb-usb/az6027.c +12 -0
@@ -991,6 +991,10 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n/* write/read request */ if (i +1 < num && (msg[i +1 ].flags &I2C_M_RD )) { req =0xB9 ; +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } index = (((msg[i].buf[0 ] <<8 ) &0xff00 ) | (msg[i].buf[1 ] &0x00ff )); value = msg[i].addr + (msg[i].len <<8 ); length = msg[i +1 ].len +6 ;
@@ -1004,6 +1008,10 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n/* demod 16bit addr */ req =0xBD ; +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } index = (((msg[i].buf[0 ] <<8 ) &0xff00 ) | (msg[i].buf[1 ] &0x00ff )); value = msg[i].addr + (2 <<8 ); length = msg[i].len -2 ;
@@ -1029,6 +1037,10 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n }else { req =0xBD ; +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + } index = msg[i].buf[0 ] &0x00FF ; value = msg[i].addr + (1 <<8 ); length = msg[i].len -1 ;
drivers/media/usb/dvb-usb/digitv.c +4 -0
@@ -66,6 +66,10 @@ static int digitv_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int numwarn ("more than 2 i2c messages at a time is not handled yet. TODO." );for (i =0 ; i < num; i++) { +if (msg[i].len <1 ) { + i = -EOPNOTSUPP ; +break ; + }/* write/read request */ if (i+1 < num && (msg[i+1 ].flags &I2C_M_RD )) { if (digitv_ctrl_msg(d, USB_READ_COFDM, msg[i].buf[0], NULL, 0,
drivers/media/usb/dvb-usb/dw2102.c +1 -1
@@ -951,7 +951,7 @@ static int su3000_read_mac_address(struct dvb_usb_device *d, u8 mac[6])for (i =0 ; i <6 ; i++) { obuf[1 ] =0xf0 + i;if (i2c_transfer (&d->i2c_adap, msg,2 ) !=2 ) -break ; +return -1 ;else mac[i] = ibuf[0 ]; }
drivers/media/usb/ttusb-dec/ttusb_dec.c +1 -2
@@ -1571,8 +1571,7 @@ static void ttusb_dec_exit_dvb(struct ttusb_dec *dec)dvb_dmx_release (&dec->demux);if (dec->fe) {dvb_unregister_frontend (dec->fe); -if (dec->fe->ops.release) - dec->fe->ops.release (dec->fe); +dvb_frontend_detach (dec->fe); }dvb_unregister_adapter (&dec->adapter); }
drivers/mmc/host/vub300.c +3 -0
@@ -1718,6 +1718,9 @@ static void construct_request_response(struct vub300_mmc_host *vub300,int bytes =3 & less_cmd;int words = less_cmd >>2 ;u8 *r = vub300->resp.response.command_response; + +if (!resp_len) +return ;if (bytes ==3 ) { cmd->resp[words] = (r[1 + (words <<2 )] <<24 ) | (r[2 + (words <<2 )] <<16 )
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
@@ -4060,7 +4060,7 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev) } }if (chip->reset) -usleep_range (1000 ,2000 ); +usleep_range (10000 ,20000 ); err =mv88e6xxx_mdios_register (chip, np);if (err)
drivers/net/ethernet/sun/cassini.c +2 -2
@@ -1349,7 +1349,7 @@ static void cas_init_rx_dma(struct cas *cp)writel (val, cp->regs +REG_RX_PAGE_SIZE );/* enable the header parser if desired */ -if (CAS_HP_FIRMWARE == cas_prog_null) +if (&CAS_HP_FIRMWARE [0 ] == &cas_prog_null[0 ])return ; val =CAS_BASE (HP_CFG_NUM_CPU ,CAS_NCPUS >63 ?0 :CAS_NCPUS );
@@ -3819,7 +3819,7 @@ static void cas_reset(struct cas *cp, int blkflag)/* program header parser */ if ((cp->cas_flags &CAS_FLAG_TARGET_ABORT ) || - (CAS_HP_ALT_FIRMWARE == cas_prog_null)) { + (&CAS_HP_ALT_FIRMWARE [0 ] == &cas_prog_null[0 ])) {cas_load_firmware (cp,CAS_HP_FIRMWARE ); }else {cas_load_firmware (cp,CAS_HP_ALT_FIRMWARE );
drivers/net/usb/cdc_ncm.c +339 -96
605 lines not on this page · raw message
drivers/net/usb/huawei_cdc_ncm.c +4 -4
@@ -81,11 +81,11 @@ static int huawei_cdc_ncm_bind(struct usbnet *usbnet_dev,*/ drvflags |=CDC_NCM_FLAG_NDP_TO_END ; -/* Additionally, it has been reported that some Huawei E3372H devices, with -* firmware version 21.318.01.00.541, come out of reset in NTB32 format mode, hence -* needing to be set to the NTB16 one again. +/* For many Huawei devices the NTB32 mode is the default and the best mode +* they work with. Huawei E5785 and E5885 devices refuse to work in NTB16 mode at all. */ - drvflags |=CDC_NCM_FLAG_RESET_NTB16 ; + drvflags |=CDC_NCM_FLAG_PREFER_NTB32 ; + ret =cdc_ncm_bind_common (usbnet_dev, intf,1 , drvflags);if (ret) goto err;
drivers/net/usb/qmi_wwan.c +1 -1
@@ -1274,7 +1274,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x2001, 0x7e3d, 4)}, /* D-Link DWM-222 A2 */ {QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */ {QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */ - {QMI_FIXED_INTF(0x2020, 0x2060, 4)}, /* BroadMobi BM818 */ + {QMI_QUIRK_SET_DTR(0x2020, 0x2060, 4)}, /* BroadMobi BM818 */ {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */ {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
drivers/net/wireless/broadcom/b43/b43.h +1 -1
@@ -651,7 +651,7 @@ struct b43_iv {union {__be16 d16;__be32 d32; - } data __packed; + } __packed data; } __packed;
drivers/net/wireless/broadcom/b43legacy/b43legacy.h +1 -1
@@ -379,7 +379,7 @@ struct b43legacy_iv {union {__be16 d16;__be32 d32; - } data __packed; + } __packed data; } __packed;#define B43legacy_PHYMODE (phytype) (1 << (phytype))
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +1 -0
@@ -1268,6 +1268,7 @@ struct rtl8xxxu_priv {u32 rege9c;u32 regeb4;u32 regebc; +u32 regrcr;int next_mbox;int nr_out_eps;
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +3 -1
@@ -4051,6 +4051,7 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)RCR_ACCEPT_MGMT_FRAME |RCR_HTC_LOC_CTRL |RCR_APPEND_PHYSTAT |RCR_APPEND_ICV |RCR_APPEND_MIC ;rtl8xxxu_write32 (priv,REG_RCR , val32); + priv->regrcr = val32;/* * Accept all multicast
@@ -5591,7 +5592,7 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw, unsigned int *total_flags, u64 multicast) {struct rtl8xxxu_priv *priv = hw->priv; -u32 rcr =rtl8xxxu_read32 (priv,REG_RCR ); +u32 rcr = priv->regrcr;dev_dbg (&priv->udev->dev,"%s: changed_flags %08x, total_flags %08x\n" , __func__, changed_flags, *total_flags);
@@ -5637,6 +5638,7 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw,*/ rtl8xxxu_write32 (priv,REG_RCR , rcr); + priv->regrcr = rcr; *total_flags &= (FIF_ALLMULTI | FIF_FCSFAIL | FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL | FIF_OTHER_BSS | FIF_PSPOLL |
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +3 -7
@@ -2414,14 +2414,10 @@ void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel)RT_TRACE (rtlpriv,COMP_SCAN ,DBG_LOUD ,"Just Read IQK Matrix reg for channel:%d....\n" , channel); -if ((rtlphy->iqk_matrix[indexforchannel]. - value[0 ] !=NULL ) -/*&&(regea4 != 0) */ ) +if (rtlphy->iqk_matrix[indexforchannel].value[0 ][0 ] !=0 )_rtl92d_phy_patha_fill_iqk_matrix (hw, true, - rtlphy->iqk_matrix[ - indexforchannel].value,0 , - (rtlphy->iqk_matrix[ - indexforchannel].value[0 ][2 ] ==0 )); + rtlphy->iqk_matrix[indexforchannel].value,0 , + rtlphy->iqk_matrix[indexforchannel].value[0 ][2 ] ==0 );if (IS_92D_SINGLEPHY (rtlhal->version)) {if ((rtlphy->iqk_matrix[ indexforchannel].value[0][4] != 0)
drivers/power/supply/bq27xxx_battery.c +2 -2
@@ -1817,8 +1817,8 @@ static void bq27xxx_external_power_changed(struct power_supply *psy) {struct bq27xxx_device_info *di =power_supply_get_drvdata (psy); -cancel_delayed_work_sync (&di->work); -schedule_delayed_work (&di->work,0 ); +/* After charger plug in/out wait 0.5s for things to stabilize */ +mod_delayed_work (system_wq, &di->work,HZ /2 ); }int bq27xxx_battery_setup (struct bq27xxx_device_info *di)
drivers/regulator/da9052-regulator.c +1 -1
@@ -421,7 +421,7 @@ static int da9052_regulator_probe(struct platform_device *pdev) config.dev = &pdev->dev; config.driver_data = regulator; config.regmap = da9052->regmap; -if (pdata && pdata->regulators) { +if (pdata) { config.init_data = pdata->regulators[cell->id]; }else {#ifdef CONFIG_OF
drivers/regulator/da9055-regulator.c +1 -1
@@ -612,7 +612,7 @@ static int da9055_regulator_probe(struct platform_device *pdev) config.driver_data = regulator; config.regmap = da9055->regmap; -if (pdata && pdata->regulators) { +if (pdata) { config.init_data = pdata->regulators[pdev->id]; }else { ret = da9055_regulator_dt_init(pdev, regulator, &config,
drivers/scsi/Kconfig +1 -1
@@ -480,7 +480,7 @@ config SCSI_MVUMI config SCSI_DPT_I2O tristate "Adaptec I2O RAID support " - depends on SCSI && PCI && VIRT_TO_BUS + depends on SCSI && PCI help This driver supports all of Adaptec's I2O based RAID controllers as well as the DPT SmartRaid V cards. This is an Adaptec maintained
drivers/scsi/dpt_i2o.c +5 -257
304 lines not on this page · raw message
drivers/scsi/dpti.h +0 -1
@@ -252,7 +252,6 @@ typedef struct _adpt_hba {void __iomem *FwDebugBLEDflag_P;// Virtual Addr Of FW Debug BLED void __iomem *FwDebugBLEDvalue_P;// Virtual Addr Of FW Debug BLED u32 FwDebugFlags; -u32 *ioctl_reply_context[4 ]; } adpt_hba;struct sg_simple_element {
drivers/scsi/scsi_lib.c +2 -0
@@ -1717,6 +1717,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)*/ SCSI_LOG_MLQUEUE (3 ,scmd_printk (KERN_INFO , cmd,"queuecommand : device blocked\n" )); +atomic_dec (&cmd->device->iorequest_cnt);return SCSI_MLQUEUE_DEVICE_BUSY ; }
@@ -1749,6 +1750,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)trace_scsi_dispatch_cmd_start (cmd); rtn = host->hostt->queuecommand (host, cmd);if (rtn) { +atomic_dec (&cmd->device->iorequest_cnt);trace_scsi_dispatch_cmd_error (cmd, rtn);if (rtn !=SCSI_MLQUEUE_DEVICE_BUSY && rtn !=SCSI_MLQUEUE_TARGET_BUSY )
drivers/scsi/stex.c +4 -0
@@ -114,7 +114,9 @@ enum {TASK_ATTRIBUTE_HEADOFQUEUE =0x1 ,TASK_ATTRIBUTE_ORDERED =0x2 , TASK_ATTRIBUTE_ACA = 0x4, +}; +enum {SS_STS_NORMAL =0x80000000 ,SS_STS_DONE =0x40000000 , SS_STS_HANDSHAKE = 0x20000000,
@@ -126,7 +128,9 @@ enum {SS_I2H_REQUEST_RESET =0x2000 , SS_MU_OPERATIONAL = 0x80000000, +}; +enum {STEX_CDB_LENGTH =16 , STATUS_VAR_LEN = 128,
drivers/tty/serial/fsl_lpuart.c +23 -21
57 lines not on this page · raw message
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -3500,6 +3500,7 @@ static void ffs_func_unbind(struct usb_configuration *c,/* Drain any pending AIO completions */ drain_workqueue (ffs->io_completion_wq); +ffs_event_add (ffs,FUNCTIONFS_UNBIND );if (!--opts->refcnt)functionfs_unbind (ffs);
@@ -3524,7 +3525,6 @@ static void ffs_func_unbind(struct usb_configuration *c, func->function.ssp_descriptors =NULL ; func->interfaces_nums =NULL ; -ffs_event_add (ffs,FUNCTIONFS_UNBIND ); }static struct usb_function *ffs_alloc (struct usb_function_instance *fi)
drivers/vhost/net.c +7 -8
@@ -1047,13 +1047,9 @@ static struct socket *get_raw_socket(int fd)return ERR_PTR (r); } -static struct skb_array *get_tap_skb_array (int fd) +static struct skb_array *get_tap_skb_array (struct file *file) {struct skb_array *array; -struct file *file =fget (fd); - -if (!file) -return NULL ; array =tun_get_skb_array (file);if (!IS_ERR (array)) goto out;
@@ -1062,7 +1058,6 @@ static struct skb_array *get_tap_skb_array(int fd) goto out; array =NULL ; out: -fput (file);return array; }
@@ -1143,8 +1138,12 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd)vhost_net_disable_vq (n, vq); vq->private_data = sock;vhost_net_buf_unproduce (nvq); -if (index ==VHOST_NET_VQ_RX ) - nvq->rx_array =get_tap_skb_array (fd); +if (index ==VHOST_NET_VQ_RX ) { +if (sock) + nvq->rx_array =get_tap_skb_array (sock->file); +else + nvq->rx_array =NULL ; + } r =vhost_vq_init_access (vq);if (r) goto err_used;
drivers/video/fbdev/core/bitblit.c +3 -0
@@ -247,6 +247,9 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode, cursor.set =0 ; +if (!vc->vc_font.data) +return ; + c =scr_readw ((u16 *) vc->vc_pos); attribute =get_attribute (info, c); src = vc->vc_font.data + ((c & charmask) * (w * vc->vc_font.height));
drivers/video/fbdev/core/modedb.c +5 -0
@@ -257,6 +257,11 @@ static const struct fb_videomode modedb[] = { {NULL ,72 ,480 ,300 ,33386 ,40 ,24 ,11 ,19 ,80 ,3 ,0 , FB_VMODE_DOUBLE }, +/* 1920x1080 @ 60 Hz, 67.3 kHz hsync */ + { NULL, 60, 1920, 1080, 6734, 148, 88, 36, 4, 44, 5, 0, +FB_SYNC_HOR_HIGH_ACT |FB_SYNC_VERT_HIGH_ACT , + FB_VMODE_NONINTERLACED }, +/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */ { NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
drivers/video/fbdev/stifb.c +1 -0
@@ -1373,6 +1373,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)iounmap (info->screen_base); out_err0:kfree (fb); + sti->info =NULL ;return -ENXIO ; }
fs/ext4/ext4.h +2 -0
@@ -947,11 +947,13 @@ do { \* where the second inode has larger inode number * than the first * I_DATA_SEM_QUOTA - Used for quota inodes only +* I_DATA_SEM_EA - Used for ea_inodes only */ enum {I_DATA_SEM_NORMAL =0 ,I_DATA_SEM_OTHER ,I_DATA_SEM_QUOTA , +I_DATA_SEM_EA };
fs/ext4/xattr.c +4 -0
@@ -120,7 +120,11 @@ ext4_expand_inode_array(struct ext4_xattr_inode_array **ea_inode_array,#ifdef CONFIG_LOCKDEP void ext4_xattr_inode_set_class (struct inode *ea_inode) { +struct ext4_inode_info *ei =EXT4_I (ea_inode); +lockdep_set_subclass (&ea_inode->i_rwsem,1 ); + (void ) ei;/* shut up clang warning if !CONFIG_LOCKDEP */ +lockdep_set_subclass (&ei->i_data_sem,I_DATA_SEM_EA ); }#endif
include/linux/usb/cdc_ncm.h +12 -3
@@ -45,9 +45,12 @@#define CDC_NCM_DATA_ALTSETTING_NCM 1#define CDC_NCM_DATA_ALTSETTING_MBIM 2 -/* CDC NCM subclass 3.2.1 */ +/* CDC NCM subclass 3.3.1 */ #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 +/* CDC NCM subclass 3.3.2 */ +#define USB_CDC_NCM_NDP32_LENGTH_MIN 0x20 +/* Maximum NTB length */ #define CDC_NCM_NTB_MAX_SIZE_TX 32768/* bytes */ #define CDC_NCM_NTB_MAX_SIZE_RX 32768/* bytes */
@@ -83,7 +86,7 @@/* Driver flags */ #define CDC_NCM_FLAG_NDP_TO_END 0x02/* NDP is placed at end of frame */ #define CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE 0x04/* Avoid altsetting toggle during init */ -#define CDC_NCM_FLAG_RESET_NTB16 0x08/* set NDP16 one more time after altsetting switch */ +#define CDC_NCM_FLAG_PREFER_NTB32 0x08/* prefer NDP32 over NDP16 */ #define cdc_ncm_comm_intf_is_mbim (x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE)
@@ -112,7 +115,11 @@ struct cdc_ncm_ctx {u32 timer_interval;u32 max_ndp_size; -struct usb_cdc_ncm_ndp16 *delayed_ndp16; +u8 is_ndp16; +union { +struct usb_cdc_ncm_ndp16 *delayed_ndp16; +struct usb_cdc_ncm_ndp32 *delayed_ndp32; + };u32 tx_timer_pending;u32 tx_curr_frame_num;
@@ -149,6 +156,8 @@ void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf);struct sk_buff *cdc_ncm_fill_tx_frame (struct usbnet *dev,struct sk_buff *skb,__le32 sign);int cdc_ncm_rx_verify_nth16 (struct cdc_ncm_ctx *ctx,struct sk_buff *skb_in);int cdc_ncm_rx_verify_ndp16 (struct sk_buff *skb_in,int ndpoffset); +int cdc_ncm_rx_verify_nth32 (struct cdc_ncm_ctx *ctx,struct sk_buff *skb_in); +int cdc_ncm_rx_verify_ndp32 (struct sk_buff *skb_in,int ndpoffset);struct sk_buff *cdc_ncm_tx_fixup (struct usbnet *dev,struct sk_buff *skb,gfp_t flags);int cdc_ncm_rx_fixup (struct usbnet *dev,struct sk_buff *skb_in);
kernel/extable.c +2 -1
@@ -44,7 +44,8 @@ u32 __initdata __visible main_extable_sort_needed = 1;/* Sort the kernel's built-in exception table */ void __init sort_main_extable (void ) { -if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) { +if (main_extable_sort_needed && + &__stop___ex_table > &__start___ex_table) {pr_notice ("Sorting __ex_table...\n" );sort_extable (__start___ex_table, __stop___ex_table); }
lib/dynamic_debug.c +1 -1
@@ -984,7 +984,7 @@ static int __init dynamic_debug_init(void)int n =0 , entries =0 , modct =0 ;int verbose_bytes =0 ; -if (__start___verbose == __stop___verbose) { +if (&__start___verbose == &__stop___verbose) {pr_warn ("_ddebug table is empty in a CONFIG_DYNAMIC_DEBUG build\n" );return 1 ; }
net/atm/resources.c +2 -0
@@ -447,6 +447,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg, int compat)return error; } +#ifdef CONFIG_PROC_FS void *atm_dev_seq_start (struct seq_file *seq,loff_t *pos) {mutex_lock (&atm_dev_mutex);
@@ -462,3 +463,4 @@ void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) {return seq_list_next (v, &atm_devs, pos); } +#endif
net/bluetooth/hci_sock.c +28 -0
@@ -968,6 +968,34 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd,BT_DBG ("cmd %x arg %lx" , cmd, arg); +/* Make sure the cmd is valid before doing anything */ +switch (cmd) { +case HCIGETDEVLIST : +case HCIGETDEVINFO : +case HCIGETCONNLIST : +case HCIDEVUP : +case HCIDEVDOWN : +case HCIDEVRESET : +case HCIDEVRESTAT : +case HCISETSCAN : +case HCISETAUTH : +case HCISETENCRYPT : +case HCISETPTYPE : +case HCISETLINKPOL : +case HCISETLINKMODE : +case HCISETACLMTU : +case HCISETSCOMTU : +case HCIINQUIRY : +case HCISETRAW : +case HCIGETCONNINFO : +case HCIGETAUTHINFO : +case HCIBLOCKADDR : +case HCIUNBLOCKADDR : +break ; +default : +return -ENOIOCTLCMD ; + } +lock_sock (sk);if (hci_pi (sk)->channel !=HCI_CHANNEL_RAW ) {
net/core/sock.c +1 -1
@@ -1788,7 +1788,6 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst) {u32 max_segs =1 ; -sk_dst_set (sk, dst); sk->sk_route_caps = dst->dev->features;if (sk->sk_route_caps &NETIF_F_GSO ) sk->sk_route_caps |=NETIF_F_GSO_SOFTWARE ;
@@ -1803,6 +1802,7 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst) } } sk->sk_gso_max_segs = max_segs; +sk_dst_set (sk, dst); }EXPORT_SYMBOL_GPL (sk_setup_caps);
net/ipv4/tcp.c +2 -1
@@ -3037,7 +3037,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level,switch (optname) {case TCP_MAXSEG : val = tp->mss_cache; -if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN ))) +if (tp->rx_opt.user_mss && + ((1 << sk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN ))) val = tp->rx_opt.user_mss;if (tp->repair) val = tp->rx_opt.mss_clamp;
net/netfilter/nf_conntrack_netlink.c +4 -0
@@ -2531,7 +2531,9 @@ static int ctnetlink_exp_dump_mask(struct sk_buff *skb,return -1 ; } +#if IS_ENABLED (CONFIG_NF_NAT )static const union nf_inet_addr any_addr; +#endif static __be32 nf_expect_get_id (const struct nf_conntrack_expect *exp) {
@@ -3031,10 +3033,12 @@ ctnetlink_change_expect(struct nf_conntrack_expect *x,return 0 ; } +#if IS_ENABLED (CONFIG_NF_NAT )static const struct nla_policy exp_nat_nla_policy[CTA_EXPECT_NAT_MAX +1 ] = { [CTA_EXPECT_NAT_DIR ] = { .type =NLA_U32 }, [CTA_EXPECT_NAT_TUPLE ] = { .type =NLA_NESTED }, }; +#endif static int ctnetlink_parse_expect_nat(const struct nlattr *attr,
net/netrom/nr_subr.c +4 -3
@@ -126,7 +126,7 @@ void nr_write_internal(struct sock *sk, int frametype)unsigned char *dptr;int len, timeout; - len =NR_NETWORK_LEN +NR_TRANSPORT_LEN ; + len =NR_TRANSPORT_LEN ;switch (frametype &0x0F ) {case NR_CONNREQ :
@@ -144,7 +144,8 @@ void nr_write_internal(struct sock *sk, int frametype)return ; } -if ((skb =alloc_skb (len,GFP_ATOMIC )) ==NULL ) + skb =alloc_skb (NR_NETWORK_LEN + len,GFP_ATOMIC ); +if (!skb)return ;/*
@@ -152,7 +153,7 @@ void nr_write_internal(struct sock *sk, int frametype)*/ skb_reserve (skb,NR_NETWORK_LEN ); - dptr =skb_put (skb,skb_tailroom (skb)); + dptr =skb_put (skb, len);switch (frametype &0x0F ) {case NR_CONNREQ :
net/packet/af_packet.c +5 -3
@@ -3153,6 +3153,9 @@ static int packet_do_bind(struct sock *sk, const char *name, int ifindex,lock_sock (sk);spin_lock (&po->bind_lock); +if (!proto) + proto = po->num; +rcu_read_lock ();if (po->fanout) {
@@ -3255,7 +3258,7 @@ static int packet_bind_spkt(struct socket *sock, struct sockaddr *uaddr,memcpy (name, uaddr->sa_data,sizeof (uaddr->sa_data)); name[sizeof (uaddr->sa_data)] =0 ; -return packet_do_bind (sk, name,0 ,pkt_sk (sk)->num); +return packet_do_bind (sk, name,0 ,0 ); }static int packet_bind (struct socket *sock,struct sockaddr *uaddr,int addr_len)
@@ -3272,8 +3275,7 @@ static int packet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_lenif (sll->sll_family !=AF_PACKET )return -EINVAL ; -return packet_do_bind (sk,NULL , sll->sll_ifindex, - sll->sll_protocol ? :pkt_sk (sk)->num); +return packet_do_bind (sk,NULL , sll->sll_ifindex, sll->sll_protocol); }static struct proto packet_proto = {
net/packet/diag.c +1 -1
@@ -142,7 +142,7 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, rp =nlmsg_data (nlh); rp->pdiag_family =AF_PACKET ; rp->pdiag_type = sk->sk_type; - rp->pdiag_num =ntohs (po->num); + rp->pdiag_num =ntohs (READ_ONCE (po->num)); rp->pdiag_ino = sk_ino;sock_diag_save_cookie (sk, rp->pdiag_cookie);
security/selinux/Makefile +5 -1
@@ -22,5 +22,9 @@ quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h cmd_flask = $< $(obj)/flask.h $(obj)/av_permissions.h targets += flask.h av_permissions.h -$(obj)/flask.h $(obj)/av_permissions.h &: scripts/selinux/genheaders/genheaders FORCE +# once make >= 4.3 is required, we can use grouped targets in the rule below, +# which basically involves adding both headers and a '&' before the colon, see +# the example below: +# $(obj)/flask.h $(obj)/av_permissions.h &: scripts/selinux/... +$(obj)/flask.h: scripts/selinux/genheaders/genheaders FORCE $(call if_changed,flask)
sound/core/oss/pcm_plugin.h +8 -8
@@ -156,6 +156,14 @@ int snd_pcm_area_copy(const struct snd_pcm_channel_area *src_channel,void *snd_pcm_plug_buf_alloc (struct snd_pcm_substream *plug,snd_pcm_uframes_t size);void snd_pcm_plug_buf_unlock (struct snd_pcm_substream *plug,void *ptr); +#else + +static inline snd_pcm_sframes_t snd_pcm_plug_client_size (struct snd_pcm_substream *handle,snd_pcm_uframes_t drv_size) {return drv_size; } +static inline snd_pcm_sframes_t snd_pcm_plug_slave_size (struct snd_pcm_substream *handle,snd_pcm_uframes_t clt_size) {return clt_size; } +static inline int snd_pcm_plug_slave_format (int format,const struct snd_mask *format_mask) {return format; } + +#endif +snd_pcm_sframes_t snd_pcm_oss_write3 (struct snd_pcm_substream *substream,const char *ptr,snd_pcm_uframes_t size,int in_kernel);
@@ -166,14 +174,6 @@ snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream,snd_pcm_sframes_t snd_pcm_oss_readv3 (struct snd_pcm_substream *substream,void **bufs,snd_pcm_uframes_t frames); -#else - -static inline snd_pcm_sframes_t snd_pcm_plug_client_size (struct snd_pcm_substream *handle,snd_pcm_uframes_t drv_size) {return drv_size; } -static inline snd_pcm_sframes_t snd_pcm_plug_slave_size (struct snd_pcm_substream *handle,snd_pcm_uframes_t clt_size) {return clt_size; } -static inline int snd_pcm_plug_slave_format (int format,const struct snd_mask *format_mask) {return format; } - -#endif -#ifdef PLUGIN_DEBUG #define pdprintf(fmt, args...) printk(KERN_DEBUG "plugin: " fmt, ##args)#else
sound/soc/codecs/ssm2602.c +15 -0
@@ -67,6 +67,18 @@ static const struct reg_default ssm2602_reg[SSM2602_CACHEREGNUM] = { { .reg = 0x09, .def = 0x0000 } }; +/* +* ssm2602 register patch +* Workaround for playback distortions after power up: activates digital +* core, and then powers on output, DAC, and whole chip at the same time +*/ + +static const struct reg_sequence ssm2602_patch[] = { + {SSM2602_ACTIVE ,0x01 }, + {SSM2602_PWR ,0x07 }, + {SSM2602_RESET ,0x00 }, +}; +/*Appending several "None"s just for OSS mixer use*/ static const char *ssm2602_input_select[] = {
@@ -577,6 +589,9 @@ static int ssm260x_codec_probe(struct snd_soc_codec *codec)return ret; } +regmap_register_patch (ssm2602->regmap, ssm2602_patch, +ARRAY_SIZE (ssm2602_patch)); +/* set the update bits */ regmap_update_bits (ssm2602->regmap,SSM2602_LINVOL ,LINVOL_LRIN_BOTH ,LINVOL_LRIN_BOTH );
sound/soc/dwc/dwc-i2s.c +2 -2
@@ -132,13 +132,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)/* Error Handling: TX */ if (isr[i] &ISR_TXFO ) { -dev_err (dev->dev,"TX overrun (ch_id=%d)\n" , i); +dev_err_ratelimited (dev->dev,"TX overrun (ch_id=%d)\n" , i); irq_valid = true; }/* Error Handling: TX */ if (isr[i] &ISR_RXFO ) { -dev_err (dev->dev,"RX overrun (ch_id=%d)\n" , i); +dev_err_ratelimited (dev->dev,"RX overrun (ch_id=%d)\n" , i); irq_valid = true; } }
sound/soc/intel/skylake/skl-tplg-interface.h +2 -1
@@ -71,7 +71,8 @@ enum skl_ch_cfg {SKL_CH_CFG_DUAL_MONO =9 ,SKL_CH_CFG_I2S_DUAL_STEREO_0 =10 ,SKL_CH_CFG_I2S_DUAL_STEREO_1 =11 , -SKL_CH_CFG_4_CHANNEL =12 , +SKL_CH_CFG_7_1 =12 , +SKL_CH_CFG_4_CHANNEL =SKL_CH_CFG_7_1 , SKL_CH_CFG_INVALID };