From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Miklos Szeredi <mszeredi@redhat.com>
Subject: [PATCH 4.9 075/107] fuse: fix double request_end()
Date: Mon, 3 Sep 2018 18:56:39 +0200 [thread overview]
Message-ID: <20180903165640.930330832@linuxfoundation.org> (raw)
In-Reply-To: <20180903165637.293735109@linuxfoundation.org>
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <mszeredi@redhat.com>
commit 87114373ea507895a62afb10d2910bd9adac35a8 upstream.
Refcounting of request is broken when fuse_abort_conn() is called and
request is on the fpq->io list:
- ref is taken too late
- then it is not dropped
Fixes: 0d8e84b0432b ("fuse: simplify request abort")
Cc: <stable@vger.kernel.org> # v4.2
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/fuse/dev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -363,7 +363,7 @@ static void request_end(struct fuse_conn
struct fuse_iqueue *fiq = &fc->iq;
if (test_and_set_bit(FR_FINISHED, &req->flags))
- return;
+ goto out_put_req;
spin_lock(&fiq->waitq.lock);
list_del_init(&req->intr_entry);
@@ -393,6 +393,7 @@ static void request_end(struct fuse_conn
wake_up(&req->waitq);
if (req->end)
req->end(fc, req);
+out_put_req:
fuse_put_request(fc, req);
}
@@ -2097,6 +2098,7 @@ void fuse_abort_conn(struct fuse_conn *f
set_bit(FR_ABORTED, &req->flags);
if (!test_bit(FR_LOCKED, &req->flags)) {
set_bit(FR_PRIVATE, &req->flags);
+ __fuse_get_request(req);
list_move(&req->list, &to_end1);
}
spin_unlock(&req->waitq.lock);
@@ -2123,7 +2125,6 @@ void fuse_abort_conn(struct fuse_conn *f
while (!list_empty(&to_end1)) {
req = list_first_entry(&to_end1, struct fuse_req, list);
- __fuse_get_request(req);
list_del_init(&req->list);
request_end(fc, req);
}
next prev parent reply other threads:[~2018-09-03 21:28 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 16:55 [PATCH 4.9 000/107] 4.9.125-stable review Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 001/107] vti6: fix PMTU caching and reporting on xmit Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 002/107] xfrm: fix missing dst_release() after policy blocking lbcast and multicast Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 003/107] xfrm: free skb if nlsk pointer is NULL Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 004/107] mac80211: add stations tied to AP_VLANs during hw reconfig Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 005/107] nl80211: Add a missing break in parse_station_flags Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 006/107] drm/bridge: adv7511: Reset registers on hotplug Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 007/107] scsi: libiscsi: fix possible NULL pointer dereference in case of TMF Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 008/107] drm/imx: imx-ldb: disable LDB on driver bind Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 009/107] drm/imx: imx-ldb: check if channel is enabled before printing warning Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 010/107] usb: gadget: r8a66597: Fix two possible sleep-in-atomic-context bugs in init_controller() Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 011/107] usb: gadget: r8a66597: Fix a possible sleep-in-atomic-context bugs in r8a66597_queue() Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 012/107] usb/phy: fix PPC64 build errors in phy-fsl-usb.c Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 014/107] usb: gadget: f_uac2: fix endianness of struct cntrl_*_lay3 Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 015/107] bpf, ppc64: fix unexpected r0=0 exit path inside bpf_xadd Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 016/107] tools/power turbostat: fix -S on UP systems Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 017/107] net: caif: Add a missing rcu_read_unlock() in caif_flow_cb Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 018/107] qed: Fix possible race for the link state value Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 019/107] qed: Correct Multicast API to reflect existence of 256 approximate buckets Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 020/107] atl1c: reserve min skb headroom Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 021/107] net: prevent ISA drivers from building on PPC32 Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 022/107] can: mpc5xxx_can: check of_iomap return before use Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 023/107] i2c: davinci: Avoid zero value of CLKH Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 024/107] perf/x86/amd/ibs: Dont access non-started event Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 025/107] media: staging: omap4iss: Include asm/cacheflush.h after generic includes Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 026/107] bnx2x: Fix invalid memory access in rss hash config path Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 028/107] net: axienet: Fix double deregister of mdio Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 029/107] x86/boot: Fix if_changed build flip/flop bug Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 030/107] fscache: Allow cancelled operations to be enqueued Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 031/107] cachefiles: Fix refcounting bug in backing-file read monitoring Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 032/107] cachefiles: Wait rather than BUGing on "Unexpected object collision" Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 033/107] selftests/ftrace: Add snapshot and tracing_on test case Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 034/107] zswap: re-check zswap_is_full() after do zswap_shrink() Greg Kroah-Hartman
2018-09-03 16:55 ` [PATCH 4.9 035/107] tools/power turbostat: Read extended processor family from CPUID Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 037/107] enic: handle mtu change for vf properly Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 038/107] arc: [plat-eznps] fix data type errors in platform headers Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 039/107] arc: fix build errors in arc/include/asm/delay.h Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 040/107] arc: fix type warnings in arc/mm/cache.c Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 041/107] squashfs metadata 2: electric boogaloo Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 043/107] drivers: net: lmc: fix case value for target abort error Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 044/107] memcg: remove memcg_cgroup::id from IDR on mem_cgroup_css_alloc() failure Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 045/107] scsi: fcoe: drop frames in ELS LOGO error path Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 046/107] scsi: fcoe: clear FC_RP_STARTED flags when receiving a LOGO Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 047/107] scsi: vmw_pvscsi: Return DID_RESET for status SAM_STAT_COMMAND_TERMINATED Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 048/107] mm/memory.c: check return value of ioremap_prot Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 049/107] sched/sysctl: Check user input value of sysctl_sched_time_avg Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 050/107] Cipso: cipso_v4_optptr enter infinite loop Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 051/107] mei: dont update offset in write Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 052/107] cifs: add missing debug entries for kconfig options Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 053/107] cifs: check kmalloc before use Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 054/107] smb3: enumerating snapshots was leaving part of the data off end Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 055/107] smb3: Do not send SMB3 SET_INFO if nothing changed Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 056/107] smb3: dont request leases in symlink creation and query Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 057/107] kprobes/arm64: Fix %p uses in error messages Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 058/107] arm64: mm: check for upper PAGE_SHIFT bits in pfn_valid() Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 059/107] s390/kvm: fix deadlock when killed by oom Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 060/107] ext4: check for NUL characters in extended attributes name Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 061/107] ext4: sysfs: print ext4_super_block fields as little-endian Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 062/107] ext4: reset error code in ext4_find_entry in fallback Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 063/107] staging: android: ion: fix ION_IOC_{MAP,SHARE} use-after-free Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 064/107] KVM: arm/arm64: Skip updating PTE entry if no change Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 065/107] KVM: arm/arm64: Skip updating PMD " Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 067/107] x86/speculation/l1tf: Fix overflow in l1tf_pfn_limit() on 32bit Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 068/107] x86/speculation/l1tf: Fix off-by-one error when warning that system has too much RAM Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 069/107] x86/speculation/l1tf: Suggest what to do on systems with " Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 070/107] x86/process: Re-export start_thread() Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 072/107] x86/kvm/vmx: Remove duplicate l1d flush definitions Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 073/107] fuse: Dont access pipe->buffers without pipe_lock() Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 074/107] fuse: fix initial parallel dirops Greg Kroah-Hartman
2018-09-03 16:56 ` Greg Kroah-Hartman [this message]
2018-09-03 16:56 ` [PATCH 4.9 076/107] fuse: fix unlocked access to processing queue Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 077/107] fuse: umount should wait for all requests Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 078/107] fuse: Fix oops at process_init_reply() Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 079/107] fuse: Add missed unlock_page() to fuse_readpages_fill() Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 080/107] udl-kms: change down_interruptible to down Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 081/107] udl-kms: handle allocation failure Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 082/107] udl-kms: fix crash due to uninitialized memory Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 083/107] b43legacy/leds: Ensure NUL-termination of LED name string Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 084/107] b43/leds: " Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 085/107] ASoC: dpcm: dont merge format from invalid codec dai Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 086/107] ASoC: sirf: Fix potential NULL pointer dereference Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 088/107] x86/irqflags: Mark native_restore_fl extern inline Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 089/107] x86/spectre: Add missing family 6 check to microcode check Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 090/107] x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+ Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 091/107] x86/entry/64: Wipe KASAN stack shadow before rewind_stack_do_exit() Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 092/107] s390: fix br_r1_trampoline for machines without exrl Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 093/107] s390/qdio: reset old sbal_state flags Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 094/107] s390/numa: move initial setup of node_to_cpumask_map Greg Kroah-Hartman
2018-09-03 16:56 ` [PATCH 4.9 095/107] s390/pci: fix out of bounds access during irq setup Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 096/107] kprobes: Make list and blacklist root user read only Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 097/107] MIPS: Correct the 64-bit DSP accumulator register size Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 098/107] MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7 Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 099/107] scsi: sysfs: Introduce sysfs_{un,}break_active_protection() Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 100/107] scsi: core: Avoid that SCSI device removal through sysfs triggers a deadlock Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 101/107] iscsi target: fix session creation failure handling Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 102/107] clk: rockchip: fix clk_i2sout parent selection bits on rk3399 Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 103/107] PM / clk: signedness bug in of_pm_clk_add_clks() Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 104/107] power: generic-adc-battery: fix out-of-bounds write when copying channel properties Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 105/107] power: generic-adc-battery: check for duplicate properties copied from iio channels Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 106/107] cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status Greg Kroah-Hartman
2018-09-03 16:57 ` [PATCH 4.9 107/107] staging: android: ion: check for kref overflow Greg Kroah-Hartman
2018-09-04 8:22 ` [PATCH 4.9 000/107] 4.9.125-stable review Naresh Kamboju
2018-09-04 19:33 ` Greg Kroah-Hartman
2018-09-04 19:29 ` Shuah Khan
2018-09-04 22:51 ` Guenter Roeck
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=20180903165640.930330832@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).