lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180731202448.229487-15-toddpoynor@gmail.com>
Date:   Tue, 31 Jul 2018 13:24:47 -0700
From:   Todd Poynor <toddpoynor@...il.com>
To:     Rob Springer <rspringer@...gle.com>,
        John Joseph <jnjoseph@...gle.com>,
        Ben Chan <benchan@...omium.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Dmitry Torokhov <dtor@...omium.org>, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, Todd Poynor <toddpoynor@...gle.com>
Subject: [PATCH 14/15] Revert "staging: gasket: page table: hold references to device and pci_dev"

From: Todd Poynor <toddpoynor@...gle.com>

gasket_free_dev() is called only from driver PCI probe and remove
function. It is guaranteed that that pci_dev structure is not going
anywhere during that time; there is no need to take this additional
reference.

This reverts commit dd9d1502feea3c23d412f289aad79e1d4e86d45d.

Reported-by: Dmitry Torokhov <dtor@...omium.org>
Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
---
 drivers/staging/gasket/gasket_page_table.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_table.c
index 13e1d0952a47..ed6ab3c5f038 100644
--- a/drivers/staging/gasket/gasket_page_table.c
+++ b/drivers/staging/gasket/gasket_page_table.c
@@ -280,7 +280,7 @@ int gasket_page_table_init(struct gasket_page_table **ppg_tbl,
 	pg_tbl->extended_offset_reg =
 		(u64 __iomem *)&bar_data->virt_base[page_table_config->extended_reg];
 	pg_tbl->device = get_device(device);
-	pg_tbl->pci_dev = pci_dev_get(pci_dev);
+	pg_tbl->pci_dev = pci_dev;
 
 	dev_dbg(device, "Page table initialized successfully\n");
 
@@ -378,7 +378,6 @@ void gasket_page_table_cleanup(struct gasket_page_table *pg_tbl)
 	pg_tbl->entries = NULL;
 
 	put_device(pg_tbl->device);
-	pci_dev_put(pg_tbl->pci_dev);
 	kfree(pg_tbl);
 }
 
-- 
2.18.0.345.g5c9ce644c3-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ