Linux block layer
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Ming Lei <ming.lei@redhat.com>, Hannes Reinecke <hare@suse.de>,
	Omar Sandoval <osandov@fb.com>
Subject: Re: [PATCH] sbitmap: Fix sbitmap_put()
Date: Tue, 16 Mar 2021 08:32:44 -0600	[thread overview]
Message-ID: <b578af4d-2a2b-375c-396e-2ad57f6e579e@kernel.dk> (raw)
In-Reply-To: <20210316035420.2584-1-bvanassche@acm.org>

On 3/15/21 9:54 PM, Bart Van Assche wrote:
> This patch fixes the following kernel warning:
> 
> BUG: using smp_processor_id() in preemptible [00000000] code: scsi_eh_0/152
> caller is debug_smp_processor_id+0x17/0x20
> CPU: 1 PID: 152 Comm: scsi_eh_0 Tainted: G        W         5.12.0-rc1-dbg+ #6
> Call Trace:
>  show_stack+0x52/0x58
>  dump_stack+0xaf/0xf3
>  check_preemption_disabled+0xce/0xd0
>  debug_smp_processor_id+0x17/0x20
>  scsi_device_unbusy+0x13a/0x1c0 [scsi_mod]
>  scsi_finish_command+0x4d/0x290 [scsi_mod]
>  scsi_eh_flush_done_q+0x1e7/0x280 [scsi_mod]
>  ata_scsi_port_error_handler+0x592/0x750 [libata]
>  ata_scsi_error+0x1a0/0x1f0 [libata]
>  scsi_error_handler+0x19e/0x330 [scsi_mod]
>  kthread+0x222/0x250
>  ret_from_fork+0x1f/0x30

It'd be nice to have a bit of a description in here on what is being
fixed, eg that we're preemptible and cannot safely use this_cpu_ptr(),
and why that it's OK to use raw_cpu_ptr() instead for this particular
application.

-- 
Jens Axboe


  parent reply	other threads:[~2021-03-16 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  3:54 [PATCH] sbitmap: Fix sbitmap_put() Bart Van Assche
2021-03-16  6:35 ` Ming Lei
2021-03-16 14:32 ` Jens Axboe [this message]
2021-03-16 19:37   ` Bart Van Assche

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=b578af4d-2a2b-375c-396e-2ad57f6e579e@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=osandov@fb.com \
    /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