Re: [RFC PATCH 3/4] xfs: replace ns_capable_noaudit()

Carlos Maiolino <[email protected]>
Newsgroups org.kernel.vger.linux-xfs,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-security-module
Message-ID <[email protected]>
On Thu, Jul 23, 2026 at 08:29:45AM -0500, Serge E. Hallyn wrote:
> On Fri, Jun 26, 2026 at 01:45:22PM +0200, [email protected] wrote:
> > From: Carlos Maiolino <[email protected]>
> > 
> > We don't need to use ns_capable_noaudit() as all we care is the initial
> > user namespace, use capable_noaudit() instead.
> 
> Looks like some of your other xfs fixes conflict with this.  Do
> you mind sending out a new set, and I'll pull them into the caps-next
> branch?

I will Serge, thanks. I was hoping to send a new series this week but I
couldn't, and I'm out next week, so I'll come back to this in a couple
weeks.

Thanks for the heads up!

Carlos

> 
> thanks,
> -serge
> 
> > Signed-off-by: Carlos Maiolino <[email protected]>
> > ---
> >  fs/xfs/xfs_trans_dquot.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
> > index 50e5b323f7f1..30c2f6ec0aac 100644
> > --- a/fs/xfs/xfs_trans_dquot.c
> > +++ b/fs/xfs/xfs_trans_dquot.c
> > @@ -835,7 +835,7 @@ xfs_trans_dqresv(
> >  	if ((flags & XFS_QMOPT_FORCE_RES) == 0 &&
> >  	    dqp->q_id &&
> >  	    xfs_dquot_is_enforced(dqp) &&
> > -	    !ns_capable_noaudit(&init_user_ns, CAP_SYS_RESOURCE)) {
> > +	    !capable_noaudit(CAP_SYS_RESOURCE)) {
> >  		int		quota_nl;
> >  		bool		fatal;
> >  
> > -- 
> > 2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.