diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 14:53:04 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 14:53:04 (GMT) |
commit | ed2e5581d2702743460349e494f3ab8c4b0f28d8 (patch) | |
tree | 58c4d331766807bf45c48c8a5123a90db04e87f1 | |
parent | 81280572ca6f54009edfa4deee563e8678784218 (diff) | |
parent | 6fa977520871b1fc0be64247abad02b678c13fda (diff) | |
download | linux-fsl-qoriq-ed2e5581d2702743460349e494f3ab8c4b0f28d8.tar.xz |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
cciss: remove overlapping PCI IDs
block: cciss: fix information leak to userland
drivers/block/aoe/aoeblk.c: ratelimit a warning printk
drivers/block/z2ram.c: correct printing of sector_t
aoe: don't use flush_scheduled_work()
drivers/block/drbd/drbd_main.c: fix error path
loop: Properly clear sysfs in autoclear mode
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 4 | ||||
-rw-r--r-- | drivers/block/aoe/aoedev.c | 4 | ||||
-rw-r--r-- | drivers/block/cciss.c | 37 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 2 | ||||
-rw-r--r-- | drivers/block/loop.c | 2 | ||||
-rw-r--r-- | drivers/block/z2ram.c | 6 |
6 files changed, 11 insertions, 44 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index f21c237..541e188 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c @@ -4,12 +4,14 @@ * block device routines */ +#include <linux/kernel.h> #include <linux/hdreg.h> #include <linux/blkdev.h> #include <linux/backing-dev.h> #include <linux/fs.h> #include <linux/ioctl.h> #include <linux/slab.h> +#include <linux/ratelimit.h> #include <linux/genhd.h> #include <linux/netdevice.h> #include <linux/mutex.h> @@ -207,7 +209,7 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio) spin_lock_irqsave(&d->lock, flags); if ((d->flags & DEVFL_UP) == 0) { - printk(KERN_INFO "aoe: device %ld.%d is not up\n", + pr_info_ratelimited("aoe: device %ld.%d is not up\n", d->aoemajor, d->aoeminor); spin_unlock_irqrestore(&d->lock, flags); mempool_free(buf, d->bufpool); diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index 0849280..6b5110a 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c @@ -102,6 +102,7 @@ aoedev_freedev(struct aoedev *d) { struct aoetgt **t, **e; + cancel_work_sync(&d->work); if (d->gd) { aoedisk_rm_sysfs(d); del_gendisk(d->gd); @@ -135,7 +136,6 @@ aoedev_flush(const char __user *str, size_t cnt) all = !strncmp(buf, "all", 3); } - flush_scheduled_work(); spin_lock_irqsave(&devlist_lock, flags); dd = &devlist; while ((d = *dd)) { @@ -257,8 +257,6 @@ aoedev_exit(void) struct aoedev *d; ulong flags; - flush_scheduled_work(); - while ((d = devlist)) { devlist = d->next; diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index f09e6df..2cc4dda 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -66,11 +66,6 @@ MODULE_VERSION("3.6.26"); MODULE_LICENSE("GPL"); static DEFINE_MUTEX(cciss_mutex); -static int cciss_allow_hpsa; -module_param(cciss_allow_hpsa, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(cciss_allow_hpsa, - "Prevent cciss driver from accessing hardware known to be " - " supported by the hpsa driver"); #include "cciss_cmd.h" #include "cciss.h" @@ -98,19 +93,6 @@ static const struct pci_device_id cciss_pci_device_id[] = { {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215}, {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237}, {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3241}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3243}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3245}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3247}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3249}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x324A}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x324B}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3350}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3351}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3352}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3353}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3354}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSF, 0x103C, 0x3355}, {0,} }; @@ -138,24 +120,9 @@ static struct board_type products[] = { {0x3214103C, "Smart Array E200i", &SA5_access}, {0x3215103C, "Smart Array E200i", &SA5_access}, {0x3237103C, "Smart Array E500", &SA5_access}, -/* controllers below this line are also supported by the hpsa driver. */ -#define HPSA_BOUNDARY 0x3223103C {0x3223103C, "Smart Array P800", &SA5_access}, {0x3234103C, "Smart Array P400", &SA5_access}, {0x323D103C, "Smart Array P700m", &SA5_access}, - {0x3241103C, "Smart Array P212", &SA5_access}, - {0x3243103C, "Smart Array P410", &SA5_access}, - {0x3245103C, "Smart Array P410i", &SA5_access}, - {0x3247103C, "Smart Array P411", &SA5_access}, - {0x3249103C, "Smart Array P812", &SA5_access}, - {0x324A103C, "Smart Array P712m", &SA5_access}, - {0x324B103C, "Smart Array P711m", &SA5_access}, - {0x3350103C, "Smart Array", &SA5_access}, - {0x3351103C, "Smart Array", &SA5_access}, - {0x3352103C, "Smart Array", &SA5_access}, - {0x3353103C, "Smart Array", &SA5_access}, - {0x3354103C, "Smart Array", &SA5_access}, - {0x3355103C, "Smart Array", &SA5_access}, }; /* How long to wait (in milliseconds) for board to go into simple mode */ @@ -1184,6 +1151,7 @@ static int cciss_ioctl32_big_passthru(struct block_device *bdev, fmode_t mode, int err; u32 cp; + memset(&arg64, 0, sizeof(arg64)); err = 0; err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info, @@ -3970,9 +3938,6 @@ static int __devinit cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id) subsystem_vendor_id; for (i = 0; i < ARRAY_SIZE(products); i++) { - /* Stand aside for hpsa driver on request */ - if (cciss_allow_hpsa && products[i].board_id == HPSA_BOUNDARY) - return -ENODEV; if (*board_id == products[i].board_id) return i; } diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index c5dfe64..25c7a73 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -2982,7 +2982,7 @@ static int drbd_create_mempools(void) drbd_ee_mempool = mempool_create(number, mempool_alloc_slab, mempool_free_slab, drbd_ee_cache); - if (drbd_request_mempool == NULL) + if (drbd_ee_mempool == NULL) goto Enomem; /* drbd's page pool */ diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 450c958..1e5284e 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1049,9 +1049,9 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev) if (bdev) invalidate_bdev(bdev); set_capacity(lo->lo_disk, 0); + loop_sysfs_exit(lo); if (bdev) { bd_set_size(bdev, 0); - loop_sysfs_exit(lo); /* let user-space know about this change */ kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE); } diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index dcd4cfc..a22e3f8 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c @@ -80,8 +80,10 @@ static void do_z2_request(struct request_queue *q) int err = 0; if (start + len > z2ram_size) { - printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n", - blk_rq_pos(req), blk_rq_cur_sectors(req)); + pr_err(DEVICE_NAME ": bad access: block=%llu, " + "count=%u\n", + (unsigned long long)blk_rq_pos(req), + blk_rq_cur_sectors(req)); err = -EIO; goto done; } |