]> git.baikalelectronics.ru Git - kernel.git/commit
ahci: fix Null pointer dereference in achi_host_active()
authorXiaotian Feng <xtfeng@gmail.com>
Tue, 23 Jul 2013 03:54:10 +0000 (11:54 +0800)
committerTejun Heo <tj@kernel.org>
Tue, 23 Jul 2013 14:25:32 +0000 (10:25 -0400)
commit6d96eef27118ad025330bf66fd4b85b6e9720801
tree5981ac59d9a7d706a397a568cf4e447bc318b135
parent4f3d849dfe811f4ada4c9dbddcf6b213c0686b55
ahci: fix Null pointer dereference in achi_host_active()

commit 2f0ee758 (AHCI: Make distinct names for ports in /proc/interrupts)
introuded a regression, which resulted Null pointer dereference for achi
host with dummy ports. For ahci ports, when the port is dummy port, its
private_data will be NULL, as ata_dummy_port_ops doesn't support ->port_start.

changes in v2: use pp to check dummy ports, update comments

Reported-and-tested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Xiaotian Feng <xtfeng@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
drivers/ata/ahci.c