mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@inai.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: NULL deref around blkmq in v4.0-rc1–rc7
Date: Fri, 10 Apr 2015 00:32:50 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.20.1504100030270.14912@nerf40.vanv.qr> (raw)
In-Reply-To: <5526F25B.5010501@kernel.dk>


On Thursday 2015-04-09 23:42, Jens Axboe wrote:
>
>> So I don't actually expect my patch to really make any difference,
>> although I do think that code should be looked at.
>
> Jan, is it always clearing in a page size? That seems odd, especially if we're
> considering random gunk in memory.

The particular memset in scsi_init_cmd_errh would only clear
SCSI_SENSE_BUFFERSIZE. The problem really was that cmd->sense_buffer
was nonsensical (I did a hexdump) and read 0x1000. In one instance,
it even read 0x10000 because I used that value in an if clause
preceding a printk statement I added. Together with __GFP_ZERO
apparently fixing the issue for today, the noninitialized memory
theory looks like the most applicable one to me currently.

  reply	other threads:[~2015-04-09 22:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 13:41 NULL deref around xfs " Jan Engelhardt
2015-04-08 15:20 ` Jan Engelhardt
2015-04-09 17:38   ` Linus Torvalds
2015-04-09 18:24     ` NULL deref around blkmq " Jan Engelhardt
2015-04-09 21:12       ` Linus Torvalds
2015-04-09 21:25         ` Jens Axboe
2015-04-09 21:37           ` Linus Torvalds
2015-04-09 21:42             ` Jens Axboe
2015-04-09 22:32               ` Jan Engelhardt [this message]
2015-04-09 22:29         ` Jan Engelhardt
2015-04-10  0:07           ` Linus Torvalds
2015-04-11 17:46             ` Linus Torvalds
2015-04-11 17:47               ` Jens Axboe
2015-04-11 19:48               ` Jan Engelhardt

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=alpine.LSU.2.20.1504100030270.14912@nerf40.vanv.qr \
    --to=jengelh@inai.de \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=torvalds@linux-foundation.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®