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-next>] [day] [month] [year] [list]
Date:	Thu, 11 Sep 2008 13:17:29 -0700
From:	Geoff Levand <geoffrey.levand@...sony.com>
To:	Jens Axboe <jens.axboe@...cle.com>
CC:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: blk: queue cleanup at device shutdown

Hi Jens,

I'm wondering about what is needed in ps3disk_remove(), to clean
up the request_queue (priv->queue) the driver uses.
ps3disk_remove() is called from the main device_shutdown()
routine via the ps3_system_bus remove routine.

The current code follows, and as can be seen, there is no check
or handling of the queue before blk_cleanup_queue() is called.
Can it be assumed that the queue is empty at this point,
or is something else needed here?

-Geoff

static int ps3disk_remove(struct ps3_system_bus_device *_dev)
{
	struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
	struct ps3disk_private *priv = dev->sbd.core.driver_data;

	mutex_lock(&ps3disk_mask_mutex);
	__clear_bit(priv->gendisk->first_minor / PS3DISK_MINORS,
		    &ps3disk_mask);
	mutex_unlock(&ps3disk_mask_mutex);

	del_gendisk(priv->gendisk);
	blk_cleanup_queue(priv->queue);
	put_disk(priv->gendisk);
	dev_notice(&dev->sbd.core, "Synchronizing disk cache\n");
	ps3disk_sync_cache(dev);
	ps3stor_teardown(dev);
	kfree(dev->bounce_buf);
	dev->bounce_buf = NULL;
	kfree(priv);
	dev->sbd.core.driver_data = NULL;
	return 0;
}







--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ