From: Takashi Iwai <tiwai@suse.de>
To: Karsten Wiese <annabellesgarden@yahoo.de>
Cc: mingo@elte.hu, alsa-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Reset file->f_op in snd_card_file_remove()
Date: Thu, 28 Sep 2006 12:08:35 +0200 [thread overview]
Message-ID: <s5h4puspal8.wl%tiwai@suse.de> (raw)
In-Reply-To: <200609272127.51980.annabellesgarden@yahoo.de>
At Wed, 27 Sep 2006 21:27:51 +0200,
Karsten Wiese wrote:
>
> Hi
>
> This patch helps prevent an oops on 2.6.18-rt3,
> when my usb usx2y soundcard disconnects.
> Physically disconnects or "rmmod uhci_hc" both oops 1in7.
>
> With this patch still no oops after > 1000 disconnects.
>
> Please apply/comment.
>
> thanks,
> Karsten
>
> ===
>
> Reset file->f_op in snd_card_file_remove()
>
> When passing here in response to an usb disconnect,
> file->f_op has been replaced with a kmalloc()ed version,
> that would only allow releases.
>
> It will be free()ed later on in snd_card_free().
> Here it happened sometimes, that the free()ed, not NULLed file->f_op
> caused an oops in module_put() called by fops_put() still later on.
>
> Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
snd_card_file_remove() is not a right place to do that, IMO.
Could you check whether this problem still happens on post-2.6.18?
There are a lot of fixes in this area after 2.6.18.
Takashi
>
>
>
> --- rt3/sound/core/init.c 2006-09-23 20:03:18.000000000 +0200
> +++ rt3-kw/sound/core/init.c 2006-09-27 20:44:54.000000000 +0200
> @@ -722,6 +722,7 @@ int snd_card_file_remove(struct snd_card
> mfile = card->files;
> while (mfile) {
> if (mfile->file == file) {
> + file->f_op = NULL;
> if (pfile)
> pfile->next = mfile->next;
> else
>
>
>
>
>
> ___________________________________________________________
> Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
>
next parent reply other threads:[~2006-09-28 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200609272127.51980.annabellesgarden@yahoo.de>
2006-09-28 10:08 ` Takashi Iwai [this message]
2006-09-28 11:39 ` karsten wiese
2006-09-28 11:46 ` [Alsa-devel] " karsten wiese
2006-09-28 12:51 ` Takashi Iwai
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=s5h4puspal8.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=annabellesgarden@yahoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®