From: Pavel Emelyanov <xemul@parallels.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linux Netdev List <netdev@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Recent Linus' tree, kernel BUG at fs/inode.c:1436!
Date: Fri, 19 Dec 2014 15:08:42 +0300 [thread overview]
Message-ID: <5494154A.5040402@parallels.com> (raw)
In-Reply-To: <20141219120129.GX22149@ZenIV.linux.org.uk>
On 12/19/2014 03:01 PM, Al Viro wrote:
> On Fri, Dec 19, 2014 at 02:34:00PM +0300, Pavel Emelyanov wrote:
>> Hi,
>>
>> It looks like there's a strange refcount underflow in VFS/socket code.
>> The proggie [1] crashes the recent Linus' tree (d790be38 Merge tag
>> 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux)
>> with the calltrace [2].
>>
>> If in the proggie the psk is replaced with non-socket descriptor the
>> issue doesn't appear.
>
> Gyah... mismerge on cherry-pick. My fault - ->i_fop assignment should've
> been removed from sock_alloc_file() in bd9b51. Could you verify that the
> following recovers the things?
>
> diff --git a/net/socket.c b/net/socket.c
> index 70bbde6..a2c33a4 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -372,7 +372,6 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)
> path.mnt = mntget(sock_mnt);
>
> d_instantiate(path.dentry, SOCK_INODE(sock));
> - SOCK_INODE(sock)->i_fop = &socket_file_ops;
>
> file = alloc_file(&path, FMODE_READ | FMODE_WRITE,
> &socket_file_ops);
> .
>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
This also makes socket non-open-able back again, which, in turn, was
another issue I was surprised with on the new kernel :)
Thanks,
Pavel
prev parent reply other threads:[~2014-12-19 12:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 11:34 Recent Linus' tree, kernel BUG at fs/inode.c:1436! Pavel Emelyanov
2014-12-19 12:01 ` Al Viro
2014-12-19 12:08 ` Pavel Emelyanov [this message]
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=5494154A.5040402@parallels.com \
--to=xemul@parallels.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).