From: Lingzhu Xiang <lxiang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
Andy Whitcroft <apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
Jan Beulich <JBeulich-IBi9RG/b67k@public.gmane.org>,
Chun-Yi Lee
<joeyli.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Matt Fleming
<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Josh Boyer <jwboyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 01/20] efi: Add support for a UEFI variable filesystem
Date: Fri, 21 Dec 2012 13:54:29 +0800 [thread overview]
Message-ID: <50D3F995.5000705@redhat.com> (raw)
In-Reply-To: <1351237923-10313-2-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
On 10/26/2012 03:51 PM, Matt Fleming wrote:
> +static int efivarfs_unlink(struct inode *dir, struct dentry *dentry)
> +{
> + struct efivar_entry *var = dentry->d_inode->i_private;
> + struct efivars *efivars = var->efivars;
> + efi_status_t status;
> +
> + spin_lock(&efivars->lock);
> +
> + status = efivars->ops->set_variable(var->var.VariableName,
> + &var->var.VendorGuid,
> + 0, 0, NULL);
> +
> + if (status == EFI_SUCCESS || status == EFI_NOT_FOUND) {
> + list_del(&var->list);
> + spin_unlock(&efivars->lock);
> + efivar_unregister(var);
> + drop_nlink(dir);
This should be drop_nlink(dentry->d_inode);
I'm getting warnings when testing Fedora 18 kernel with efivarfs patch
backported. i_nlink underflowed.
[root@localhost ~]# mount -t efivarfs - /sys/firmware/efi/efivars/
[root@localhost ~]# ls -1 /sys/firmware/efi/efivars/ | wc -l
28
[root@localhost ~]# stat -c%h /sys/firmware/efi/efivars/
2
[root@localhost ~]# rm -f /sys/firmware/efi/efivars/*
[ 41.690805] ------------[ cut here ]------------
[ 41.692975] WARNING: at fs/inode.c:280 drop_nlink+0x46/0x50()
[ 41.694546] Modules linked in: nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables iptable_nat nf_nat iptable_mangle nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack vfat fat i2c_piix4 i2c_core microcode virtio_net
[ 41.701583] Pid: 822, comm: rm Tainted: G W 3.6.11-3.fc18.x86_64.debug #1
[ 41.703008] Call Trace:
[ 41.703499] [<ffffffff8106781f>] warn_slowpath_common+0x7f/0xc0
[ 41.704591] [<ffffffff8106787a>] warn_slowpath_null+0x1a/0x20
[ 41.705777] [<ffffffff811eb266>] drop_nlink+0x46/0x50
[ 41.706855] [<ffffffff81553fca>] efivarfs_unlink+0x8a/0xd0
[ 41.707952] [<ffffffff811dd75e>] vfs_unlink+0x9e/0x110
[ 41.710800] [<ffffffff811dd90d>] do_unlinkat+0x13d/0x1a0
[ 41.712096] [<ffffffff810d6b6d>] ? trace_hardirqs_on_caller+0x10d/0x1a0
[ 41.713808] [<ffffffff8110181c>] ? __audit_syscall_entry+0xcc/0x300
[ 41.714983] [<ffffffff8134f50e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 41.716548] [<ffffffff811e025b>] sys_unlinkat+0x1b/0x50
[ 41.717694] [<ffffffff816e7fe9>] system_call_fastpath+0x16/0x1b
[ 41.718995] ---[ end trace 33f799b901d1db9e ]---
[root@localhost ~]# ls -1 /sys/firmware/efi/efivars/ | wc -l
15
[root@localhost ~]# stat -c%h /sys/firmware/efi/efivars/
4294967285
> + dput(dentry);
> + return 0;
> + }
next prev parent reply other threads:[~2012-12-21 5:54 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-26 7:51 [PATCH 00/20] EFI changes for v3.8 Matt Fleming
[not found] ` <1351237923-10313-1-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2012-10-26 7:51 ` [PATCH 01/20] efi: Add support for a UEFI variable filesystem Matt Fleming
[not found] ` <1351237923-10313-2-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2012-10-26 10:10 ` Alan Cox
[not found] ` <20121026111039.4802a3c2-38n7/U1jhRXW96NNrWNlrekiAK3p4hvP@public.gmane.org>
2012-10-26 10:45 ` Matt Fleming
2012-11-02 8:53 ` [PATCH v2 " Matt Fleming
[not found] ` <1351846416.14888.155.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-11-03 0:22 ` Alan Cox
[not found] ` <20121103002249.63eb4142-38n7/U1jhRXW96NNrWNlrekiAK3p4hvP@public.gmane.org>
2012-11-03 0:21 ` Matthew Garrett
[not found] ` <20121103002132.GB18691-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2012-11-04 20:27 ` Matt Fleming
[not found] ` <1352060878.14888.193.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-11-04 20:34 ` Matthew Garrett
[not found] ` <20121104203437.GA23130-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2012-11-04 20:47 ` Matt Fleming
[not found] ` <1352062026.14888.199.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-11-04 20:55 ` Matthew Garrett
2012-11-09 19:39 ` Matt Fleming
2012-11-04 21:06 ` Alan Cox
[not found] ` <20121104210627.6f57662a-38n7/U1jhRXW96NNrWNlrekiAK3p4hvP@public.gmane.org>
2012-11-05 7:42 ` Matt Fleming
2012-12-21 5:54 ` Lingzhu Xiang [this message]
[not found] ` <50D3F995.5000705-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-04 20:58 ` [PATCH " Matt Fleming
[not found] ` <1357333116.8203.50.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-01-05 5:59 ` [PATCH] efivarfs: Drop link count of the right inode Lingzhu Xiang
[not found] ` <44edfa54b80aedb674bdb482eef4f559030d9bf7.1357365172.git.lxiang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-07 13:41 ` joeyli
2013-01-07 16:15 ` Matt Fleming
2012-12-21 11:05 ` General protection fault in efivarfs Lingzhu Xiang
[not found] ` <50D44279.7010008-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-24 11:00 ` joeyli
[not found] ` <1356346840.6113.45.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
2012-12-25 2:24 ` Lingzhu Xiang
[not found] ` <50D90E61.40702-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-25 4:13 ` joeyli
[not found] ` <1356408784.6113.68.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
2012-12-26 6:02 ` joeyli
[not found] ` <1356501732.6113.213.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
2012-12-26 9:21 ` efivarfs: unlinking open files results in spinlock corruption Lingzhu Xiang
[not found] ` <50DAC19A.8060500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-26 10:16 ` joeyli
[not found] ` <1356516962.6113.232.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
2012-12-26 10:40 ` Lingzhu Xiang
2013-01-11 13:22 ` General protection fault in efivarfs Matt Fleming
2013-01-25 7:01 ` efivarfs allows non-canonical GUID and duplicate filenames Lingzhu Xiang
[not found] ` <51022DD7.4010701-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-29 4:44 ` Matthew Garrett
[not found] ` <20130129044418.GD14395-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2013-01-29 5:17 ` Lingzhu Xiang
[not found] ` <51075B56.5050408-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-29 5:25 ` Matthew Garrett
[not found] ` <20130129052532.GA15383-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2013-01-29 5:46 ` Lingzhu Xiang
[not found] ` <51076220.5080001-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-31 19:52 ` Matt Fleming
2012-10-26 7:51 ` [PATCH 02/20] efi: Handle deletions and size changes in efivarfs_write_file Matt Fleming
[not found] ` <1351237923-10313-3-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2012-12-26 10:29 ` File lingers after deletion with efivarfs_write_file Lingzhu Xiang
2012-10-26 7:51 ` [PATCH 03/20] efi: add efivars kobject to efi sysfs folder Matt Fleming
[not found] ` <1351237923-10313-4-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2012-10-26 10:13 ` Alan Cox
[not found] ` <20121026111347.209c11c5-38n7/U1jhRXW96NNrWNlrekiAK3p4hvP@public.gmane.org>
2012-10-26 11:13 ` Matt Fleming
[not found] ` <1351250024.5303.68.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-10-29 6:55 ` joeyli
2012-11-02 8:53 ` [PATCH v2 " Matt Fleming
2012-10-26 7:51 ` [PATCH 04/20] efivarfs: Add documentation for the EFI variable filesystem Matt Fleming
2012-10-26 7:51 ` [PATCH 05/20] x86, mm: Include the entire kernel memory map in trampoline_pgd Matt Fleming
2012-10-26 7:51 ` [PATCH 06/20] x86, efi: 1:1 pagetable mapping for virtual EFI calls Matt Fleming
2012-10-26 7:51 ` [PATCH 07/20] x86/kernel: remove tboot 1:1 page table creation code Matt Fleming
2012-10-26 7:51 ` [PATCH 08/20] x86-64/efi: Use EFI to deal with platform wall clock (again) Matt Fleming
2012-10-26 7:51 ` [PATCH 09/20] efivarfs: efivarfs_file_read ensure we free data in error paths Matt Fleming
2012-10-26 7:51 ` [PATCH 10/20] efivarfs: efivarfs_create() ensure we drop our reference on inode on error Matt Fleming
2012-10-26 7:51 ` [PATCH 11/20] efivarfs: efivarfs_fill_super() fix inode reference counts Matt Fleming
2012-10-26 7:51 ` [PATCH 12/20] efivarfs: efivarfs_fill_super() ensure we free our temporary name Matt Fleming
2012-10-26 7:51 ` [PATCH 13/20] efivarfs: efivarfs_fill_super() ensure we clean up correctly on error Matt Fleming
2012-10-26 7:51 ` [PATCH 14/20] efivarfs: Implement exclusive access for {get,set}_variable Matt Fleming
2012-10-26 7:51 ` [PATCH 15/20] efi: Clarify GUID length calculations Matt Fleming
2012-10-26 7:51 ` [PATCH 16/20] efivarfs: Return an error if we fail to read a variable Matt Fleming
[not found] ` <1351237923-10313-17-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2012-11-02 8:53 ` [PATCH v2 " Matt Fleming
[not found] ` <1351846434.14888.157.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-12-21 7:08 ` Lingzhu Xiang
[not found] ` <50D40ADF.4050700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-11 13:24 ` Matt Fleming
2012-10-26 7:52 ` [PATCH 17/20] efivarfs: Replace magic number with sizeof(attributes) Matt Fleming
[not found] ` <1351237923-10313-18-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2012-12-26 9:24 ` Lingzhu Xiang
[not found] ` <50DAC252.5030308-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-11 13:30 ` Matt Fleming
2012-10-26 7:52 ` [PATCH 18/20] efivarfs: Add unique magic number Matt Fleming
2012-10-26 7:52 ` [PATCH 19/20] efivarfs: Make 'datasize' unsigned long Matt Fleming
2012-10-26 7:52 ` [PATCH 20/20] efivarfs: Return a consistent error when efivarfs_get_inode() fails Matt Fleming
2012-11-02 8:54 ` [PATCH 21/20] efivarfs: Fix return value of efivarfs_file_write() Matt Fleming
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=50D3F995.5000705@redhat.com \
--to=lxiang-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=JBeulich-IBi9RG/b67k@public.gmane.org \
--cc=apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=joeyli.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jwboyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org \
--cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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).