public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Xiaotian Feng <xtfeng@gmail.com>
Cc: Xiaotian Feng <dannyfeng@tencent.com>,
	Jeff Garzik <jgarzik@redhat.com>,
	James Bottomley <JBottomley@Parallels.com>,
	stable@kernel.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [libata] scsi: fix Null pointer dereference on disk error
Date: Fri, 14 Dec 2012 09:40:58 -0500	[thread overview]
Message-ID: <50CB3A7A.9040400@pobox.com> (raw)
In-Reply-To: <1355386339-11411-1-git-send-email-xtfeng@gmail.com>

On 12/13/2012 03:12 AM, Xiaotian Feng wrote:
> Following oops were observed when disk error happened:
>
> [ 4272.896937] sd 0:0:0:0: [sda] Unhandled error code
> [ 4272.896939] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
> [ 4272.896942] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 5a de a7 00 00 08 00
> [ 4272.896951] end_request: I/O error, dev sda, sector 5955239
> [ 4291.574947] BUG: unable to handle kernel NULL pointer dereference at (null)
> [ 4291.658305] IP: [] ahci_activity_show+0x1/0x40
> [ 4291.730090] PGD 76dbbc067 PUD 6c4fba067 PMD 0
> [ 4291.783408] Oops: 0000 [#1] SMP
> [ 4291.822100] last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/sw_activity
> [ 4291.934235] CPU 9
> [ 4291.958301] Pid: 27942, comm: hwinfo ......
>
> ata_scsi_find_dev could return NULL, so ata_scsi_activity_{show,store} should check if atadev is NULL.
>
> Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
> Cc: Jeff Garzik <jgarzik@redhat.com>
> Cc: James Bottomley <JBottomley@Parallels.com>
> Cc: stable@kernel.org
> Cc: linux-ide@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>   drivers/ata/libata-scsi.c |    6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)

applied




      reply	other threads:[~2012-12-14 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-13  8:12 [PATCH] [libata] scsi: fix Null pointer dereference on disk error Xiaotian Feng
2012-12-14 14:40 ` Jeff Garzik [this message]

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=50CB3A7A.9040400@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=JBottomley@Parallels.com \
    --cc=dannyfeng@tencent.com \
    --cc=jgarzik@redhat.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=xtfeng@gmail.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