From: Luis Henriques <luis.henriques@canonical.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
akpm@linux-foundation.org,
"Alexander Beregalov" <a.beregalov@gmail.com>,
"Theodore Ts'o" <tytso@mit.edu>,
"Zheng Liu" <wenqing.lz@taobao.com>
Subject: Re: [28/83] ext4: lock i_mutex when truncating orphan inodes
Date: Mon, 17 Jun 2013 11:18:20 +0100 [thread overview]
Message-ID: <87a9mprqfn.fsf@canonical.com> (raw)
In-Reply-To: <lsq.1371420097.220610690@decadent.org.uk> (Ben Hutchings's message of "Sun, 16 Jun 2013 23:01:37 +0100")
Ben Hutchings <ben@decadent.org.uk> writes:
> 3.2.47-rc1 review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Theodore Ts'o <tytso@mit.edu>
>
> commit 721e3eba21e43532e438652dd8f1fcdfce3187e7 upstream.
I'm also queuing this commit as it looks like 3.5 is also missing it.
Cheers,
--
Luis
>
> Commit c278531d39 added a warning when ext4_flush_unwritten_io() is
> called without i_mutex being taken. It had previously not been taken
> during orphan cleanup since races weren't possible at that point in
> the mount process, but as a result of this c278531d39, we will now see
> a kernel WARN_ON in this case. Take the i_mutex in
> ext4_orphan_cleanup() to suppress this warning.
>
> Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> fs/ext4/super.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -2260,7 +2260,9 @@ static void ext4_orphan_cleanup(struct s
> __func__, inode->i_ino, inode->i_size);
> jbd_debug(2, "truncating inode %lu to %lld bytes\n",
> inode->i_ino, inode->i_size);
> + mutex_lock(&inode->i_mutex);
> ext4_truncate(inode);
> + mutex_unlock(&inode->i_mutex);
> nr_truncates++;
> } else {
> ext4_msg(sb, KERN_DEBUG,
>
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-06-17 10:18 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-16 22:01 [00/83] 3.2.47-rc1 review Ben Hutchings
2013-06-16 22:01 ` [04/83] cfg80211: check wdev->netdev in connection work Ben Hutchings
2013-06-16 22:01 ` [23/83] net: Add net_ratelimited_function and net_<level>_ratelimited macros Ben Hutchings
2013-06-16 22:01 ` [30/83] ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section Ben Hutchings
2013-06-16 22:01 ` [21/83] xen-netback: avoid allocating variable size array on stack Ben Hutchings
2013-06-16 22:01 ` [09/83] xfs: kill suid/sgid through the truncate path Ben Hutchings
2013-06-16 22:01 ` [20/83] xen-netback: remove redundent parameter in netbk_count_requests Ben Hutchings
2013-06-16 22:01 ` [17/83] xen-netback: fix sparse warning Ben Hutchings
2013-06-16 22:01 ` [01/83] rapidio/tsi721: Fix interrupt mask when handling MSI Ben Hutchings
2013-06-16 22:01 ` [28/83] ext4: lock i_mutex when truncating orphan inodes Ben Hutchings
2013-06-17 10:18 ` Luis Henriques [this message]
2013-06-16 22:01 ` [27/83] b43legacy: Fix crash on unload when firmware not available Ben Hutchings
2013-06-16 22:01 ` [24/83] xen-netfront: reduce gso_max_size to account for max TCP header Ben Hutchings
2013-06-16 22:01 ` [03/83] libata: make ata_exec_internal_sg honor DMADIR Ben Hutchings
2013-06-16 22:01 ` [22/83] xen-netback: better names for thresholds Ben Hutchings
2013-06-16 22:01 ` [06/83] mac80211: close AP_VLAN interfaces before unregistering all Ben Hutchings
2013-06-16 22:01 ` [02/83] ata_piix: add PCI IDs for Intel BayTail Ben Hutchings
2013-06-16 22:01 ` [05/83] cifs: fix potential buffer overrun when composing a new options string Ben Hutchings
2013-06-16 22:01 ` [19/83] xen-netback: don't disconnect frontend when seeing oversize packet Ben Hutchings
2013-06-16 22:01 ` [15/83] xen-netback: remove skb in xen_netbk_alloc_page Ben Hutchings
2013-06-16 22:01 ` [25/83] jfs: fix a couple races Ben Hutchings
2013-06-16 22:01 ` [11/83] tg3: Add New 5719 Read DMA workaround Ben Hutchings
2013-06-16 22:01 ` [29/83] thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR Ben Hutchings
2013-06-16 22:01 ` [18/83] xen-netback: coalesce slots in TX path and fix regressions Ben Hutchings
2013-06-16 22:01 ` [08/83] drm/radeon: fix card_posted check for newer asics Ben Hutchings
2013-06-16 22:01 ` [13/83] ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range() Ben Hutchings
2013-06-16 22:01 ` [14/83] ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk() Ben Hutchings
2013-06-16 22:01 ` [07/83] iwlwifi: dvm: fix zero LQ CMD sending avoidance Ben Hutchings
2013-06-16 22:01 ` [12/83] tg3: Add read dma workaround for 5720 Ben Hutchings
2013-06-16 22:01 ` [16/83] netback: remove redundant assignment Ben Hutchings
2013-06-16 22:01 ` [26/83] xen/events: Handle VIRQ_TIMER before any other hardirq in event loop Ben Hutchings
2013-06-16 22:01 ` [10/83] iscsi-target: fix heap buffer overflow on error Ben Hutchings
2013-06-16 22:01 ` [78/83] USB: spcp8x5: fix device initialisation at open Ben Hutchings
2013-06-16 22:01 ` [74/83] cciss: fix broken mutex usage in ioctl Ben Hutchings
2013-06-16 22:01 ` [35/83] xhci: fix list access before init Ben Hutchings
2013-06-16 22:01 ` [39/83] USB: serial: fix Treo/Kyocera interrrupt-in urb context Ben Hutchings
2013-06-16 22:01 ` [67/83] Bluetooth: Fix missing length checks for L2CAP signalling PDUs Ben Hutchings
2013-06-16 22:01 ` [75/83] drivers/rtc/rtc-twl.c: fix missing device_init_wakeup() when booted with device tree Ben Hutchings
2013-06-16 22:01 ` [66/83] drm/i915: prefer VBT modes for SVDO-LVDS over EDID Ben Hutchings
2013-06-16 22:01 ` [62/83] USB: option: blacklist network interface on Huawei E1820 Ben Hutchings
2013-06-16 22:01 ` [42/83] USB: ark3116: fix control-message timeout Ben Hutchings
2013-06-16 22:01 ` [57/83] USB: mos7720: fix hardware flow control Ben Hutchings
2013-06-16 22:01 ` [46/83] ACPI video: ignore BIOS initial backlight value for HP 1000 Ben Hutchings
2013-06-16 22:01 ` [71/83] CPU hotplug: provide a generic helper to disable/enable CPU hotplug Ben Hutchings
2013-06-16 22:01 ` [76/83] swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O completion Ben Hutchings
2013-06-16 22:01 ` [32/83] USB: ftdi_sio: Quiet sparse noise about using plain integer was NULL pointer Ben Hutchings
2013-06-16 22:01 ` [63/83] hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617 Ben Hutchings
2013-06-16 22:01 ` [82/83] tg3: Wait for boot code to finish after power on Ben Hutchings
2013-06-16 22:01 ` [37/83] usb: dwc3: gadget: free trb pool only from epnum 2 Ben Hutchings
2013-06-16 22:01 ` [64/83] drm/gma500/psb: Unpin framebuffer on crtc disable Ben Hutchings
2013-06-16 22:01 ` [45/83] ACPI video: ignore BIOS backlight value for HP dm4 Ben Hutchings
2013-06-16 22:01 ` [40/83] USB: visor: fix initialisation of Treo/Kyocera devices Ben Hutchings
2013-06-16 22:01 ` [51/83] radeon: Fix system hang issue when using KMS with older cards Ben Hutchings
2013-06-16 22:01 ` [69/83] ath9k: Use minstrel rate control by default Ben Hutchings
2013-06-16 22:01 ` [79/83] USB: pl2303: fix device initialisation at open Ben Hutchings
2013-06-16 22:01 ` [56/83] USB: keyspan: fix bogus array index Ben Hutchings
2013-06-16 22:01 ` [41/83] USB: mos7720: fix DMA to stack Ben Hutchings
2013-06-16 22:01 ` [53/83] USB: serial: Add Option GTM681W to qcserial device table Ben Hutchings
2013-06-16 22:01 ` [33/83] drm/gma500: Increase max resolution for mode setting Ben Hutchings
2013-06-16 22:01 ` [48/83] ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6 Ben Hutchings
2013-06-16 22:01 ` [81/83] md/raid1: consider WRITE as successful only if at least one non-Faulty and non-rebuilding drive completed it Ben Hutchings
2013-06-16 22:01 ` [59/83] ARM: 7742/1: topology: export cpu_topology Ben Hutchings
2013-06-16 22:01 ` [43/83] USB: iuu_phoenix: fix bulk-message timeout Ben Hutchings
2013-06-16 22:01 ` [47/83] ACPI / video: ignore BIOS initial backlight value for HP m4 Ben Hutchings
2013-06-16 22:01 ` [83/83] powerpc: Fix emulation of illegal instructions on PowerNV platform Ben Hutchings
2013-06-16 22:01 ` [54/83] ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface Ben Hutchings
2013-06-16 22:01 ` [80/83] x86: Fix typo in kexec register clearing Ben Hutchings
2013-06-16 22:01 ` [65/83] drm/gma500/cdv: Unpin framebuffer on crtc disable Ben Hutchings
2013-06-16 22:01 ` [52/83] USB: Serial: cypress_M8: Enable FRWD Dongle hidcom device Ben Hutchings
2013-06-16 22:01 ` [36/83] xhci - correct comp_mode_recovery_timer on return from hibernate Ben Hutchings
2013-06-16 22:01 ` [61/83] USB: whiteheat: fix broken port configuration Ben Hutchings
2013-06-16 22:01 ` [34/83] xhci-mem: init list heads at the beginning of init Ben Hutchings
2013-06-16 22:01 ` [50/83] drm/i915: no lvds quirk for hp t5740 Ben Hutchings
2013-06-16 22:01 ` [31/83] USB: serial: ftdi_sio: Handle the old_termios == 0 case e.g. uart_resume_port() Ben Hutchings
2013-06-16 22:01 ` [77/83] mm: migration: add migrate_entry_wait_huge() Ben Hutchings
2013-06-16 22:01 ` [44/83] USB: mos7720: fix message timeouts Ben Hutchings
2013-06-16 22:01 ` [49/83] drm: fix a use-after-free when GPU acceleration disabled Ben Hutchings
2013-06-16 22:01 ` [68/83] ath9k: Disable PowerSave by default Ben Hutchings
2013-06-17 9:55 ` Luis Henriques
2013-06-17 11:55 ` Ben Hutchings
2013-06-16 22:01 ` [72/83] reboot: rigrate shutdown/reboot to boot cpu Ben Hutchings
2013-06-16 22:01 ` [70/83] b43: stop format string leaking into error msgs Ben Hutchings
2013-06-16 22:01 ` [55/83] drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC Ben Hutchings
2013-06-16 22:01 ` [38/83] USB: revert periodic scheduling bugfix Ben Hutchings
2013-06-16 22:01 ` [60/83] ARM: 7743/1: compressed/head.S: work around new binutils warning Ben Hutchings
2013-06-16 22:01 ` [73/83] audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE Ben Hutchings
2013-06-16 22:01 ` [58/83] ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270 Ben Hutchings
2013-06-16 22:42 ` [00/83] 3.2.47-rc1 review 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=87a9mprqfn.fsf@canonical.com \
--to=luis.henriques@canonical.com \
--cc=a.beregalov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ben@decadent.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=wenqing.lz@taobao.com \
/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