mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: akpm@linux-foundation.org, "Johan Hovold" <johan@kernel.org>,
	"Anthony Mallet" <anthony.mallet@laas.fr>
Subject: [PATCH 3.2 005/106] USB: serial: ftdi_sio: fix setting latency for unprivileged users
Date: Sat, 09 Sep 2017 22:47:39 +0100	[thread overview]
Message-ID: <lsq.1504993659.681024115@decadent.org.uk> (raw)
In-Reply-To: <lsq.1504993659.376385113@decadent.org.uk>

3.2.93-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Anthony Mallet <anthony.mallet@laas.fr>

commit bb246681b3ed0967489a7401ad528c1aaa1a4c2e upstream.

Commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY
flag") enables unprivileged users to set the FTDI latency timer,
but there was a logic flaw that skipped sending the corresponding
USB control message to the device.

Specifically, the device latency timer would not be updated until next
open, something which was later also inadvertently broken by commit
c19db4c9e49a ("USB: ftdi_sio: set device latency timeout at port
probe").

A recent commit c6dce2626606 ("USB: serial: ftdi_sio: fix extreme
low-latency setting") disabled the low-latency mode by default so we now
need this fix to allow unprivileged users to again enable it.

Signed-off-by: Anthony Mallet <anthony.mallet@laas.fr>
[johan: amend commit message]
Fixes: 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag")
Fixes: c19db4c9e49a ("USB: ftdi_sio: set device latency timeout at port probe").
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/usb/serial/ftdi_sio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1543,9 +1543,9 @@ static int set_serial_info(struct tty_st
 					(new_serial.flags & ASYNC_FLAGS));
 	priv->custom_divisor = new_serial.custom_divisor;
 
+check_and_exit:
 	write_latency_timer(port);
 
-check_and_exit:
 	if ((old_priv.flags & ASYNC_SPD_MASK) !=
 	     (priv->flags & ASYNC_SPD_MASK)) {
 		if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)

  parent reply	other threads:[~2017-09-09 22:24 UTC|newest]

Thread overview: 109+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-09 21:47 [PATCH 3.2 000/106] 3.2.93-rc1 review Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 027/106] xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 087/106] signal: Only reschedule timers on signals timers have sent Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 049/106] scsi: qla2xxx: don't disable a not previously enabled PCI device Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 033/106] watchdog: pcwd_usb: fix NULL-deref at probe Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 006/106] USB: serial: ir-usb: fix big-endian baud-rate debug printk Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 017/106] USB: gadget: dummy_hcd: fix hub-descriptor removable fields Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 016/106] usb: r8a66597-hcd: select a different endpoint on timeout Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 015/106] usb: r8a66597-hcd: decrease timeout Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 012/106] USB: core: replace %p with %pK Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 013/106] uwb: fix device quirk on big-endian hosts Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 054/106] usb: gadget: f_mass_storage: Serialize wake and sleep execution Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 042/106] ALSA: hda - apply STAC_9200_DELL_M22 quirk for Dell Latitude D430 Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 078/106] excessive checks in ufs_write_failed() and ufs_evict_inode() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 075/106] KEYS: fix dereferencing NULL payload with nonzero length Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 052/106] ext4: fix fdatasync(2) after extent manipulation operations Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 024/106] tracing/kprobes: Enforce kprobes teardown after testing Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 032/106] drivers: char: mem: Check for address space wraparound with mmap() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 073/106] KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 053/106] net: phy: fix marvell phy status reading Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 079/106] KVM: async_pf: avoid async pf injection when in guest mode Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 022/106] mac80211: strictly check mesh address extension mode Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 011/106] USB: ene_usb6250: fix DMA to the stack Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 025/106] xhci: workaround for hosts missing CAS bit Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 028/106] usb: host: xhci-mem: allocate zeroed Scratchpad Buffer Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 019/106] USB: hub: fix SS hub-descriptor handling Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 081/106] usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 055/106] ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 021/106] USB: hub: fix SS max number of ports Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 020/106] USB: hub: fix non-SS hub-descriptor handling Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 004/106] net: irda: irda-usb: fix firmware name on big-endian hosts Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 071/106] perf script python: Updated trace_unhandled() signature Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 089/106] drm/radeon: add a quirk for Toshiba Satellite L20-183 Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 091/106] ipv6: avoid unregistering inet6_dev for loopback Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 007/106] USB: serial: mct_u232: fix big-endian baud-rate handling Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 076/106] fix ufs_isblockset() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 003/106] tcp: avoid fragmenting peculiar skbs in SACK Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 035/106] KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 062/106] net: ping: do not abuse udp_poll() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 068/106] perf script: Fix outdated comment for perf-trace-python Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 065/106] net: ethoc: enable NAPI before poll may be scheduled Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 039/106] ext4: keep existing extra fields when inode expands Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 085/106] powerpc/kprobes: Pause function_graph tracing during jprobes handling Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 044/106] libceph: NULL deref on crush_decode() error path Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 037/106] KVM: x86: zero base3 of unusable segments Ben Hutchings
2017-09-09 21:47 ` Ben Hutchings [this message]
2017-09-09 21:47 ` [PATCH 3.2 026/106] usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Apollo Lake Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 056/106] drivers: char: mem: Fix wraparound check to allow mappings up to the end Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 082/106] selinux: fix double free in selinux_parse_opts_str() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 051/106] ext4: fix data corruption for mmap writes Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 036/106] KVM: x86: fix use of uninitialized memory as segment descriptor in emulator Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 002/106] af_key: Fix slab-out-of-bounds in pfkey_compile_policy Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 077/106] ufs: set correct ->s_maxsize Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 050/106] net: ethernet: ax88796: don't call free_irq without request_irq first Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 009/106] ahci: Acer SA5-271 SSD Not Detected Fix Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 060/106] net: add kfree_skb_list() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 058/106] alarmtimer: Rate limit periodic intervals Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 088/106] Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 018/106] USB: usbip: fix nonconforming hub descriptor Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 029/106] usb: host: xhci: simplify irq handler return Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 064/106] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr' Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 063/106] [media] vb2: fix plane index sanity check in vb2_plane_cookie() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 043/106] block: fix an error code in add_partition() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 031/106] usb: musb: tusb6010_omap: Do not reset the other direction's packet size Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 083/106] xfrm: Oops on error in pfkey_msg2xfrm_state() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 080/106] configfs: Fix race between create_link and configfs_rmdir Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 034/106] powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 045/106] drm/gma500/psb: Actually use VBT mode when it is found Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 014/106] USB: iowarrior: fix info ioctl on big-endian hosts Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 048/106] ASoC: Fix use-after-free at card unregistration Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 061/106] ipv6: Fix leak in ipv6_gso_segment() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 047/106] netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 059/106] [media] rc-core: race condition during ir_raw_event_register() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 086/106] swap: cond_resched in swap_cgroup_prepare() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 038/106] osf_wait4(): fix infoleak Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 070/106] perf script python: Fix wrong code snippets in documentation Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 023/106] of: fdt: add missing allocation-failure check Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 001/106] xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 030/106] USB: xhci: fix lock-inversion problem Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 066/106] drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 040/106] i2c: i2c-tiny-usb: fix buffer not being DMA capable Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 069/106] perf script: Fix documentation errors Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 067/106] perf probe: Fix examples section of documentation Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 072/106] perf script python: Remove dups in documentation examples Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 090/106] rtnetlink: add IFLA_GROUP to ifla_policy Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 046/106] dmaengine: ep93xx: Always start from BASE0 Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 057/106] alarmtimer: Prevent overflow of relative timers Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 084/106] xfrm: NULL dereference on allocation failure Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 010/106] tcp: eliminate negative reordering in tcp_clean_rtx_queue Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 074/106] MIPS: kprobes: flush_insn_slot should flush only if probe initialised Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 008/106] USB: serial: io_ti: fix div-by-zero in set_termios Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 041/106] crypto: gcm - wait for crypto op not signal safe Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 097/106] tracing/kprobes: Allow to create probe with a module name starting with a digit Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 103/106] mm: fix NULL ptr dereference in migrate_pages Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 095/106] net: prevent sign extension in dev_get_stats() Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 099/106] xfrm: policy: check policy direction value Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 101/106] ptrace: use fsuid, fsgid, effective creds for fs access checks Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 104/106] mm: fix NULL ptr dereference in move_pages Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 092/106] powerpc/64: Initialise thread_info for emergency stacks Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 096/106] MIPS: Fix IRQ tracing & lockdep when rescheduling Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 102/106] mm: fix move/migrate_pages() race on task struct Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 094/106] lib/cmdline.c: fix get_options() overflow while parsing ranges Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 106/106] net: phy: marvell: Limit errata to 88m1101 Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 100/106] xen: fix bio vec merging Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 098/106] tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0 Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 093/106] autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL Ben Hutchings
2017-09-09 21:47 ` [PATCH 3.2 105/106] Sanitize 'move_pages()' permission checks Ben Hutchings
2017-09-10 14:31 ` [PATCH 3.2 000/106] 3.2.93-rc1 review Guenter Roeck
2017-09-10 18:46   ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lsq.1504993659.681024115@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=anthony.mallet@laas.fr \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome