linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: jon ernst <jonernst07@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: fix a bug when we try to open a file with O_TMPFILE flag
Date: Tue, 23 Jul 2013 17:59:28 +0800	[thread overview]
Message-ID: <20130723095928.GA3278@gmail.com> (raw)
In-Reply-To: <CAGW2f1GqTR8xtE_bEN3O+QrRy75h9EjHYkYVnn7-vaoRucaQzg@mail.gmail.com>

On Tue, Jul 23, 2013 at 07:51:41AM +0000, jon ernst wrote:
> Hi Zheng,
> 
> I updated my kernel code to this commit, built kernel and loaded this kernel.
> I checked "uname -r", it is 3.11.0-rc1+ But when I run your test code,
> I always got "O_TMPFILE" undeclared.
> Could you please help, what could be wrong? (I included fcntl.h)

Ah, actually I used the following program to hit the bug.  Just for your
information.  Please let me know if you have any question.

Regards,
                                                - Zheng

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>

#define __O_TMPFILE	020000000
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)

int main(int argc, char *argv[])
{
	int fd;

	fd = open(argv[1], O_RDWR|O_TMPFILE);
	if (fd < 0) {
		perror("open ");
		return -1;
	}
	close(fd);
	return 0;
}

  reply	other threads:[~2013-07-23  9:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 16:19 kernel BUG at fs/ext4/namei.c:2572! Dave Jones
2013-07-19  1:17 ` Zheng Liu
2013-07-19 12:14 ` [PATCH] ext4: fix a bug when we try to open a file with O_TMPFILE flag Zheng Liu
2013-07-19 19:31   ` Darrick J. Wong
2013-07-19 20:01     ` Dave Jones
2013-07-19 23:36   ` Al Viro
2013-07-20 16:37     ` Zheng Liu
2013-07-21  0:56       ` Theodore Ts'o
2013-07-21  2:45     ` [GIT PULL] " Theodore Ts'o
2013-07-21  3:16       ` Linus Torvalds
2013-07-23  7:51   ` jon ernst
2013-07-23  9:59     ` Zheng Liu [this message]
2013-07-23 13:39       ` jon ernst
2013-07-23 23:38         ` Zheng Liu
2013-07-24 21:58           ` jon ernst
2013-07-25  0:13             ` [PATCH] vfs: add missing check for __O_TMPFILE in fcntl_init() (Re: [PATCH] ext4: fix...) Zheng Liu
2013-07-25  1:17               ` jon ernst
2013-07-29  6:17               ` Zheng Liu

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=20130723095928.GA3278@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=jonernst07@gmail.com \
    --cc=linux-ext4@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).