Linux 5.4.218
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.218 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.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
------------
Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt | 4 Makefile | 2 arch/arm/boot/dts/moxart-uc7112lx.dts | 2 arch/arm/boot/dts/moxart.dtsi | 4 arch/um/Makefile | 8 + arch/x86/um/shared/sysdep/syscalls_32.h | 5 arch/x86/um/tls_32.c | 6 - arch/x86/um/vdso/Makefile | 2 drivers/char/mem.c | 4 drivers/char/random.c | 25 +++- drivers/dma/xilinx/xilinx_dma.c | 8 + drivers/firmware/arm_scmi/scmi_pm_domain.c | 20 +++ drivers/input/joystick/xpad.c | 20 +++ drivers/mmc/core/sd.c | 3 drivers/net/wireless/mac80211_hwsim.c | 2 drivers/rpmsg/qcom_glink_native.c | 2 drivers/rpmsg/qcom_smd.c | 4 drivers/scsi/qedf/qedf_main.c | 5 drivers/scsi/stex.c | 17 +-- drivers/usb/mon/mon_bin.c | 5 drivers/usb/serial/ftdi_sio.c | 3 drivers/usb/serial/qcserial.c | 1 fs/ceph/file.c | 10 + fs/inode.c | 7 - fs/nilfs2/inode.c | 2 fs/nilfs2/segment.c | 21 ++- include/net/ieee802154_netdev.h | 37 ++++++ include/scsi/scsi_cmnd.h | 2 mm/pagewalk.c | 13 +- net/ieee802154/socket.c | 42 ++++--- net/mac80211/util.c | 2 net/wireless/scan.c | 77 +++++++++----- security/integrity/platform_certs/load_uefi.c | 2 sound/pci/hda/hda_intel.c | 3 tools/perf/util/get_current_dir_name.c | 3 35 files changed, 255 insertions(+), 118 deletions(-)
Alexey Dobriyan (1):
perf tools: Fixup get_current_dir_name() compilation
Brian Norris (1):
mmc: core: Terminate infinite loop in SD-UHS voltage switch
Cameron Gutman (1):
Input: xpad - fix wireless 360 controller breaking after suspend
ChanWoo Lee (1):
mmc: core: Replace with already defined values for readability
Cristian Marussi (1):
firmware: arm_scmi: Add SCMI PM driver remove routine
David Gow (1):
arch: um: Mark the stack non-executable to fix a binutils warning
Dongliang Mu (1):
fs: fix UAF/GPF bug in nilfs_mdt_destroy
Frank Wunderlich (1):
USB: serial: qcserial: add new usb-id for Dell branded EM7455
Greg Kroah-Hartman (1):
Linux 5.4.218
Haimin Zhang (1):
net/ieee802154: fix uninit value bug in dgram_sendmsg
Hu Weiwen (1):
ceph: don't truncate file in atomic_open
Jason A. Donenfeld (4):
random: clamp credited irq bits to maximum mixed
random: restore O_NONBLOCK support
random: avoid reading two cache lines on irq randomness
random: use expired timer rather than wq for mixing fast pool
Johan Hovold (1):
USB: serial: ftdi_sio: fix 300 bps rate for SIO
Johannes Berg (7):
wifi: cfg80211: fix u8 overflow in cfg80211_update_notlisted_nontrans()
wifi: cfg80211/mac80211: reject bad MBSSID elements
wifi: cfg80211: ensure length byte is present before access
wifi: cfg80211: fix BSS refcounting bugs
wifi: cfg80211: avoid nontransmitted BSS list corruption
wifi: mac80211_hwsim: avoid mac80211 warning on bad rate
wifi: cfg80211: update hidden BSSes to avoid WARN_ON
Krzysztof Kozlowski (1):
rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
Letu Ren (1):
scsi: qedf: Fix a UAF bug in __qedf_probe()
Linus Torvalds (1):
scsi: stex: Properly zero out the passthrough command structure
Lukas Straub (2):
um: Cleanup syscall_handler_t cast in syscalls_32.h
um: Cleanup compiler warning in arch/x86/um/tls_32.c
Orlando Chamberlain (1):
efi: Correct Macmini DMI match in uefi cert quirk
Pavel Rojtberg (1):
Input: xpad - add supported devices as contributed on github
Ryusuke Konishi (3):
nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level()
nilfs2: fix leak of nilfs_root in case of writer thread creation failure
nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
Sergei Antonov (1):
ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer
Steven Price (1):
mm: pagewalk: Fix race between unmap and page walker
Swati Agarwal (2):
dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property
dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure
Tadeusz Struk (1):
usb: mon: make mmapped memory read only
Takashi Iwai (1):
ALSA: hda: Fix position reporting on Poulsbo
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/dma/moxa,moxart-dma.txt +2 -2
@@ -34,8 +34,8 @@ Example: Use specific request line passing from dma For example, MMC request line is 5 - sdhci: sdhci@98e00000 { - compatible = "moxa,moxart-sdhci"; + mmc: mmc@98e00000 { + compatible = "moxa,moxart-mmc"; reg = <0x98e00000 0x5C>; interrupts = <5 0>; clocks = <&clk_apb>;
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 217 +SUBLEVEL = 218 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/boot/dts/moxart-uc7112lx.dts +1 -1
@@ -79,7 +79,7 @@ clocks = <&ref12>; }; -&sdhci { +&mmc { status = "okay"; };
arch/arm/boot/dts/moxart.dtsi +2 -2
@@ -93,8 +93,8 @@ clock-names = "PCLK"; }; - sdhci: sdhci@98e00000 { - compatible = "moxa,moxart-sdhci"; + mmc: mmc@98e00000 { + compatible = "moxa,moxart-mmc"; reg = <0x98e00000 0x5C>; interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk_apb>;
arch/um/Makefile +8 -0
@@ -132,10 +132,18 @@ export LDS_ELF_FORMAT := $(ELF_FORMAT) # The wrappers will select whether using "malloc" or the kernel allocator. LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc +# Avoid binutils 2.39+ warnings by marking the stack non-executable and +# ignorning warnings for the kallsyms sections. +LDFLAGS_EXECSTACK = -z noexecstack +ifeq ($(CONFIG_LD_IS_BFD),y) +LDFLAGS_EXECSTACK += $(call ld-option,--no-warn-rwx-segments) +endif + LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS),-Wl,$(opt)) # Used by link-vmlinux.sh which has special support for um link export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) +export LDFLAGS_vmlinux := $(LDFLAGS_EXECSTACK) # When cleaning we don't include .config, so we don't include # TT or skas makefiles and don't clean skas_ptregs.h.
arch/x86/um/shared/sysdep/syscalls_32.h +2 -3
@@ -6,10 +6,9 @@#include <asm/unistd.h> #include <sysdep/ptrace.h> -typedef long syscall_handler_t (struct pt_regs ); +typedef long syscall_handler_t (struct syscall_args );extern syscall_handler_t *sys_call_table[];#define EXECUTE_SYSCALL (syscall, regs) \ - ((long (*)(struct syscall_args)) \ - (*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs)) + ((*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs))
arch/x86/um/tls_32.c +0 -6
@@ -65,9 +65,6 @@ static int get_free_idx(struct task_struct* task)struct thread_struct *t = &task->thread;int idx; -if (!t->arch.tls_array) -return GDT_ENTRY_TLS_MIN ; -for (idx =0 ; idx <GDT_ENTRY_TLS_ENTRIES ; idx++)if (!t->arch.tls_array[idx].present)return idx +GDT_ENTRY_TLS_MIN ;
@@ -240,9 +237,6 @@ static int get_tls_entry(struct task_struct *task, struct user_desc *info, {struct thread_struct *t = &task->thread; -if (!t->arch.tls_array) - goto clear; -if (idx <GDT_ENTRY_TLS_MIN || idx >GDT_ENTRY_TLS_MAX )return -EINVAL ;
arch/x86/um/vdso/Makefile +1 -1
@@ -62,7 +62,7 @@ quiet_cmd_vdso = VDSO $@ -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' -VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv +VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack GCOV_PROFILE := n #
drivers/char/mem.c +2 -2
@@ -953,8 +953,8 @@ static const struct memdev { #endif [5] = { "zero", 0666, &zero_fops, 0 }, [7] = { "full", 0666, &full_fops, 0 }, - [8] = { "random", 0666, &random_fops, 0 }, - [9 ] = {"urandom" ,0666 , &urandom_fops,0 }, + [8] = { "random", 0666, &random_fops, FMODE_NOWAIT }, + [9 ] = {"urandom" ,0666 , &urandom_fops,FMODE_NOWAIT }, #ifdef CONFIG_PRINTK [11] = { "kmsg", 0644, &kmsg_fops, 0 }, #endif
drivers/char/random.c +17 -8
@@ -890,20 +890,23 @@ void __init add_bootloader_randomness(const void *buf, size_t len) }struct fast_pool { -struct work_struct mix;unsigned long pool[4 ];unsigned long last;unsigned int count; +struct timer_list mix; }; +static void mix_interrupt_randomness (struct timer_list *work); + static DEFINE_PER_CPU(struct fast_pool, irq_randomness) = { #ifdef CONFIG_64BIT #define FASTMIX_PERM SIPHASH_PERMUTATION - .pool = { SIPHASH_CONST_0, SIPHASH_CONST_1, SIPHASH_CONST_2, SIPHASH_CONST_3 } + .pool = { SIPHASH_CONST_0, SIPHASH_CONST_1, SIPHASH_CONST_2, SIPHASH_CONST_3 }, #else #define FASTMIX_PERM HSIPHASH_PERMUTATION - .pool = { HSIPHASH_CONST_0, HSIPHASH_CONST_1, HSIPHASH_CONST_2, HSIPHASH_CONST_3 } + .pool = { HSIPHASH_CONST_0, HSIPHASH_CONST_1, HSIPHASH_CONST_2, HSIPHASH_CONST_3 }, #endif + .mix = __TIMER_INITIALIZER(mix_interrupt_randomness, 0) }; /*
@@ -945,7 +948,7 @@ int __cold random_online_cpu(unsigned int cpu) }#endif -static void mix_interrupt_randomness (struct work_struct *work) +static void mix_interrupt_randomness (struct timer_list *work) { struct fast_pool *fast_pool = container_of(work, struct fast_pool, mix);/*
@@ -976,7 +979,7 @@ static void mix_interrupt_randomness(struct work_struct *work)local_irq_enable ();mix_pool_bytes (pool,sizeof (pool)); -credit_init_bits (max (1u , (count &U16_MAX ) /64 )); + credit_init_bits(clamp_t(unsigned int, (count & U16_MAX) / 64, 1, sizeof(pool) * 8));memzero_explicit (pool,sizeof (pool)); }
@@ -999,10 +1002,11 @@ void add_interrupt_randomness(int irq)if (new_count <1024 && !time_is_before_jiffies (fast_pool->last +HZ ))return ; -if (unlikely (!fast_pool->mix.func)) -INIT_WORK (&fast_pool->mix, mix_interrupt_randomness); fast_pool->count |=MIX_INFLIGHT ; -queue_work_on (raw_smp_processor_id (), system_highpri_wq, &fast_pool->mix); +if (!timer_pending (&fast_pool->mix)) { + fast_pool->mix.expires = jiffies; +add_timer_on (&fast_pool->mix,raw_smp_processor_id ()); + } }EXPORT_SYMBOL_GPL (add_interrupt_randomness);
@@ -1294,6 +1298,11 @@ static ssize_t random_read_iter(struct kiocb *kiocb, struct iov_iter *iter) {int ret; +if (!crng_ready () && + ((kiocb->ki_flags &IOCB_NOWAIT ) || + (kiocb->ki_filp->f_flags &O_NONBLOCK ))) +return -EAGAIN ; + ret =wait_for_random_bytes ();if (ret !=0 )return ret;
drivers/dma/xilinx/xilinx_dma.c +6 -2
@@ -2683,7 +2683,7 @@ static int xilinx_dma_probe(struct platform_device *pdev)if (err <0 ) {dev_err (xdev->dev,"missing xlnx,num-fstores property\n" ); -return err; + goto disable_clks; } err = of_property_read_u32(node, "xlnx,flush-fsync",
@@ -2703,7 +2703,11 @@ static int xilinx_dma_probe(struct platform_device *pdev) xdev->ext_addr = false;/* Set the dma mask bits */ -dma_set_mask_and_coherent (xdev->dev,DMA_BIT_MASK (addr_width)); + err =dma_set_mask_and_coherent (xdev->dev,DMA_BIT_MASK (addr_width)); +if (err <0 ) { +dev_err (xdev->dev,"DMA mask error %d\n" , err); + goto disable_clks; + }/* Initialize the DMA engine */ xdev->common.dev = &pdev->dev;
drivers/firmware/arm_scmi/scmi_pm_domain.c +20 -0
@@ -106,9 +106,28 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev) scmi_pd_data->domains = domains; scmi_pd_data->num_domains = num_domains; +dev_set_drvdata (dev, scmi_pd_data); +return of_genpd_add_provider_onecell (np, scmi_pd_data); } +static void scmi_pm_domain_remove (struct scmi_device *sdev) +{ +int i; +struct genpd_onecell_data *scmi_pd_data; +struct device *dev = &sdev->dev; +struct device_node *np = dev->of_node; + +of_genpd_del_provider (np); + + scmi_pd_data =dev_get_drvdata (dev); +for (i =0 ; i < scmi_pd_data->num_domains; i++) { +if (!scmi_pd_data->domains[i]) +continue ; +pm_genpd_remove (scmi_pd_data->domains[i]); + } +} +static const struct scmi_device_id scmi_id_table[] = { {SCMI_PROTOCOL_POWER }, { },
@@ -118,6 +137,7 @@ MODULE_DEVICE_TABLE(scmi, scmi_id_table);static struct scmi_driver scmi_power_domain_driver = { .name ="scmi-power-domain" , .probe = scmi_pm_domain_probe, + .remove = scmi_pm_domain_remove, .id_table = scmi_id_table, };module_scmi_driver (scmi_power_domain_driver);
drivers/input/joystick/xpad.c +19 -1
@@ -112,6 +112,8 @@ static const struct xpad_device {u8 xtype; } xpad_device[] = { { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 }, + { 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 }, + { 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 }, { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
@@ -242,6 +244,7 @@ static const struct xpad_device { { 0x0f0d, 0x0063, "Hori Real Arcade Pro Hayabusa (USA) Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, { 0x0f0d, 0x0067, "HORIPAD ONE", 0, XTYPE_XBOXONE }, { 0x0f0d, 0x0078, "Hori Real Arcade Pro V Kai Xbox One", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, + { 0x0f0d, 0x00c5, "Hori Fighting Commander ONE", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, { 0x0f30, 0x010b, "Philips Recoil", 0, XTYPE_XBOX }, { 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX }, { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX },
@@ -258,6 +261,7 @@ static const struct xpad_device { { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x1430, 0xf801, "RedOctane Controller", 0, XTYPE_XBOX360 }, { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 }, + { 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 }, { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE },
@@ -322,6 +326,7 @@ static const struct xpad_device { { 0x24c6, 0x5502, "Hori Fighting Stick VX Alt", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x5503, "Hori Fighting Edge", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x5506, "Hori SOULCALIBUR V Stick", 0, XTYPE_XBOX360 }, + { 0x24c6, 0x5510, "Hori Fighting Commander ONE (Xbox 360/PC Mode)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x550d, "Hori GEM Xbox controller", 0, XTYPE_XBOX360 }, { 0x24c6, 0x550e, "Hori Real Arcade Pro V Kai 360", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x24c6, 0x551a, "PowerA FUSION Pro Controller", 0, XTYPE_XBOXONE },
@@ -331,6 +336,14 @@ static const struct xpad_device { { 0x24c6, 0x5b03, "Thrustmaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 }, { 0x24c6, 0x5d04, "Razer Sabertooth", 0, XTYPE_XBOX360 }, { 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, + { 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 }, + { 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE }, + { 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1220, "Wooting Two HE", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 }, { 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 }, { 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX }, { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
@@ -416,6 +429,7 @@ static const signed short xpad_abs_triggers[] = {static const struct usb_device_id xpad_table[] = { {USB_INTERFACE_INFO ('X' ,'B' ,0 ) },/* X-Box USB-IF not approved class */ XPAD_XBOX360_VENDOR (0x0079 ),/* GPD Win 2 Controller */ +XPAD_XBOX360_VENDOR (0x03eb ),/* Wooting Keyboards (Legacy) */ XPAD_XBOX360_VENDOR (0x044f ),/* Thrustmaster X-Box 360 controllers */ XPAD_XBOX360_VENDOR (0x045e ),/* Microsoft X-Box 360 controllers */ XPAD_XBOXONE_VENDOR (0x045e ),/* Microsoft X-Box One controllers */
@@ -426,6 +440,7 @@ static const struct usb_device_id xpad_table[] = { { USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */XPAD_XBOXONE_VENDOR (0x0738 ),/* Mad Catz FightStick TE 2 */ XPAD_XBOX360_VENDOR (0x07ff ),/* Mad Catz GamePad */ +XPAD_XBOX360_VENDOR (0x0c12 ),/* Zeroplus X-Box 360 controllers */ XPAD_XBOX360_VENDOR (0x0e6f ),/* 0x0e6f X-Box 360 controllers */ XPAD_XBOXONE_VENDOR (0x0e6f ),/* 0x0e6f X-Box One controllers */ XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
@@ -446,8 +461,12 @@ static const struct usb_device_id xpad_table[] = {XPAD_XBOXONE_VENDOR (0x20d6 ),/* PowerA Controllers */ XPAD_XBOX360_VENDOR (0x24c6 ),/* PowerA Controllers */ XPAD_XBOXONE_VENDOR (0x24c6 ),/* PowerA Controllers */ +XPAD_XBOX360_VENDOR (0x2563 ),/* OneXPlayer Gamepad */ +XPAD_XBOX360_VENDOR (0x260d ),/* Dareu H101 */ +XPAD_XBOXONE_VENDOR (0x2dc8 ),/* 8BitDo Pro 2 Wired Controller for Xbox */ XPAD_XBOXONE_VENDOR (0x2e24 ),/* Hyperkin Duke X-Box One pad */ XPAD_XBOX360_VENDOR (0x2f24 ),/* GameSir Controllers */ +XPAD_XBOX360_VENDOR (0x31e3 ),/* Wooting Keyboards */ XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */ { } };
@@ -1964,7 +1983,6 @@ static struct usb_driver xpad_driver = { .disconnect = xpad_disconnect, .suspend = xpad_suspend, .resume = xpad_resume, - .reset_resume = xpad_resume, .id_table = xpad_table, };
drivers/mmc/core/sd.c +2 -1
@@ -799,7 +799,8 @@ int mmc_sd_get_cid(struct mmc_host *host, u32 ocr, u32 *cid, u32 *rocr)* the CCS bit is set as well. We deliberately deviate from the spec in * regards to this, which allows UHS-I to be supported for SDSC cards. */ -if (!mmc_host_is_spi (host) && rocr && (*rocr &0x01000000 )) { +if (!mmc_host_is_spi (host) && (ocr &SD_OCR_S18R ) && + rocr && (*rocr &SD_ROCR_S18A )) { err =mmc_set_uhs_voltage (host, pocr);if (err == -EAGAIN ) { retries--;
drivers/net/wireless/mac80211_hwsim.c +2 -0
@@ -3411,6 +3411,8 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2, rx_status.band = data2->channel->band; rx_status.rate_idx =nla_get_u32 (info->attrs[HWSIM_ATTR_RX_RATE ]); +if (rx_status.rate_idx >= data2->hw->wiphy->bands[rx_status.band]->n_bitrates) + goto out; rx_status.signal =nla_get_u32 (info->attrs[HWSIM_ATTR_SIGNAL ]); hdr = (void *)skb->data;
drivers/rpmsg/qcom_glink_native.c +1 -1
@@ -1472,7 +1472,7 @@ static void qcom_glink_rx_close(struct qcom_glink *glink, unsigned int rcid)cancel_work_sync (&channel->intent_work);if (channel->rpdev) { -strncpy (chinfo.name, channel->name,sizeof (chinfo.name)); +strscpy_pad (chinfo.name, channel->name,sizeof (chinfo.name)); chinfo.src =RPMSG_ADDR_ANY ; chinfo.dst =RPMSG_ADDR_ANY ;
drivers/rpmsg/qcom_smd.c +2 -2
@@ -1073,7 +1073,7 @@ static int qcom_smd_create_device(struct qcom_smd_channel *channel)/* Assign public information to the rpmsg_device */ rpdev = &qsdev->rpdev; -strncpy (rpdev->id.name, channel->name,RPMSG_NAME_SIZE ); +strscpy_pad (rpdev->id.name, channel->name,RPMSG_NAME_SIZE ); rpdev->src =RPMSG_ADDR_ANY ; rpdev->dst =RPMSG_ADDR_ANY ;
@@ -1304,7 +1304,7 @@ static void qcom_channel_state_worker(struct work_struct *work)spin_unlock_irqrestore (&edge->channels_lock, flags); -strncpy (chinfo.name, channel->name,sizeof (chinfo.name)); +strscpy_pad (chinfo.name, channel->name,sizeof (chinfo.name)); chinfo.src =RPMSG_ADDR_ANY ; chinfo.dst =RPMSG_ADDR_ANY ;rpmsg_unregister_device (&edge->dev, &chinfo);
drivers/scsi/qedf/qedf_main.c +0 -5
@@ -3544,11 +3544,6 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) err1:scsi_host_put (lport->host); err0: -if (qedf) { -QEDF_INFO (&qedf->dbg_ctx,QEDF_LOG_DISC ,"Probe done.\n" ); - -clear_bit (QEDF_PROBING , &qedf->flags); - }return rc; }
drivers/scsi/stex.c +9 -8
@@ -668,16 +668,17 @@ stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))return 0 ;case PASSTHRU_CMD :if (cmd->cmnd[1 ] ==PASSTHRU_GET_DRVVER ) { -struct st_drvver ver; +const struct st_drvver ver = { + .major =ST_VER_MAJOR , + .minor =ST_VER_MINOR , + .oem =ST_OEM , + .build =ST_BUILD_VER , + .signature[0 ] =PASSTHRU_SIGNATURE , + .console_id = host->max_id -1 , + .host_no = hba->host->host_no, + };size_t cp_len =sizeof (ver); - ver.major =ST_VER_MAJOR ; - ver.minor =ST_VER_MINOR ; - ver.oem =ST_OEM ; - ver.build =ST_BUILD_VER ; - ver.signature[0 ] =PASSTHRU_SIGNATURE ; - ver.console_id = host->max_id -1 ; - ver.host_no = hba->host->host_no; cp_len =scsi_sg_copy_from_buffer (cmd, &ver, cp_len); cmd->result =sizeof (ver) == cp_len ? DID_OK << 16 | COMMAND_COMPLETE << 8 :
drivers/usb/mon/mon_bin.c +5 -0
@@ -1268,6 +1268,11 @@ static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {/* don't do anything here: "fault" will set up page table entries */ vma->vm_ops = &mon_bin_vm_ops; + +if (vma->vm_flags &VM_WRITE ) +return -EPERM ; + + vma->vm_flags &= ~VM_MAYWRITE ; vma->vm_flags |=VM_DONTEXPAND |VM_DONTDUMP ; vma->vm_private_data = filp->private_data;mon_bin_vma_open (vma);
drivers/usb/serial/ftdi_sio.c +1 -2
@@ -1320,8 +1320,7 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,case 38400 : div_value = ftdi_sio_b38400;break ;case 57600 : div_value = ftdi_sio_b57600;break ;case 115200 : div_value = ftdi_sio_b115200;break ; - }/* baud */ -if (div_value ==0 ) { +default :dev_dbg (dev,"%s - Baudrate (%d) requested is not supported\n" , __func__, baud); div_value = ftdi_sio_b9600;
drivers/usb/serial/qcserial.c +1 -0
@@ -177,6 +177,7 @@ static const struct usb_device_id id_table[] = { {DEVICE_SWI(0x413c, 0x81b3)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */ {DEVICE_SWI(0x413c, 0x81b5)}, /* Dell Wireless 5811e QDL */ {DEVICE_SWI(0x413c, 0x81b6)}, /* Dell Wireless 5811e QDL */ + {DEVICE_SWI(0x413c, 0x81c2)}, /* Dell Wireless 5811e */ {DEVICE_SWI(0x413c, 0x81cb)}, /* Dell Wireless 5816e QDL */ {DEVICE_SWI(0x413c, 0x81cc)}, /* Dell Wireless 5816e */ {DEVICE_SWI(0x413c, 0x81cf)}, /* Dell Wireless 5819 */
fs/ceph/file.c +7 -3
@@ -452,6 +452,12 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,if (dentry->d_name.len >NAME_MAX )return -ENAMETOOLONG ; +/* +* Do not truncate the file, since atomic_open is called before the +* permission check. The caller will do the truncation afterward. +*/ + flags &= ~O_TRUNC ; +if (flags &O_CREAT ) {if (ceph_quota_is_max_files_exceeded (dir))return -EDQUOT ;
@@ -490,9 +496,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, req->r_parent = dir;set_bit (CEPH_MDS_R_PARENT_LOCKED , &req->r_req_flags); - err =ceph_mdsc_do_request (mdsc, - (flags & (O_CREAT |O_TRUNC )) ? dir :NULL , - req); + err =ceph_mdsc_do_request (mdsc, (flags &O_CREAT ) ? dir :NULL , req); err =ceph_handle_snapdir (req, dentry, err);if (err) goto out_req;
fs/inode.c +3 -4
@@ -167,8 +167,6 @@ int inode_init_always(struct super_block *sb, struct inode *inode) inode->i_wb_frn_history =0 ;#endif -if (security_inode_alloc (inode)) - goto out;spin_lock_init (&inode->i_lock);lockdep_set_class (&inode->i_lock, &sb->s_type->i_lock_key);
@@ -199,11 +197,12 @@ int inode_init_always(struct super_block *sb, struct inode *inode) inode->i_fsnotify_mask =0 ;#endif inode->i_flctx =NULL ; + +if (unlikely (security_inode_alloc (inode))) +return -ENOMEM ;this_cpu_inc (nr_inodes);return 0 ; -out: -return -ENOMEM ; }EXPORT_SYMBOL (inode_init_always);
fs/nilfs2/inode.c +2 -0
@@ -451,6 +451,8 @@ int nilfs_read_inode_common(struct inode *inode, inode->i_atime.tv_nsec =le32_to_cpu (raw_inode->i_mtime_nsec); inode->i_ctime.tv_nsec =le32_to_cpu (raw_inode->i_ctime_nsec); inode->i_mtime.tv_nsec =le32_to_cpu (raw_inode->i_mtime_nsec); +if (nilfs_is_metadata_file_inode (inode) && !S_ISREG (inode->i_mode)) +return -EIO ;/* this inode is for metadata and corrupted */ if (inode->i_nlink ==0 )return -ESTALE ;/* this inode is deleted */
fs/nilfs2/segment.c +13 -8
@@ -880,9 +880,11 @@ static int nilfs_segctor_create_checkpoint(struct nilfs_sc_info *sci)nilfs_mdt_mark_dirty (nilfs->ns_cpfile);nilfs_cpfile_put_checkpoint ( nilfs->ns_cpfile, nilfs->ns_cno, bh_cp); - }else -WARN_ON (err == -EINVAL || err == -ENOENT ); - + }else if (err == -EINVAL || err == -ENOENT ) { +nilfs_error (sci->sc_super, +"checkpoint creation failed due to metadata corruption." ); + err = -EIO ; + }return err; }
@@ -896,7 +898,11 @@ static int nilfs_segctor_fill_in_checkpoint(struct nilfs_sc_info *sci) err =nilfs_cpfile_get_checkpoint (nilfs->ns_cpfile, nilfs->ns_cno,0 , &raw_cp, &bh_cp);if (unlikely (err)) { -WARN_ON (err == -EINVAL || err == -ENOENT ); +if (err == -EINVAL || err == -ENOENT ) { +nilfs_error (sci->sc_super, +"checkpoint finalization failed due to metadata corruption." ); + err = -EIO ; + } goto failed_ibh; } raw_cp->cp_snapshot_list.ssl_next =0 ;
@@ -2786,10 +2792,9 @@ int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root)inode_attach_wb (nilfs->ns_bdev->bd_inode,NULL ); err =nilfs_segctor_start_thread (nilfs->ns_writer); -if (err) { -kfree (nilfs->ns_writer); - nilfs->ns_writer =NULL ; - } +if (unlikely (err)) +nilfs_detach_log_writer (sb); +return err; }
include/net/ieee802154_netdev.h +37 -0
@@ -15,6 +15,22 @@#ifndef IEEE802154_NETDEVICE_H #define IEEE802154_NETDEVICE_H +#define IEEE802154_REQUIRED_SIZE (struct_type, member) \ + (offsetof(typeof(struct_type), member) + \ + sizeof(((typeof(struct_type) *)(NULL))->member)) + +#define IEEE802154_ADDR_OFFSET \ + offsetof(typeof(struct sockaddr_ieee802154), addr) + +#define IEEE802154_MIN_NAMELEN (IEEE802154_ADDR_OFFSET + \ + IEEE802154_REQUIRED_SIZE(struct ieee802154_addr_sa, addr_type)) + +#define IEEE802154_NAMELEN_SHORT (IEEE802154_ADDR_OFFSET + \ + IEEE802154_REQUIRED_SIZE(struct ieee802154_addr_sa, short_addr)) + +#define IEEE802154_NAMELEN_LONG (IEEE802154_ADDR_OFFSET + \ + IEEE802154_REQUIRED_SIZE(struct ieee802154_addr_sa, hwaddr)) +#include <net/af_ieee802154.h> #include <linux/netdevice.h> #include <linux/skbuff.h>
@@ -165,6 +181,27 @@ static inline void ieee802154_devaddr_to_raw(void *raw, __le64 addr)memcpy (raw, &temp,IEEE802154_ADDR_LEN ); } +static inline int +ieee802154_sockaddr_check_size (struct sockaddr_ieee802154 *daddr,int len) +{ +struct ieee802154_addr_sa *sa; + + sa = &daddr->addr; +if (len <IEEE802154_MIN_NAMELEN ) +return -EINVAL ; +switch (sa->addr_type) { +case IEEE802154_ADDR_SHORT : +if (len <IEEE802154_NAMELEN_SHORT ) +return -EINVAL ; +break ; +case IEEE802154_ADDR_LONG : +if (len <IEEE802154_NAMELEN_LONG ) +return -EINVAL ; +break ; + } +return 0 ; +} +static inline void ieee802154_addr_from_sa (struct ieee802154_addr *a,const struct ieee802154_addr_sa *sa) {
include/scsi/scsi_cmnd.h +1 -1
@@ -204,7 +204,7 @@ static inline int scsi_get_resid(struct scsi_cmnd *cmd)for_each_sg (scsi_sglist (cmd), sg, nseg, __i) static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, -void *buf,int buflen) +const void *buf,int buflen) {return sg_copy_from_buffer (scsi_sglist (cmd),scsi_sg_count (cmd), buf, buflen);
mm/pagewalk.c +8 -5
@@ -38,7 +38,7 @@ static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, do { again: next = pmd_addr_end(addr, end); - if (pmd_none(*pmd) || !walk->vma) { + if (pmd_none(*pmd)) { if (ops->pte_hole) err = ops->pte_hole(addr, next, walk); if (err)
@@ -84,7 +84,7 @@ static int walk_pud_range(p4d_t *p4d, unsigned long addr, unsigned long end, do { again: next = pud_addr_end(addr, end); - if (pud_none(*pud) || !walk->vma) { + if (pud_none(*pud)) { if (ops->pte_hole) err = ops->pte_hole(addr, next, walk); if (err)
@@ -254,7 +254,7 @@ static int __walk_page_range(unsigned long start, unsigned long end,int err =0 ;struct vm_area_struct *vma = walk->vma; -if (vma &&is_vm_hugetlb_page (vma)) { +if (is_vm_hugetlb_page (vma)) {if (walk->ops->hugetlb_entry) err =walk_hugetlb_range (start, end, walk); }else
@@ -324,9 +324,13 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,if (!vma) {/* after the last vma */ walk.vma =NULL ; next = end; +if (ops->pte_hole) + err = ops->pte_hole (start, next, &walk); }else if (start < vma->vm_start) {/* outside vma */ walk.vma =NULL ; next =min (end, vma->vm_start); +if (ops->pte_hole) + err = ops->pte_hole (start, next, &walk); }else {/* inside vma */ walk.vma = vma; next =min (end, vma->vm_end);
@@ -344,9 +348,8 @@ int walk_page_range(struct mm_struct *mm, unsigned long start, }if (err <0 )break ; - } -if (walk.vma || walk.ops->pte_hole) err =__walk_page_range (start, next, &walk); + }if (err)break ; }while (start = next, start < end);
net/ieee802154/socket.c +23 -19
78 lines not on this page · raw message
net/mac80211/util.c +2 -0
@@ -1289,6 +1289,8 @@ static size_t ieee802_11_find_bssid_profile(const u8 *start, size_t len,for_each_element_id (elem,WLAN_EID_MULTIPLE_BSSID , start, len) {if (elem->datalen <2 )continue ; +if (elem->data[0 ] <1 || elem->data[0 ] >8 ) +continue ;for_each_element (sub, elem->data +1 , elem->datalen -1 ) {u8 new_bssid[ETH_ALEN ];
net/wireless/scan.c +50 -27
152 lines not on this page · raw message
security/integrity/platform_certs/load_uefi.c +1 -1
@@ -30,7 +30,7 @@ static const struct dmi_system_id uefi_skip_cert[] = { { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir8,1") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir8,2") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir9,1") }, - { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacMini8,1") }, + { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "Macmini8,1") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacPro7,1") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "iMac20,1") }, { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "iMac20,2") },
sound/pci/hda/hda_intel.c +2 -1
@@ -2532,7 +2532,8 @@ static const struct pci_device_id azx_ids[] = { .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },/* Poulsbo */ { PCI_DEVICE(0x8086, 0x811b), - .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE }, + .driver_data =AZX_DRIVER_SCH |AZX_DCAPS_INTEL_PCH_BASE | + AZX_DCAPS_POSFIX_LPIB }, /* Oaktrail */ { PCI_DEVICE(0x8086, 0x080a), .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE },
tools/perf/util/get_current_dir_name.c +2 -1
@@ -3,8 +3,9 @@// #ifndef HAVE_GET_CURRENT_DIR_NAME #include "get_current_dir_name.h" +#include <limits.h> +#include <string.h> #include <unistd.h> -#include <stdlib.h> /* Android's 'bionic' library, for one, doesn't have this */