Skip to contentSkip to conversation

more vfs.git stuff

GIT PULL Al Viro 2 participants 6 messages May 9, 2013 VFS

lore
Share & tools
lore

Al Viro

author maintainer
#0 lore raw

Regression fix from Geert + yet another open-coded kernel_read().
Please, pull from
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-linus Shortlog:
Al Viro (1):
ecryptfs: don't open-code kernel_read()

Geert Uytterhoeven (1):
xtensa simdisk: Fix proc_create_data() conversion fallout

Diffstat:

 arch/xtensa/platforms/iss/simdisk.c |    4 ++--
 fs/ecryptfs/read_write.c            |    9 +--------
 2 files changed, 3 insertions(+), 10 deletions(-)
#1 lore raw
Quoted 1 line · Al Viro

Regression fix from Geert + yet another open-coded kernel_read().

Hmm. I get one more commit - a racy usbmon thing. Which looks fine per se, but would look even better if it just made mmap_active an atomic_t instead, wouldn't you say?

So I didn't pull, waiting for clarification.

Linus

#2 lore raw
Quoted 4 lines · Linus Torvalds

Hmm. I get one more commit - a racy usbmon thing. Which looks fine per se, but would look even better if it just made mmap_active an atomic_t instead, wouldn't you say?

Oh, I see, the spinlock protects the read too and the logic there. Not that I'm at all sure we care, since if that code races with somebody else doing an mmap, there's a race at a much higher level anyway. So I don't think the spinlock really gives any more serialization between the reading/writing of that mmap_active count. You're going to get either the old or the new value anyway, and an atomic will do that too.

So whatever. I just don't want to pull stuff that gets me unexpected patches that weren't in the pull request.

Linus

author maintainer
#3 lore raw
In reply to Linus Torvalds
Quoted 4 lines · Linus Torvalds
Quoted 1 line · Al Viro

Regression fix from Geert + yet another open-coded kernel_read().

Hmm. I get one more commit - a racy usbmon thing.

Oops - pull stats not updated... My apologies.

Quoted 3 lines

Which looks fine per
se, but would look even better if it just made mmap_active an atomic_t instead, wouldn't you say?

The only place checking that sucker is in a fairly large area protected by ->b_lock (in mon_bin_event()); I really don't want to dig deep enough to tell if having it changed right after it had been checked is safe. OTOH, from a cursory look through that code it appears that the whole map_count thing is completely misguided - it seems to assume that ->open() is called for each VMA, including the one created by mmap(2). Sigh...

OK, it might make more sense to drop that last commit for now. It's obviously more broken in mmap-related code than just a buggered locking for counter and it probably doesn't make much sense to patch just that one. And I'll have several more fixes of similar turds tomorrow, when mchehab finishes testing videobuf ones. Up to you, really.

author maintainer
#4 lore raw
Quoted 6 lines · Al Viro

The only place checking that sucker is in a fairly large area protected by ->b_lock (in mon_bin_event()); I really don't want to dig deep enough to tell if having it changed right after it had been checked is safe. OTOH, from a cursory look through that code it appears that the whole map_count thing is completely misguided - it seems to assume that ->open() is called for each VMA, including the one created by mmap(2). Sigh...

Less cursory one shows that they do call their ->open() from their ->mmap(). OTOH, the code looking and ->mmap_active looks fishy - what happens if we do allocation before mmap() happens?

Anyway, let's just drop that commit for now; it clearly needs more RTFS. Could you pull for-linus^?

#5 lore raw
Quoted 3 lines · Al Viro

Anyway, let's just drop that commit for now; it clearly needs more RTFS. Could you pull for-linus^?

Done.

Linus