Bug 12926
Summary: | Oops while mv | ||
---|---|---|---|
Product: | File System | Reporter: | Gerard Alquézar (galquezar) |
Component: | CIFS | Assignee: | Steve French (sfrench) |
Status: | RESOLVED CODE_FIX | ||
Severity: | high | CC: | galquezar, jlayton, sfrench, shirishp |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.28 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
Share settings
patch -- only try unlinking positive dentries fix so cifs_unlink does not oops even if passed negative dentry |
Description
Gerard Alquézar
2009-03-24 05:50:40 UTC
Looking into this. Where is the source file (a) and where is it being moved (b)? Is source file on the server share being moved to another file on the same server share? It is a read-only filesystem but mount option is rw. Is this a samba share you are trying to mount and if so, can you paste the share stanza in smb.conf from the server? Sorry, i didn't explain very well. It happen when you move or rename a file into same share folder. I know i should mount with ro option however it allowed discover this bug. Remote filesystems is a windows vista share folder if you like i can send you folder settings. If you can send folder settings, that would help, will try to recreate the bug. With samba read-only share, it did not allow move. Created attachment 20975 [details]
Share settings
yes, it (mv) crashed my system with a Windows share mounted with similar folder settings. Let me try again with samba server again with a share with similar permissions. http://git.kernel.org/?p=linux/kernel/git/sfrench/cifs-2.6.git;a=commitdiff;h=14121bdccc17b8c0e4368a9c0e4f82c3dd47f240 Will wait for Jeff Layton's comment on this. Thanks for the bug report, I've been able to reproduce this too. I'm still looking at the problem, but I don't think that patch is quite what we want. I suspect that the issue is that target_dentry is a negative dentry. We probably just need to check for that before calling cifs_unlink here. Let me experiment a bit... Created attachment 21032 [details]
patch -- only try unlinking positive dentries
Does this patch also fix it for you?
I tried the patch, it works. No crash and permission denied error, as prior. Thanks. Fixed by http://bugzilla.kernel.org/attachment.cgi?id=21032 which avoids the call to cifs_unlink in that case, and a fix to cifs_unlink so it wouldn't oops even if called that way (I will attach git changeset ff6945279d45edd8f6b0a5ddb1ef16cecce3ea9c from the linux kernel tree) Created attachment 21336 [details]
fix so cifs_unlink does not oops even if passed negative dentry
Fixed now in mainline |