05 Feb, 2010
1 commit
-
It is possible (and expected) for there to be holes in the h->drv[]
array, that is, some elements may be NULL pointers. cciss_seq_show
needs to be made aware of this possibility to avoid an Oops.To reproduce the Oops which this fixes:
1) Create two "arrays" in the Array Configuratino Utility and
several logical drives on each array.
2) cat /proc/driver/cciss/cciss* in an infinite loop
3) delete some of the logical drives in the first "array."Signed-off-by: Stephen M. Cameron
Cc: stable@kernel.org
Signed-off-by: Jens Axboe
03 Feb, 2010
1 commit
-
This is the counterpart to cba767175becadc5c4016cceb7bfdd2c7fe722f4
("pktcdvd: remove broken dev_t export of class devices"). Device is not
registered using dev_t, so it should not be destroyed using device_destroy
which looks up the device by dev_t. This will fail and adding the device
again will fail with the "duplicate name" error. This is fixed using
device_unregister instead of device_destroy.Signed-off-by: Thadeu Lima de Souza Cascardo
Cc: Kay Sievers
Cc: Peter Osterlund
Cc: Al Viro
Cc: Jens Axboe
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jan, 2010
1 commit
-
epoch is always NULL here.
Signed-off-by: Dan Carpenter
Signed-off-by: Philipp Reisner
22 Jan, 2010
1 commit
-
blk_queue_make_request() internally calls blk_set_default_limits(),
so calling blk_queue_max_segment_size() before is useless.
Ergo: move the call to blk_queue_max_segment_size() down a few lines.Impact:
If, after a fresh modprobe, you first connect a Diskless drbd,
then attach, this could result in a DRBD Protocol Error at first.
The next connection attempt would then succeeded.Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg
12 Jan, 2010
2 commits
-
Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg -
Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg
07 Jan, 2010
1 commit
-
It is called LBDAF since 2.6.31.
impact:
without this change, on 32bit,
DRBD would wrongly claim to only support 2TiB devices.Signed-off-by: Lars Ellenberg
Signed-off-by: Philipp Reisner
04 Jan, 2010
1 commit
-
Test the just-allocated value for NULL rather than some other value.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression x,y;
statement S;
@@x = \(kmalloc\|kcalloc\|kzalloc\)(...);
(
if ((x) == NULL) S
|
if (
- y
+ x
== NULL)
S
)
//Signed-off-by: Julia Lawall
Signed-off-by: Philipp Reisner
31 Dec, 2009
1 commit
-
Immediately after changing the write ordering method, the epoch can already
be finished at this point.Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg
30 Dec, 2009
3 commits
-
!CONFIG_OPT evalues to FALSE if CONFIG_OPT='m'. Do not display the
"DRBD disabled..." message if the dependencies are compiled as module.Signed-off-by: Johannes Thoma
Signed-off-by: Philipp Reisner -
In D_DISKLESS we do not hand out any new references to ldev (local_cnt)
therefore waiting until all previously handed out refereces got returned
is sufficient before actually freeing mdev->ldev.Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg -
Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg
22 Dec, 2009
4 commits
-
Cc: "Ed L. Cashin"
Cc: David Woodhouse
Cc: Ilya Loginov
Cc: Ingo Molnar
Cc: Peter Horton
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
Use resource_size() for ioremap.
The ioremap appears to be passing the incorrect size for the platform
resource. Unfortunately, I can't locate a user in mainline to verify
this. Using resource_size should be the correct fix.Signed-off-by: H Hartley Sweeten
Acked-by: unsik Kim
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
DAC960_LP_Controller and DAC960_V2_Controller have the same value, but
elsewhere it is DAC960_V1_Controller or DAC960_V2_Controller that is used
in the FirmwareType field.Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe
21 Dec, 2009
4 commits
-
Remove unused #include ('s) in
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_receiver.c
drivers/block/drbd/drbd_worker.cSigned-off-by: Huang Weiyi
Signed-off-by: Philipp Reisner -
Remove duplicated #include('s) in
drivers/block/drbd/drbd_worker.cSigned-off-by: Huang Weiyi
Signed-off-by: Philipp Reisner -
rsp->count is unsigned so the test does not work.
Signed-off-by: Roel Kluin
Signed-off-by: Andrew Morton
Signed-off-by: Philipp Reisner -
Signed-off-by: Emese Revfy
Signed-off-by: Philipp Reisner
18 Dec, 2009
1 commit
-
rsp->count is unsigned so the test does not work.
Signed-off-by: Roel Kluin
Cc: Lars Ellenberg
Cc: Philipp Reisner
Signed-off-by: Jens Axboe
16 Dec, 2009
3 commits
-
* 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block:
cfq: set workload as expired if it doesn't have any slice left
Fix a CFQ crash in "for-2.6.33" branch of block tree
cfq: Remove wait_request flag when idle time is being deleted
cfq-iosched: commenting non-obvious initialization
cfq-iosched: Take care of corner cases of group losing share due to deletion
cfq-iosched: Get rid of cfqq wait_busy_done flag
cfq: Optimization for close cooperating queue searching
block,xd: Delay allocation of DMA buffers until device is known
drbd: Following the hmac change to SHASH (see linux commit 8bd1209cfff)
cfq-iosched: reduce write depth only if sync was delayed -
gcc is not convinced that the floppy.c ioctl has sufficient bound checks:
In function `copy_from_user',
inlined from `fd_copyin' at drivers/block/floppy.c:3080,
inlined from `fd_ioctl' at drivers/block/floppy.c:3503:
arch/x86/include/asm/uaccess_32.h:211:
warning: call to `copy_from_user_overflow' declared with attribute
warning: copy_from_user buffer size is not provably correctAnd frankly, as a human I have a hard time proving the same more or less
(the size comes from the ioctl argument. humpf. maybe. the code isn't
very nice)This patch adds an explicit check to make 100% sure it's safe, better than
finding out later that there indeed was a gap.[akpm@linux-foundation.org: add WARN_ON()]
Signed-off-by: Arjan van de Ven
Acked-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Dec, 2009
1 commit
-
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (151 commits)
powerpc: Fix usage of 64-bit instruction in 32-bit altivec code
MAINTAINERS: Add PowerPC patterns
powerpc/pseries: Track previous CPPR values to correctly EOI interrupts
powerpc/pseries: Correct pseries/dlpar.c build break without CONFIG_SMP
powerpc: Make "intspec" pointers in irq_host->xlate() const
powerpc/8xx: DTLB Miss cleanup
powerpc/8xx: Remove DIRTY pte handling in DTLB Error.
powerpc/8xx: Start using dcbX instructions in various copy routines
powerpc/8xx: Restore _PAGE_WRITETHRU
powerpc/8xx: Add missing Guarded setting in DTLB Error.
powerpc/8xx: Fixup DAR from buggy dcbX instructions.
powerpc/8xx: Tag DAR with 0x00f0 to catch buggy instructions.
powerpc/8xx: Update TLB asm so it behaves as linux mm expects.
powerpc/8xx: Invalidate non present TLBs
powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate
pseries/pseries: Add code to online/offline CPUs of a DLPAR node
powerpc: stop_this_cpu: remove the cpu from the online map.
powerpc/pseries: Add kernel based CPU DLPAR handling
sysfs/cpu: Add probe/release files
powerpc/pseries: Kernel DLPAR Infrastructure
...
12 Dec, 2009
1 commit
-
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (109 commits)
PCI: fix coding style issue in pci_save_state()
PCI: add pci_request_acs
PCI: fix BUG_ON triggered by logical PCIe root port removal
PCI: remove ifdefed pci_cleanup_aer_correct_error_status
PCI: unconditionally clear AER uncorr status register during cleanup
x86/PCI: claim SR-IOV BARs in pcibios_allocate_resource
PCI: portdrv: remove redundant definitions
PCI: portdrv: remove unnecessary struct pcie_port_data
PCI: portdrv: minor cleanup for pcie_port_device_register
PCI: portdrv: add missing irq cleanup
PCI: portdrv: enable device before irq initialization
PCI: portdrv: cleanup service irqs initialization
PCI: portdrv: check capabilities first
PCI: portdrv: move PME capability check
PCI: portdrv: remove redundant pcie type calculation
PCI: portdrv: cleanup pcie_device registration
PCI: portdrv: remove redundant pcie_port_device_probe
PCI: Always set prefetchable base/limit upper32 registers
PCI: read-modify-write the pcie device control register when initiating pcie flr
PCI: show dma_mask bits in /sys
...Fixed up conflicts in:
arch/x86/kernel/amd_iommu_init.c
drivers/pci/dmar.c
drivers/pci/hotplug/acpiphp_glue.c
10 Dec, 2009
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
tree-wide: fix misspelling of "definition" in comments
reiserfs: fix misspelling of "journaled"
doc: Fix a typo in slub.txt.
inotify: remove superfluous return code check
hdlc: spelling fix in find_pvc() comment
doc: fix regulator docs cut-and-pasteism
mtd: Fix comment in Kconfig
doc: Fix IRQ chip docs
tree-wide: fix assorted typos all over the place
drivers/ata/libata-sff.c: comment spelling fixes
fix typos/grammos in Documentation/edac.txt
sysctl: add missing comments
fs/debugfs/inode.c: fix comment typos
sgivwfb: Make use of ARRAY_SIZE.
sky2: fix sky2_link_down copy/paste comment error
tree-wide: fix typos "couter" -> "counter"
tree-wide: fix typos "offest" -> "offset"
fix kerneldoc for set_irq_msi()
spidev: fix double "of of" in comment
comment typo fix: sybsystem -> subsystem
...
09 Dec, 2009
4 commits
-
Loading the XD module triggers a warning like
WARNING: at mm/page_alloc.c:1805
__alloc_pages_nodemask+0x127/0x48f()
Hardware name: System Product Name
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.32-rc8-git5 #1
Call Trace:
[] warn_slowpath_common+0x65/0x95
[] warn_slowpath_null+0x12/0x15
[] __alloc_pages_nodemask+0x127/0x48f
[] ? get_slab+0x8/0x50
[] alloc_page_interleave+0x2e/0x6e
[] alloc_pages_current+0x57/0x99
[] ? xd_init+0x0/0x482
[] __get_free_pages+0xd/0x1e
[] xd_init+0x4a/0x482
[] ? loop_init+0x104/0x16a
[] ? loop_probe+0x0/0xaf
[] ? xd_init+0x0/0x482
[] do_one_initcall+0x51/0x13f
[] kernel_init+0x10b/0x15f
[] ? kernel_init+0x0/0x15f
[] kernel_thread_helper+0x7/0x10
---[ end trace 686db6333ade6e7a ]---
xd: Out of memory.The warning is because the alloc_pages is called with an
order >= MAX_ORDER. The simplistic reason is that get_order(0) returns garbage
values when given 0 as a size. The more complex reason is that the XD driver
initialisation is broken.It's not clear why this ever worked. XD allocates a buffer for DMA based
on the value of xd_maxsectors. This value is determined by the exact
type of controller in use but the value is determined *after* an attempt
has been made to allocate the buffer. i.e. the requested size of the DMA
buffer will always be 0.This patch alters how XD is initialised slightly by allocating the
buffer when and if a device has actually been detected. The error paths
are updated to suit the new logic.Signed-off-by: Mel Gorman
Signed-off-by: Jens Axboe -
Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg
Signed-off-by: Jens Axboe -
Conflicts:
include/linux/kvm.h -
The hotplug mediabay has tendrils deep into drivers/ide code
which makes a libata port reather difficult. In addition it's
ugly and could be done better.This reworks the interface between the mediabay and the rest
of the world so that:- Any macio_driver can now have a mediabay_event callback
which will be called when that driver sits on a mediabay and
it's been either plugged or unplugged. The device type is
passed as an argument. We can now move all the IDE cruft
into the IDE driver itself- A check_media_bay() function can be used to take a peek
at the type of device currently in the bay if any, a cleaner
variant of the previous function with the same name.- A pair of lock/unlock functions are exposed to allow the
IDE driver to block the hotplug callbacks during the initial
setup and probing of the bay in order to avoid nasty race
conditions.- The mediabay code no longer needs to spin on the status
register of the IDE interface when it detects an IDE device,
this is done just fine by the IDE code itselfOverall, less code, simpler, and allows for another driver
than our old drivers/ide based one.Signed-off-by: Benjamin Herrenschmidt
08 Dec, 2009
1 commit
-
Conflicts:
kernel/irq/chip.c
05 Dec, 2009
1 commit
-
"Definition" is misspelled "defintion" in several comments; this
patch fixes them. No code changes.Signed-off-by: Adam Buchbinder
Signed-off-by: Jiri Kosina
04 Dec, 2009
1 commit
-
Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg
03 Dec, 2009
1 commit
02 Dec, 2009
1 commit
-
Prevent the AoE block driver from creating cache aliases of page cache
pages on machines with virtually indexed caches.Building kernels on an AT91SAM9G20 board without this patch fails with
segmentation faults after a couple of passes.Signed-off-by: Peter Horton
Cc: "Ed L. Cashin"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Nov, 2009
3 commits
-
Since 8.3.3 we fail to do the resync when a partial resynch is not
possible, but a full synch is necessary.This regression was introduced with 7101539930c0a89146959e7a39c09ad9c3516434
Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg -
Otherwise the 'state fixup' in the receiver will change to Unconnected,
but the receiver will terminate itself, and any attempt at 'down'ing
that drbd later will block forever.see also Bugz. #259
Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg -
this is uncritical, as we still also serialize in userland,
but to correctly serialize on the CONFIG_PENDING bit,
it must be wait_event(state_wait, \!test_and_set_bit)Signed-off-by: Philipp Reisner
Signed-off-by: Lars Ellenberg
23 Nov, 2009
1 commit
-
A recent commit broke the ia64 build:
Author: Don Brace
Date: Thu Nov 12 12:50:01 2009 -0600cciss: Add enhanced scatter-gather support.
because of this hunk:
--- a/drivers/block/cciss.h
+++ b/drivers/block/cciss.h
+struct Cmd_sg_list {
+ SGDescriptor_struct *sgchain;
+ dma64_addr_t sg_chain_dma;
+ int chain_block_size;
+};The issue is that dma64_addr_t isn't #define'd on ia64.
The way that we're using Cmd_sg_list.sg_chain_dma is to hold an
address returned from pci_map_single().+ temp64.val = pci_map_single(h->pdev,
+ h->cmd_sg_list[c->cmdindex]->sgchain,
+ len, dir);
+
+ h->cmd_sg_list[c->cmdindex]->sg_chain_dma = temp64.val;pci_map_single() returns a dma_addr_t too.
This code will still work even on a 32-bit x86 build, where
dma_addr_t is defined to be a u32 because it will simply be
promoted to the __u64 that temp64.val is defined as.Thus, declaring Cmd_sg_list.sg_chain_dma as dma_addr_t is safe.
Cc: Don Brace
Cc: Stephen M. Cameron
Signed-off-by: Alex Chiang
Signed-off-by: Jens Axboe