[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <E1Iac1o-0005bH-00@dorka.pomaz.szeredi.hu>
Date: Wed, 26 Sep 2007 20:54:32 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: haveblue@...ibm.com
CC: miklos@...redi.hu, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, hch@...radead.org
Subject: Re: missing mnt_drop_write() on open error
> > Btw, may_open() doesn't do mnt_want_write() around the truncation if
> > file is opened with O_TRUNC | O_RDONLY.
>
> What's the path to may_open() in that case? open_namei() should wrap
> all callers other than nfs, and it does:
>
> /* O_TRUNC implies we need access checks for write permissions */
> if (flag & O_TRUNC)
> acc_mode |= MAY_WRITE;
>
> Which should trigger the may_open() code.
Ah, I missed that.
Thanks,
Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists