From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
To: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: panic at umount in fscache code
Date: Fri, 23 Jul 2010 20:56:05 +0530 [thread overview]
Message-ID: <4C49B48D.9040302@suse.de> (raw)
In-Reply-To: <20100723095229.2c5bd562-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
On 07/23/2010 07:22 PM, Jeff Layton wrote:
> I built a kernel based on Steve's tree, enabled the fscache option and
> got the following panic at umount. I didn't mount with -o fsc or
> anything. I have some other patches on top of Steve's tree, but I'm
> fairly certain they wouldn't affect this.
>
> For the record, here's the fstab entry (with anonymized names):
>
> //server.example.com/scratch /mnt/anonymous cifs sec=none,user,noperm,noauto 0 0
>
> Disabling the fscache stuff at build time makes the problem go away.
>
> ------------------------------[snip]------------------------------
>
> general protection fault: 0000 [#1] SMP
> last sysfs file: /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
Could you please check whether the below patch fixes the problem?
Thanks,
From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
Subject: [PATCH] cifs: relinquish fscache cookie before freeing CIFSTconInfo
Doh, fix a use after free bug.
Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
---
fs/cifs/connect.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 399b601..5480025 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1842,8 +1842,8 @@ cifs_put_tcon(struct cifsTconInfo *tcon)
CIFSSMBTDis(xid, tcon);
_FreeXid(xid);
- tconInfoFree(tcon);
cifs_fscache_release_super_cookie(tcon);
+ tconInfoFree(tcon);
cifs_put_smb_ses(ses);
}
next prev parent reply other threads:[~2010-07-23 15:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 13:52 panic at umount in fscache code Jeff Layton
[not found] ` <20100723095229.2c5bd562-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-07-23 15:26 ` Suresh Jayaraman [this message]
[not found] ` <4C49B48D.9040302-l3A5Bk7waGM@public.gmane.org>
2010-07-23 15:29 ` Jeff Layton
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=4C49B48D.9040302@suse.de \
--to=sjayaraman-l3a5bk7wagm@public.gmane.org \
--cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.