Linux 4.14.109
Greg KH
maintainerI'm announcing the release of the 4.14.109 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:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/mips/include/asm/jump_label.h | 8 +- arch/mips/kernel/vmlinux.lds.S | 12 +-- arch/mips/loongson64/lemote-2f/irq.c | 2 arch/x86/include/asm/unwind.h | 6 + arch/x86/kernel/unwind_frame.c | 25 +++++- arch/x86/kernel/unwind_orc.c | 17 ++++ drivers/bluetooth/hci_h4.c | 4 + drivers/bluetooth/hci_ldisc.c | 24 +++--- drivers/gpu/drm/drm_mode_object.c | 5 - drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 12 --- drivers/iommu/amd_iommu.c | 7 + drivers/media/usb/uvc/uvc_ctrl.c | 2 drivers/media/v4l2-core/v4l2-ctrls.c | 2 drivers/mmc/host/pxamci.c | 2 drivers/net/wireless/ath/ath10k/wmi.c | 2 drivers/pci/dwc/pcie-designware-ep.c | 12 ++- drivers/pci/dwc/pcie-designware.h | 1 drivers/pci/endpoint/pci-epc-core.c | 10 -- drivers/pci/endpoint/pci-epf-core.c | 4 - drivers/power/supply/charger-manager.c | 3 drivers/rtc/rtc-lib.c | 6 - drivers/scsi/ibmvscsi/ibmvscsi.c | 23 ++++- drivers/scsi/ufs/ufshcd.c | 14 ++- drivers/usb/core/config.c | 9 +- drivers/video/backlight/pwm_bl.c | 9 +- fs/ext4/ext4_jbd2.h | 2 fs/ext4/file.c | 2 fs/ext4/indirect.c | 12 ++- fs/udf/truncate.c | 3 include/linux/ceph/libceph.h | 2 kernel/futex.c | 4 + kernel/locking/lockdep.c | 3 kernel/sched/cpufreq_schedutil.c | 3 lib/int_sqrt.c | 3 net/bluetooth/hci_sock.c | 3 net/bridge/netfilter/ebtables.c | 131 +++++++++------------------------ net/ceph/ceph_common.c | 18 ++++ net/ceph/mon_client.c | 9 ++ sound/pci/hda/hda_codec.c | 57 +++++++++++++- sound/x86/intel_hdmi_audio.c | 1 tools/objtool/check.c | 3 tools/perf/util/probe-event.c | 6 + 43 files changed, 301 insertions(+), 184 deletions(-)
Adrian Hunter (1):
perf probe: Fix getting the kernel map
Andrey Konovalov (1):
USB: core: only clean up what we allocated
Archer Yan (1):
MIPS: Fix kernel crash for R6 in jump label branch function
Arnd Bergmann (2):
mmc: pxamci: fix enum type confusion
ath10k: avoid possible string overflow
Baolin Wang (2):
rtc: Fix overflow when converting time64_t to rtc_time
power: supply: charger-manager: Fix incorrect return value
Chen Jie (1):
futex: Ensure that futex address is aligned in handle_futex_death()
Chris Wilson (1):
drm: Reorder set_property_atomic to avoid returning with an active ww_ctx
Enric Balletbo i Serra (1):
pwm-backlight: Enable/disable the PWM before/after LCD enable toggle.
Florian Westphal (1):
netfilter: ebtables: remove BUGPRINT messages
Greg Kroah-Hartman (1):
Linux 4.14.109
Hans Verkuil (1):
media: v4l2-ctrls.c/uvc: zero v4l2_event
Hui Wang (1):
ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec
Ilya Dryomov (1):
libceph: wait for latest osdmap in ceph_monc_blacklist_add()
Jan Kara (1):
udf: Fix crash on IO error during truncate
Jann Horn (2):
x86/unwind: Handle NULL pointer calls better in frame unwinder x86/unwind: Add hardcoded ORC entry for NULL
Jeremy Cline (1):
Bluetooth: hci_ldisc: Initialize hci_dev before open()
Jiufei Xue (1):
ext4: fix NULL pointer dereference while journal is aborted
Josh Poimboeuf (1):
objtool: Move objtool_file struct off the stack
Jules Maselbas (1):
sched/cpufreq/schedutil: Fix error path mutex unlock
Kefeng Wang (1):
Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
Kishon Vijay Abraham I (1):
PCI: endpoint: Use EPC's device in dma_alloc_coherent()/dma_free_coherent()
Lukas Czerner (1):
ext4: fix data corruption caused by unaligned direct AIO
Myungho Jung (2):
Bluetooth: hci_uart: Check if socket buffer is ERR_PTR in h4_recv_buf()
Bluetooth: Fix decrementing reference count twice in releasing socket
Niklas Cassel (2):
PCI: designware-ep: dw_pcie_ep_set_msi() should only set MMC bits
PCI: designware-ep: Read-only registers need DBI_RO_WR_EN to be writable
Peter Zijlstra (1):
lib/int_sqrt: optimize small argument
Stanislaw Gruszka (1):
iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE
Takashi Iwai (1):
ALSA: hda - Record the current power state before suspend/resume calls
Thomas Zimmermann (1):
drm/vmwgfx: Don't double-free the mode stored in par->set_mode
Tyrel Datwyler (2):
scsi: ibmvscsi: Protect ibmvscsi_head from concurrent modificaiton
scsi: ibmvscsi: Fix empty event pool access during host removal
Ville Syrjälä (1):
ALSA: x86: Fix runtime PM for hdmi-lpe-audio
Waiman Long (1):
locking/lockdep: Add debug_locks check in __lock_downgrade()
Yasha Cherikovsky (1):
MIPS: Ensure ELF appended dtb is relocated
Yifeng Li (1):
mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction.
kehuanlin (1):
scsi: ufs: fix wrong command type of UTRD for UFSHCI v2.1
zhangyi (F) (1):
ext4: brelse all indirect buffer in ext4_ind_remove_space()
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 108 +SUBLEVEL = 109 EXTRAVERSION = NAME = Petit Gorille
arch/mips/include/asm/jump_label.h +4 -4
@@ -21,15 +21,15 @@#endif #ifdef CONFIG_CPU_MICROMIPS -#define NOP_INSN "nop32" +#define B_INSN "b32"#else -#define NOP_INSN "nop" +#define B_INSN "b"#endif static __always_inline bool arch_static_branch(struct static_key *key, bool branch) { -asm_volatile_goto ("1:\t" NOP_INSN "\n\t" -"nop\n\t" +asm_volatile_goto ("1:\t" B_INSN " 2f\n\t" +"2:\tnop\n\t" ".pushsection __jump_table, \"aw\"\n\t" WORD_INSN " 1b, %l[l_yes], %0\n\t" ".popsection\n\t"
arch/mips/kernel/vmlinux.lds.S +7 -5
@@ -140,6 +140,13 @@ SECTIONS PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT) #endif +#ifdef CONFIG_MIPS_ELF_APPENDED_DTB + .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) { + *(.appended_dtb) + KEEP(*(.appended_dtb)) + } +#endif + #ifdef CONFIG_RELOCATABLE . = ALIGN(4);
@@ -164,11 +171,6 @@ SECTIONS __appended_dtb = .; /* leave space for appended DTB */ . += 0x100000; -#elif defined(CONFIG_MIPS_ELF_APPENDED_DTB) - .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) { - *(.appended_dtb) - KEEP(*(.appended_dtb)) - } #endif /* * Align to 64K in attempt to eliminate holes before the
arch/mips/loongson64/lemote-2f/irq.c +1 -1
@@ -103,7 +103,7 @@ static struct irqaction ip6_irqaction = {static struct irqaction cascade_irqaction = { .handler = no_action, .name ="cascade" , - .flags =IRQF_NO_THREAD , + .flags =IRQF_NO_THREAD |IRQF_NO_SUSPEND , };void __init mach_init_irq (void )
arch/x86/include/asm/unwind.h +6 -0
@@ -23,6 +23,12 @@ struct unwind_state {#elif defined(CONFIG_UNWINDER_FRAME_POINTER )bool got_irq;unsigned long *bp, *orig_sp, ip; +/* +* If non-NULL: The current frame is incomplete and doesn't contain a +* valid BP. When looking for the next frame, use this instead of the +* non-existent saved BP. +*/ +unsigned long *next_bp;struct pt_regs *regs;#else unsigned long *sp;
arch/x86/kernel/unwind_frame.c +22 -3
@@ -320,10 +320,14 @@ bool unwind_next_frame(struct unwind_state *state) }/* Get the next frame pointer: */ -if (state->regs) +if (state->next_bp) { + next_bp = state->next_bp; + state->next_bp =NULL ; + }else if (state->regs) { next_bp = (unsigned long *)state->regs->bp; -else + }else { next_bp = (unsigned long *)READ_ONCE_TASK_STACK (state->task, *state->bp); + }/* Move to the next frame if it's safe: */ if (!update_stack_state (state, next_bp))
@@ -398,6 +402,21 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task, bp =get_frame_pointer (task, regs); +/* +* If we crash with IP==0, the last successfully executed instruction +* was probably an indirect function call with a NULL function pointer. +* That means that SP points into the middle of an incomplete frame: +* *SP is a return pointer, and *(SP-sizeof(unsigned long)) is where we +* would have written a frame pointer if we hadn't crashed. +* Pretend that the frame is complete and that BP points to it, but save +* the real BP so that we can use it when looking for the next frame. +*/ +if (regs && regs->ip ==0 && + (unsigned long *)kernel_stack_pointer (regs) >= first_frame) { + state->next_bp = bp; + bp = ((unsigned long *)kernel_stack_pointer (regs)) -1 ; + } +/* Initialize stack info and make sure the frame data is accessible: */ get_stack_info (bp, state->task, &state->stack_info, &state->stack_mask);
@@ -410,7 +429,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,*/ while (!unwind_done (state) && (!on_stack (&state->stack_info, first_frame,sizeof (long )) || - state->bp < first_frame)) + (state->next_bp ==NULL && state->bp < first_frame)))unwind_next_frame (state); }EXPORT_SYMBOL_GPL (__unwind_start);
arch/x86/kernel/unwind_orc.c +17 -0
@@ -74,11 +74,28 @@ static struct orc_entry *orc_module_find(unsigned long ip) }#endif +/* +* If we crash with IP==0, the last successfully executed instruction +* was probably an indirect function call with a NULL function pointer, +* and we don't have unwind information for NULL. +* This hardcoded ORC entry for IP==0 allows us to unwind from a NULL function +* pointer into its parent and then continue normally from there. +*/ +static struct orc_entry null_orc_entry = { + .sp_offset =sizeof (long ), + .sp_reg =ORC_REG_SP , + .bp_reg =ORC_REG_UNDEFINED , + .type =ORC_TYPE_CALL +}; +static struct orc_entry *orc_find (unsigned long ip) {if (!orc_init)return NULL ; +if (ip ==0 ) +return &null_orc_entry; +/* For non-init vmlinux addresses, use the fast lookup table: */ if (ip >=LOOKUP_START_IP && ip <LOOKUP_STOP_IP ) {unsigned int idx, start, stop;
drivers/bluetooth/hci_h4.c +4 -0
@@ -174,6 +174,10 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,struct hci_uart *hu =hci_get_drvdata (hdev);u8 alignment = hu->alignment ? hu->alignment :1 ; +/* Check for error from previous call */ +if (IS_ERR (skb)) + skb =NULL ; +while (count) {int i, len;
drivers/bluetooth/hci_ldisc.c +15 -9
@@ -207,11 +207,11 @@ static void hci_uart_init_work(struct work_struct *work) err =hci_register_dev (hu->hdev);if (err <0 ) {BT_ERR ("Can't register HCI device" ); +clear_bit (HCI_UART_PROTO_READY , &hu->flags); + hu->proto->close (hu); hdev = hu->hdev; hu->hdev =NULL ;hci_free_dev (hdev); -clear_bit (HCI_UART_PROTO_READY , &hu->flags); - hu->proto->close (hu);return ; }
@@ -612,6 +612,7 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data,static int hci_uart_register_dev (struct hci_uart *hu) {struct hci_dev *hdev; +int err;BT_DBG ("" );
@@ -655,11 +656,22 @@ static int hci_uart_register_dev(struct hci_uart *hu)else hdev->dev_type =HCI_PRIMARY ; +/* Only call open() for the protocol after hdev is fully initialized as +* open() (or a timer/workqueue it starts) may attempt to reference it. +*/ + err = hu->proto->open (hu); +if (err) { + hu->hdev =NULL ; +hci_free_dev (hdev); +return err; + } +if (test_bit (HCI_UART_INIT_PENDING , &hu->hdev_flags))return 0 ;if (hci_register_dev (hdev) <0 ) {BT_ERR ("Can't register HCI device" ); + hu->proto->close (hu); hu->hdev =NULL ;hci_free_dev (hdev);return -ENODEV ;
@@ -679,20 +691,14 @@ static int hci_uart_set_proto(struct hci_uart *hu, int id)if (!p)return -EPROTONOSUPPORT ; - err = p->open (hu); -if (err) -return err; - hu->proto = p; -set_bit (HCI_UART_PROTO_READY , &hu->flags); err =hci_uart_register_dev (hu);if (err) { -clear_bit (HCI_UART_PROTO_READY , &hu->flags); - p->close (hu);return err; } +set_bit (HCI_UART_PROTO_READY , &hu->flags);return 0 ; }
drivers/gpu/drm/drm_mode_object.c +3 -2
@@ -432,12 +432,13 @@ static int set_property_atomic(struct drm_mode_object *obj,struct drm_modeset_acquire_ctx ctx;int ret; -drm_modeset_acquire_init (&ctx,0 ); - state =drm_atomic_state_alloc (dev);if (!state)return -ENOMEM ; + +drm_modeset_acquire_init (&ctx,0 ); state->acquire_ctx = &ctx; + retry:if (prop == state->dev->mode_config.dpms_property) {if (obj->type !=DRM_MODE_OBJECT_CONNECTOR ) {
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +3 -9
@@ -588,11 +588,9 @@ static int vmw_fb_set_par(struct fb_info *info)0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }; -struct drm_display_mode *old_mode;struct drm_display_mode *mode;int ret; - old_mode = par->set_mode; mode =drm_mode_duplicate (vmw_priv->dev, &new_mode);if (!mode) {DRM_ERROR ("Could not create new fb mode.\n" );
@@ -603,11 +601,7 @@ static int vmw_fb_set_par(struct fb_info *info) mode->vdisplay = var->yres;vmw_guess_mode_timing (mode); -if (old_mode &&drm_mode_equal (old_mode, mode)) { -drm_mode_destroy (vmw_priv->dev, mode); - mode = old_mode; - old_mode =NULL ; - }else if (!vmw_kms_validate_mode_vram (vmw_priv, +if (!vmw_kms_validate_mode_vram (vmw_priv, mode->hdisplay *DIV_ROUND_UP (var->bits_per_pixel,8 ), mode->vdisplay)) {
@@ -677,8 +671,8 @@ static int vmw_fb_set_par(struct fb_info *info)schedule_delayed_work (&par->local_work,0 ); out_unlock: -if (old_mode) -drm_mode_destroy (vmw_priv->dev, old_mode); +if (par->set_mode) +drm_mode_destroy (vmw_priv->dev, par->set_mode); par->set_mode = mode;drm_modeset_unlock_all (vmw_priv->dev);
drivers/iommu/amd_iommu.c +6 -1
@@ -2548,7 +2548,12 @@ static int map_sg(struct device *dev, struct scatterlist *sglist,/* Everything is mapped - write the right values into s->dma_address */ for_each_sg (sglist, s, nelems, i) { - s->dma_address += address + s->offset; +/* +* Add in the remaining piece of the scatter-gather offset that +* was masked out when we were determining the physical address +* via (sg_phys(s) & PAGE_MASK) earlier. +*/ + s->dma_address += address + (s->offset & ~PAGE_MASK ); s->dma_length = s->length; }
drivers/media/usb/uvc/uvc_ctrl.c +1 -1
@@ -1203,7 +1203,7 @@ static void uvc_ctrl_fill_event(struct uvc_video_chain *chain,__uvc_query_v4l2_ctrl (chain, ctrl, mapping, &v4l2_ctrl); -memset (ev->reserved,0 ,sizeof (ev->reserved)); +memset (ev,0 ,sizeof (*ev)); ev->type =V4L2_EVENT_CTRL ; ev->id = v4l2_ctrl.id; ev->u.ctrl.value = value;
drivers/media/v4l2-core/v4l2-ctrls.c +1 -1
@@ -1239,7 +1239,7 @@ static u32 user_flags(const struct v4l2_ctrl *ctrl)static void fill_event (struct v4l2_event *ev,struct v4l2_ctrl *ctrl,u32 changes) { -memset (ev->reserved,0 ,sizeof (ev->reserved)); +memset (ev,0 ,sizeof (*ev)); ev->type =V4L2_EVENT_CTRL ; ev->id = ctrl->id; ev->u.ctrl.changes = changes;
drivers/mmc/host/pxamci.c +1 -1
@@ -181,7 +181,7 @@ static void pxamci_dma_irq(void *param);static void pxamci_setup_data (struct pxamci_host *host,struct mmc_data *data) {struct dma_async_tx_descriptor *tx; -enum dma_data_direction direction; +enum dma_transfer_direction direction;struct dma_slave_config config;struct dma_chan *chan;unsigned int nob = data->blocks;
drivers/net/wireless/ath/ath10k/wmi.c +1 -1
@@ -4309,7 +4309,7 @@ static void ath10k_tpc_config_disp_tables(struct ath10k *ar, rate_code[i], type);snprintf (buff,sizeof (buff),"%8d " , tpc[j]); -strncat (tpc_value, buff,strlen (buff)); +strlcat (tpc_value, buff,sizeof (tpc_value)); } tpc_stats->tpc_table[type].pream_idx[i] = pream_idx; tpc_stats->tpc_table[type].rate_code[i] = rate_code[i];
drivers/pci/dwc/pcie-designware-ep.c +11 -1
@@ -35,8 +35,10 @@ static void dw_pcie_ep_reset_bar(struct dw_pcie *pci, enum pci_barno bar)u32 reg; reg =PCI_BASE_ADDRESS_0 + (4 * bar); +dw_pcie_dbi_ro_wr_en (pci);dw_pcie_writel_dbi2 (pci, reg,0x0 );dw_pcie_writel_dbi (pci, reg,0x0 ); +dw_pcie_dbi_ro_wr_dis (pci); } static int dw_pcie_ep_write_header(struct pci_epc *epc,
@@ -45,6 +47,7 @@ static int dw_pcie_ep_write_header(struct pci_epc *epc,struct dw_pcie_ep *ep =epc_get_drvdata (epc);struct dw_pcie *pci =to_dw_pcie_from_ep (ep); +dw_pcie_dbi_ro_wr_en (pci);dw_pcie_writew_dbi (pci,PCI_VENDOR_ID , hdr->vendorid);dw_pcie_writew_dbi (pci,PCI_DEVICE_ID , hdr->deviceid);dw_pcie_writeb_dbi (pci,PCI_REVISION_ID , hdr->revid);
@@ -58,6 +61,7 @@ static int dw_pcie_ep_write_header(struct pci_epc *epc,dw_pcie_writew_dbi (pci,PCI_SUBSYSTEM_ID , hdr->subsys_id);dw_pcie_writeb_dbi (pci,PCI_INTERRUPT_PIN , hdr->interrupt_pin); +dw_pcie_dbi_ro_wr_dis (pci);return 0 ; }
@@ -142,8 +146,10 @@ static int dw_pcie_ep_set_bar(struct pci_epc *epc, enum pci_barno bar,if (ret)return ret; +dw_pcie_dbi_ro_wr_en (pci);dw_pcie_writel_dbi2 (pci, reg, size -1 );dw_pcie_writel_dbi (pci, reg, flags); +dw_pcie_dbi_ro_wr_dis (pci);return 0 ; }
@@ -214,8 +220,12 @@ static int dw_pcie_ep_set_msi(struct pci_epc *epc, u8 encode_int)struct dw_pcie_ep *ep =epc_get_drvdata (epc);struct dw_pcie *pci =to_dw_pcie_from_ep (ep); - val = (encode_int <<MSI_CAP_MMC_SHIFT ); + val =dw_pcie_readw_dbi (pci,MSI_MESSAGE_CONTROL ); + val &= ~MSI_CAP_MMC_MASK ; + val |= (encode_int <<MSI_CAP_MMC_SHIFT ) &MSI_CAP_MMC_MASK ; +dw_pcie_dbi_ro_wr_en (pci);dw_pcie_writew_dbi (pci,MSI_MESSAGE_CONTROL , val); +dw_pcie_dbi_ro_wr_dis (pci);return 0 ; }
drivers/pci/dwc/pcie-designware.h +1 -0
@@ -99,6 +99,7 @@#define MSI_MESSAGE_CONTROL 0x52#define MSI_CAP_MMC_SHIFT 1 +#define MSI_CAP_MMC_MASK (7 << MSI_CAP_MMC_SHIFT)#define MSI_CAP_MME_SHIFT 4#define MSI_CAP_MSI_EN_MASK 0x1#define MSI_CAP_MME_MASK (7 << MSI_CAP_MME_SHIFT)
drivers/pci/endpoint/pci-epc-core.c +0 -10
@@ -18,7 +18,6 @@*/ #include <linux/device.h> -#include <linux/dma-mapping.h> #include <linux/slab.h> #include <linux/module.h> #include <linux/of_device.h>
@@ -371,7 +370,6 @@ EXPORT_SYMBOL_GPL(pci_epc_write_header);int pci_epc_add_epf (struct pci_epc *epc,struct pci_epf *epf) {unsigned long flags; -struct device *dev = epc->dev.parent;if (epf->epc)return -EBUSY ;
@@ -383,12 +381,6 @@ int pci_epc_add_epf(struct pci_epc *epc, struct pci_epf *epf)return -EINVAL ; epf->epc = epc; -if (dev->of_node) { -of_dma_configure (&epf->dev, dev->of_node); - }else { -dma_set_coherent_mask (&epf->dev, epc->dev.coherent_dma_mask); - epf->dev.dma_mask = epc->dev.dma_mask; - }spin_lock_irqsave (&epc->lock, flags);list_add_tail (&epf->list, &epc->pci_epf);
@@ -503,9 +495,7 @@ __pci_epc_create(struct device *dev, const struct pci_epc_ops *ops,INIT_LIST_HEAD (&epc->pci_epf);device_initialize (&epc->dev); -dma_set_coherent_mask (&epc->dev, dev->coherent_dma_mask); epc->dev.class = pci_epc_class; - epc->dev.dma_mask = dev->dma_mask; epc->dev.parent = dev; epc->ops = ops;
drivers/pci/endpoint/pci-epf-core.c +2 -2
@@ -99,7 +99,7 @@ EXPORT_SYMBOL_GPL(pci_epf_bind);*/ void pci_epf_free_space (struct pci_epf *epf,void *addr,enum pci_barno bar) { -struct device *dev = &epf->dev; +struct device *dev = epf->epc->dev.parent;if (!addr)return ;
@@ -122,7 +122,7 @@ EXPORT_SYMBOL_GPL(pci_epf_free_space);void *pci_epf_alloc_space (struct pci_epf *epf,size_t size,enum pci_barno bar) {void *space; -struct device *dev = &epf->dev; +struct device *dev = epf->epc->dev.parent;dma_addr_t phys_addr;if (size <128 )
drivers/power/supply/charger-manager.c +1 -2
@@ -1212,7 +1212,6 @@ static int charger_extcon_init(struct charger_manager *cm,if (ret <0 ) {pr_info ("Cannot register extcon_dev for %s(cable: %s)\n" , cable->extcon_name, cable->name); - ret = -EINVAL ; }return ret;
@@ -1629,7 +1628,7 @@ static int charger_manager_probe(struct platform_device *pdev)if (IS_ERR (desc)) {dev_err (&pdev->dev,"No platform data (desc) found\n" ); -return -ENODEV ; +return PTR_ERR (desc); } cm =devm_kzalloc (&pdev->dev,sizeof (*cm),GFP_KERNEL );
drivers/rtc/rtc-lib.c +2 -4
@@ -52,13 +52,11 @@ EXPORT_SYMBOL(rtc_year_days);*/ void rtc_time64_to_tm (time64_t time,struct rtc_time *tm) { -unsigned int month, year; -unsigned long secs; +unsigned int month, year, secs;int days;/* time must be positive */ - days =div_s64 (time,86400 ); - secs = time - (unsigned int ) days *86400 ; + days =div_s64_rem (time,86400 , &secs);/* day of the week, 1970-01-01 was a Thursday */ tm->tm_wday = (days +4 ) %7 ;
drivers/scsi/ibmvscsi/ibmvscsi.c +19 -4
@@ -96,6 +96,7 @@ static int client_reserve = 1;static char partition_name[96 ] ="UNKNOWN" ;static unsigned int partition_number =-1 ;static LIST_HEAD (ibmvscsi_head); +static DEFINE_SPINLOCK (ibmvscsi_driver_lock);static struct scsi_transport_template *ibmvscsi_transport_template;
@@ -2274,7 +2275,9 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id) }dev_set_drvdata (&vdev->dev, hostdata); +spin_lock (&ibmvscsi_driver_lock);list_add_tail (&hostdata->host_list, &ibmvscsi_head); +spin_unlock (&ibmvscsi_driver_lock);return 0 ; add_srp_port_failed:
@@ -2296,15 +2299,27 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)static int ibmvscsi_remove (struct vio_dev *vdev) {struct ibmvscsi_host_data *hostdata =dev_get_drvdata (&vdev->dev); -list_del (&hostdata->host_list); -unmap_persist_bufs (hostdata); +unsigned long flags; + +srp_remove_host (hostdata->host); +scsi_remove_host (hostdata->host); + +purge_requests (hostdata,DID_ERROR ); + +spin_lock_irqsave (hostdata->host->host_lock, flags);release_event_pool (&hostdata->pool, hostdata); +spin_unlock_irqrestore (hostdata->host->host_lock, flags); +ibmvscsi_release_crq_queue (&hostdata->queue, hostdata, max_events);kthread_stop (hostdata->work_thread); -srp_remove_host (hostdata->host); -scsi_remove_host (hostdata->host); +unmap_persist_bufs (hostdata); + +spin_lock (&ibmvscsi_driver_lock); +list_del (&hostdata->host_list); +spin_unlock (&ibmvscsi_driver_lock); +scsi_host_put (hostdata->host);return 0 ;
drivers/scsi/ufs/ufshcd.c +8 -6
@@ -2195,10 +2195,11 @@ static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)u32 upiu_flags;int ret =0 ; -if (hba->ufs_version ==UFSHCI_VERSION_20 ) - lrbp->command_type =UTP_CMD_TYPE_UFS_STORAGE ; -else +if ((hba->ufs_version ==UFSHCI_VERSION_10 ) || + (hba->ufs_version ==UFSHCI_VERSION_11 )) lrbp->command_type =UTP_CMD_TYPE_DEV_MANAGE ; +else + lrbp->command_type =UTP_CMD_TYPE_UFS_STORAGE ;ufshcd_prepare_req_desc_hdr (lrbp, &upiu_flags,DMA_NONE );if (hba->dev_cmd.type ==DEV_CMD_TYPE_QUERY )
@@ -2222,10 +2223,11 @@ static int ufshcd_comp_scsi_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)u32 upiu_flags;int ret =0 ; -if (hba->ufs_version ==UFSHCI_VERSION_20 ) - lrbp->command_type =UTP_CMD_TYPE_UFS_STORAGE ; -else +if ((hba->ufs_version ==UFSHCI_VERSION_10 ) || + (hba->ufs_version ==UFSHCI_VERSION_11 )) lrbp->command_type =UTP_CMD_TYPE_SCSI ; +else + lrbp->command_type =UTP_CMD_TYPE_UFS_STORAGE ;if (likely (lrbp->cmd)) { ufshcd_prepare_req_desc_hdr(lrbp, &upiu_flags,
drivers/usb/core/config.c +6 -3
@@ -768,18 +768,21 @@ void usb_destroy_configuration(struct usb_device *dev)return ;if (dev->rawdescriptors) { -for (i =0 ; i < dev->descriptor.bNumConfigurations; i++) +for (i =0 ; i < dev->descriptor.bNumConfigurations && + i <USB_MAXCONFIG ; i++)kfree (dev->rawdescriptors[i]);kfree (dev->rawdescriptors); dev->rawdescriptors =NULL ; } -for (c =0 ; c < dev->descriptor.bNumConfigurations; c++) { +for (c =0 ; c < dev->descriptor.bNumConfigurations && + c <USB_MAXCONFIG ; c++) {struct usb_host_config *cf = &dev->config[c];kfree (cf->string); -for (i =0 ; i < cf->desc.bNumInterfaces; i++) { +for (i =0 ; i < cf->desc.bNumInterfaces && + i <USB_MAXINTERFACES ; i++) {if (cf->intf_cache[i])kref_put (&cf->intf_cache[i]->ref, usb_release_interface_cache);
drivers/video/backlight/pwm_bl.c +5 -4
@@ -54,10 +54,11 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness)if (err <0 )dev_err (pb->dev,"failed to enable power supply\n" ); +pwm_enable (pb->pwm); +if (pb->enable_gpio)gpiod_set_value_cansleep (pb->enable_gpio,1 ); -pwm_enable (pb->pwm); pb->enabled = true; }
@@ -66,12 +67,12 @@ static void pwm_backlight_power_off(struct pwm_bl_data *pb)if (!pb->enabled)return ; -pwm_config (pb->pwm,0 , pb->period); -pwm_disable (pb->pwm); -if (pb->enable_gpio)gpiod_set_value_cansleep (pb->enable_gpio,0 ); +pwm_config (pb->pwm,0 , pb->period); +pwm_disable (pb->pwm); +regulator_disable (pb->power_supply); pb->enabled = false; }
fs/ext4/ext4_jbd2.h +1 -1
@@ -387,7 +387,7 @@ static inline void ext4_update_inode_fsync_trans(handle_t *handle, {struct ext4_inode_info *ei =EXT4_I (inode); -if (ext4_handle_valid (handle)) { +if (ext4_handle_valid (handle) && !is_handle_aborted (handle)) { ei->i_sync_tid = handle->h_transaction->t_tid;if (datasync) ei->i_datasync_tid = handle->h_transaction->t_tid;
fs/ext4/file.c +1 -1
@@ -123,7 +123,7 @@ ext4_unaligned_aio(struct inode *inode, struct iov_iter *from, loff_t pos)struct super_block *sb = inode->i_sb;int blockmask = sb->s_blocksize -1 ; -if (pos >=i_size_read (inode)) +if (pos >=ALIGN (i_size_read (inode), sb->s_blocksize))return 0 ;if ((pos |iov_iter_alignment (from)) & blockmask)
fs/ext4/indirect.c +8 -4
@@ -1387,10 +1387,14 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode, partial->p +1 , partial2->p, (chain+n-1) - partial); -BUFFER_TRACE (partial->bh,"call brelse" ); -brelse (partial->bh); -BUFFER_TRACE (partial2->bh,"call brelse" ); -brelse (partial2->bh); +while (partial > chain) { +BUFFER_TRACE (partial->bh,"call brelse" ); +brelse (partial->bh); + } +while (partial2 > chain2) { +BUFFER_TRACE (partial2->bh,"call brelse" ); +brelse (partial2->bh); + }return 0 ; }
fs/udf/truncate.c +3 -0
@@ -260,6 +260,9 @@ void udf_truncate_extents(struct inode *inode) epos.block = eloc; epos.bh =udf_tread (sb,udf_get_lb_pblock (sb, &eloc,0 )); +/* Error reading indirect block? */ +if (!epos.bh) +return ;if (elen) indirect_ext_len = (elen + sb->s_blocksize - 1) >>
include/linux/ceph/libceph.h +2 -0
@@ -291,6 +291,8 @@ extern void ceph_destroy_client(struct ceph_client *client);extern int __ceph_open_session (struct ceph_client *client,unsigned long started);extern int ceph_open_session (struct ceph_client *client); +int ceph_wait_for_latest_osdmap (struct ceph_client *client, +unsigned long timeout);/* pagevec.c */ extern void ceph_release_page_vector (struct page **pages,int num_pages);
kernel/futex.c +4 -0
@@ -3450,6 +3450,10 @@ int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi) {u32 uval,uninitialized_var (nval ), mval; +/* Futex address must be 32bit aligned */ +if ((((unsigned long )uaddr) %sizeof (*uaddr)) !=0 ) +return -1 ; + retry:if (get_user (uval, uaddr))return -1 ;
kernel/locking/lockdep.c +3 -0
@@ -3650,6 +3650,9 @@ __lock_set_class(struct lockdep_map *lock, const char *name,unsigned int depth;int i; +if (unlikely (!debug_locks)) +return 0 ; + depth = curr->lockdep_depth;/* * This function is about (re)setting the class of a held lock,
kernel/sched/cpufreq_schedutil.c +1 -2
@@ -605,10 +605,9 @@ static int sugov_init(struct cpufreq_policy *policy) stop_kthread:sugov_kthread_stop (sg_policy); - -free_sg_policy:mutex_unlock (&global_tunables_lock); +free_sg_policy:sugov_policy_free (sg_policy); disable_fast_switch:
lib/int_sqrt.c +3 -0
@@ -23,6 +23,9 @@ unsigned long int_sqrt(unsigned long x)return x; m =1UL << (BITS_PER_LONG -2 ); +while (m > x) + m >>=2 ; +while (m !=0 ) { b = y + m; y >>=1 ;
net/bluetooth/hci_sock.c +1 -2
@@ -826,8 +826,6 @@ static int hci_sock_release(struct socket *sock)if (!sk)return 0 ; - hdev =hci_pi (sk)->hdev; -switch (hci_pi (sk)->channel) {case HCI_CHANNEL_MONITOR :atomic_dec (&monitor_promisc);
@@ -849,6 +847,7 @@ static int hci_sock_release(struct socket *sock)bt_sock_unlink (&hci_sk_list, sk); + hdev =hci_pi (sk)->hdev;if (hdev) {if (hci_pi (sk)->channel ==HCI_CHANNEL_USER ) {/* When releasing a user channel exclusive access,
net/bridge/netfilter/ebtables.c +39 -92
315 lines not on this page · raw message
net/ceph/ceph_common.c +17 -1
@@ -720,7 +720,6 @@ int __ceph_open_session(struct ceph_client *client, unsigned long started) }EXPORT_SYMBOL (__ceph_open_session); -int ceph_open_session (struct ceph_client *client) {int ret;
@@ -736,6 +735,23 @@ int ceph_open_session(struct ceph_client *client) }EXPORT_SYMBOL (ceph_open_session); +int ceph_wait_for_latest_osdmap (struct ceph_client *client, +unsigned long timeout) +{ +u64 newest_epoch; +int ret; + + ret =ceph_monc_get_version (&client->monc,"osdmap" , &newest_epoch); +if (ret) +return ret; + +if (client->osdc.osdmap->epoch >= newest_epoch) +return 0 ; + +ceph_osdc_maybe_request_map (&client->osdc); +return ceph_monc_wait_osdmap (&client->monc, newest_epoch, timeout); +} +EXPORT_SYMBOL (ceph_wait_for_latest_osdmap);static int __init init_ceph_lib (void ) {
net/ceph/mon_client.c +9 -0
@@ -922,6 +922,15 @@ int ceph_monc_blacklist_add(struct ceph_mon_client *monc,mutex_unlock (&monc->mutex); ret =wait_generic_request (req); +if (!ret) +/* +* Make sure we have the osdmap that includes the blacklist +* entry. This is needed to ensure that the OSDs pick up the +* new blacklist before processing any future requests from +* this client. +*/ + ret =ceph_wait_for_latest_osdmap (monc->client,0 ); + out:put_generic_request (req);return ret;
sound/pci/hda/hda_codec.c +55 -2
71 lines not on this page · raw message
sound/x86/intel_hdmi_audio.c +0 -1
@@ -1887,7 +1887,6 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)pm_runtime_use_autosuspend (&pdev->dev);pm_runtime_mark_last_busy (&pdev->dev); -pm_runtime_set_active (&pdev->dev);dev_dbg (&pdev->dev,"%s: handle pending notification\n" , __func__);for_each_port (card_ctx, port) {
tools/objtool/check.c +2 -1
@@ -2132,9 +2132,10 @@ static void cleanup(struct objtool_file *file)elf_close (file->elf); } +static struct objtool_file file; +int check (const char *_objname,bool orc) { -struct objtool_file file;int ret, warnings =0 ; objname = _objname;
tools/perf/util/probe-event.c +4 -2
@@ -169,8 +169,10 @@ static struct map *kernel_get_module_map(const char *module)if (module &&strchr (module,'/' ))return dso__new_map (module); -if (!module) - module ="kernel" ; +if (!module) { + pos =machine__kernel_map (host_machine); +return map__get (pos); + }for (pos =maps__first (maps); pos; pos =map__next (pos)) {/* short_name is "[module]" */