mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH -rt] scheduling while atomic in fs/file.c
Date: Sat, 22 Apr 2006 08:03:32 -0700	[thread overview]
Message-ID: <200604221503.k3MF3Ws8021873@dwalker1.mvista.com> (raw)

In free_fdtable_rcu() it does the following,

        } else {
                fddef = &get_cpu_var(fdtable_defer_list);
                spin_lock(&fddef->lock);
		...
                spin_unlock(&fddef->lock);
                put_cpu_var(fdtable_defer_list);
        }

I've never seen a scheduling while atomic, but seems like
it could happen . Not much contention on this lock though.

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

Index: linux-2.6.16/fs/file.c
===================================================================
--- linux-2.6.16.orig/fs/file.c
+++ linux-2.6.16/fs/file.c
@@ -137,7 +137,7 @@ static void free_fdtable_rcu(struct rcu_
 		kfree(fdt->fd);
 		kfree(fdt);
 	} else {
-		fddef = &get_cpu_var(fdtable_defer_list);
+		fddef = &__get_cpu_var(fdtable_defer_list);
 		spin_lock(&fddef->lock);
 		fdt->next = fddef->next;
 		fddef->next = fdt;
@@ -149,7 +149,6 @@ static void free_fdtable_rcu(struct rcu_
 		if (!schedule_work(&fddef->wq))
 			mod_timer(&fddef->timer, 5);
 		spin_unlock(&fddef->lock);
-		put_cpu_var(fdtable_defer_list);
 	}
 }
 

             reply	other threads:[~2006-04-22 18:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-22 15:03 Daniel Walker [this message]
2006-05-03 20:45 ` Ingo Molnar
2006-05-03 20:43   ` Daniel Walker
2006-05-14 15:45 Daniel Walker
2006-05-14 16:44 ` Steven Rostedt
2006-05-14 17:32   ` Daniel Walker
2006-05-15  6:43     ` Steven Rostedt
2006-05-15  7:04       ` Steven Rostedt
2006-05-15 13:37         ` Daniel Walker
2006-05-15 14:03           ` Steven Rostedt
2006-05-15 13:51         ` Daniel Walker
2006-05-15 14:05           ` Steven Rostedt
2006-05-16 16:28 Daniel Walker
2006-05-18  7:55 ` Ingo Molnar

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=200604221503.k3MF3Ws8021873@dwalker1.mvista.com \
    --to=dwalker@mvista.com \
    --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

Powered by JetHome