mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Doug Warzecha <Douglas_Warzecha@dell.com>
Subject: BUG: using smp_processor_id() in preemptible [00000000] code: dellWirelessCtl/...
Date: Mon, 5 Jan 2009 20:03:42 +0100	[thread overview]
Message-ID: <20090105190342.GB6029@blimp.localdomain> (raw)

I see this often (all the time) with v2.6.28-5716-gfe0bdec. It is a
Dell XPS M1330 (iwl3945, the newer, "...-2" firmware).

Jan  5 19:49:36 blimp kernel: BUG: using smp_processor_id() in preemptible [00000000] code: dellWirelessCtl/14180
Jan  5 19:49:36 blimp kernel: caller is smi_request+0x89/0xc8
Jan  5 19:49:36 blimp kernel: Pid: 14180, comm: dellWirelessCtl Not tainted 2.6.28-t #146
Jan  5 19:49:36 blimp kernel: Call Trace:
Jan  5 19:49:36 blimp kernel:  [<ffffffff8033ee83>] debug_smp_processor_id+0xdb/0xf0
Jan  5 19:49:36 blimp kernel:  [<ffffffff8046a6d8>] smi_request+0x89/0xc8
Jan  5 19:49:36 blimp kernel:  [<ffffffff8046a78e>] smi_request_store+0x77/0xa5
Jan  5 19:49:36 blimp kernel:  [<ffffffff803c69cb>] dev_attr_store+0x1e/0x20
Jan  5 19:49:36 blimp kernel:  [<ffffffff802e66e8>] sysfs_write_file+0xe4/0x119
Jan  5 19:49:36 blimp kernel:  [<ffffffff802a0084>] vfs_write+0xae/0x124
Jan  5 19:49:36 blimp kernel:  [<ffffffff802a01be>] sys_write+0x47/0x70
Jan  5 19:49:36 blimp kernel:  [<ffffffff8020b69b>] system_call_fastpath+0x16/0x1b

The function smi_request:

/**
 * smi_request: generate SMI request
 *
 * Called with smi_data_lock.
 */
static int smi_request(struct smi_cmd *smi_cmd)
{
	cpumask_t old_mask;
	int ret = 0;

	if (smi_cmd->magic != SMI_CMD_MAGIC) {
		dev_info(&dcdbas_pdev->dev, "%s: invalid magic value\n",
			 __func__);
		return -EBADR;
	}

	/* SMI requires CPU 0 */
	old_mask = current->cpus_allowed;
	set_cpus_allowed_ptr(current, &cpumask_of_cpu(0));
	if (smp_processor_id() != 0) {			    <==== here?
		dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n",
			__func__);
		ret = -EBUSY;
		goto out;
	}

	/* generate SMI */
	asm volatile (
		"outb %b0,%w1"
		: /* no output args */
		: "a" (smi_cmd->command_code),
		  "d" (smi_cmd->command_address),
		  "b" (smi_cmd->ebx),
		  "c" (smi_cmd->ecx)
		: "memory"
	);

out:
	set_cpus_allowed_ptr(current, &old_mask);
	return ret;
}


                 reply	other threads:[~2009-01-05 19:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090105190342.GB6029@blimp.localdomain \
    --to=raa.lkml@gmail.com \
    --cc=Douglas_Warzecha@dell.com \
    --cc=linux-kernel@vger.kernel.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 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®