All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: Christian Brauner <brauner@kernel.org>,
	Jeff Layton <jlayton@kernel.org>,
	linux-kernel@vger.kernel.org,
	Matthew Wilcox <willy@infradead.org>,
	dhowells@redhat.com, Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, netfs@lists.linux.dev,
	linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH] vfs: Fix potential circular locking through setxattr() and removexattr()
Date: Wed, 24 Jul 2024 09:11:16 +0100	[thread overview]
Message-ID: <2237318.1721808676@warthog.procyon.org.uk> (raw)
In-Reply-To: <20240723125710.mtnfaycuvdi4dpdy@quack3>

Jan Kara <jack@suse.cz> wrote:

> > +	error = strncpy_from_user(kname, name, sizeof(kname));
> > +	if (error == 0 || error == sizeof(kname))
> > +		error = -ERANGE;
> > +	if (error < 0)
> > +		return error;
> 
> Missing fdput() here.

Thanks.  I think Christian is altering the patch to use auto-destruction
constructs (CLASS()).

David


WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: dhowells@redhat.com, Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>,
	Jeff Layton <jlayton@kernel.org>, Gao Xiang <xiang@kernel.org>,
	Matthew Wilcox <willy@infradead.org>,
	netfs@lists.linux.dev, linux-erofs@lists.ozlabs.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfs: Fix potential circular locking through setxattr() and removexattr()
Date: Wed, 24 Jul 2024 09:11:16 +0100	[thread overview]
Message-ID: <2237318.1721808676@warthog.procyon.org.uk> (raw)
In-Reply-To: <20240723125710.mtnfaycuvdi4dpdy@quack3>

Jan Kara <jack@suse.cz> wrote:

> > +	error = strncpy_from_user(kname, name, sizeof(kname));
> > +	if (error == 0 || error == sizeof(kname))
> > +		error = -ERANGE;
> > +	if (error < 0)
> > +		return error;
> 
> Missing fdput() here.

Thanks.  I think Christian is altering the patch to use auto-destruction
constructs (CLASS()).

David


  reply	other threads:[~2024-07-24  8:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  8:59 [PATCH] vfs: Fix potential circular locking through setxattr() and removexattr() David Howells
2024-07-23  8:59 ` David Howells
2024-07-23 10:45 ` Jan Kara
2024-07-23 10:45   ` Jan Kara
2024-07-23 11:11   ` Christian Brauner
2024-07-23 11:11     ` Christian Brauner
2024-07-23 12:32     ` Jan Kara
2024-07-23 12:32       ` Jan Kara
2024-07-23 13:57   ` David Howells
2024-07-23 13:57     ` David Howells
2024-07-23 15:40     ` Christian Brauner
2024-07-23 15:40       ` Christian Brauner
2024-07-24 13:30     ` Jan Kara
2024-07-24 13:30       ` Jan Kara
2024-07-29 15:28       ` Christian Brauner
2024-07-29 15:28         ` Christian Brauner
2024-07-31 18:16         ` Jan Kara
2024-07-31 18:16           ` Jan Kara
2024-07-31 18:27           ` Matthew Wilcox
2024-07-31 18:27             ` Matthew Wilcox
2024-07-31 18:55             ` Jan Kara
2024-07-31 18:55               ` Jan Kara
2024-07-24  1:34   ` Dave Chinner via Linux-erofs
2024-07-24  1:34     ` Dave Chinner
2024-07-24  2:42     ` Matthew Wilcox
2024-07-24  2:42       ` Matthew Wilcox
2024-07-23 12:57 ` Jan Kara
2024-07-23 12:57   ` Jan Kara
2024-07-24  8:11   ` David Howells [this message]
2024-07-24  8:11     ` David Howells

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=2237318.1721808676@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfs@lists.linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.