03 Sep, 2007
1 commit
-
Initialise s_flags in get_sb_mtd_aux() from the flags parameter.
Signed-off-by: David Howells
Signed-off-by: David Woodhouse
23 Aug, 2007
1 commit
-
This fixes a regression from around 2.6.18, consistent_sync() will now BUG()
under these circumstances. The use of consistent_sync() was a hack, replacing
it's usage here with a new function, flush_ioremap_region().Signed-off-by: Jared Hulbert
Acked-by: Pavel Pisa
Signed-off-by: Russell King
12 Aug, 2007
1 commit
-
sh:
drivers/mtd/mtdchar.c: In function `mtd_mmap':
drivers/mtd/mtdchar.c:817: error: dereferencing pointer to incomplete type
drivers/mtd/mtdchar.c:817: error: `VM_SHARED' undeclared (first use in this function)
drivers/mtd/mtdchar.c:817: error: (Each undeclared identifier is reported only onceCc: David Woodhouse
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Aug, 2007
6 commits
-
We want drivers/mtd/{mtdcore, mtdsuper, mtdpart}.c to be built and linked
into the same mtd.ko module. Fix the Makefile to ensure this, and remove
duplicate MODULE_ declarations in mtdpart.c, as mtdcore.c already has them.Signed-off-by: Satyam Sharma
Signed-off-by: David Woodhouse -
The nand_base.c driver implicitly casts the uint32_t
eccpos array to 'int *', which is not only not guaranteed
to be the same sign as the source, but is not guaranteed
to be the same size.Fix by changing nand_base.c to use uint32_t
referencing the eccpos fields.Signed-off-by: Ben Dooks
Signed-off-by: David Woodhouse -
The patch below fixes nand driver for AT91 boards which do not have NAND
R/B signal connected to gpio (rdy_pin is not connected).Signed-off-by: Ivan Kuten
Acked-by: Andrew Victor
Signed-off-by: David Woodhouse -
When we mark block bad we have to get chip because this involves
writing to the page's OOB. We hit this bug in UBI - we observed
random obscure crashes when it marks block bad from the background
thread and there is some parallel task which utilizes flash.This patch also adds a TODO note about BBT table protection which
it seems does not exist.Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
The patch ensures that the current code (kernel 2.6.22) uses the bits
like the code prior to the refactoring. The variable "bits" is employed
in a useful way now.Signed-off-by: Roland Stigge
Signed-off-by: David Woodhouse -
This fixes a leak in the !mtd->erasesize error path (Coverity 1765).
Signed-off-by: Florin Malita
Signed-off-by: David Woodhouse
01 Aug, 2007
1 commit
-
Signed-off-by: Ralf Baechle
27 Jul, 2007
1 commit
-
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
20 Jul, 2007
1 commit
-
Slab destructors were no longer supported after Christoph's
c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
BUGs for both slab and slub, and slob never supported them
either.This rips out support for the dtor pointer from kmem_cache_create()
completely and fixes up every single callsite in the kernel (there were
about 224, not including the slab allocator definitions themselves,
or the documentation references).Signed-off-by: Paul Mundt
18 Jul, 2007
28 commits
-
cdev.c whines in current git:
drivers/mtd/ubi/cdev.c: In function `major_to_device':
drivers/mtd/ubi/cdev.c:67: warning: control reaches end of non-void functionShut it up.
Signed-off-by: Paul Mundt
Signed-off-by: Artem Bityutskiy -
Do not switch to read-only mode in case of -EINTR and some
other obvious cases. Switch to RO mode only when we do not
know what is the error.Reported-by: Vinit Agnihotri
Signed-off-by: Artem Bityutskiy -
Signed-off-by: Artem Bityutskiy
-
Pointed to by viro.
Signed-off-by: Artem Bityutskiy
-
The use of try_module_get(THIS_MODULE) in ubi_get_device_info does not
offer real protection against unexpected driver unloads, since we could
be preempted before try_modules_get gets executed. It is the caller who
should manipulate the refcounts. Besides, ubi_get_device_info is an
exported symbol which guarantees protection when accessed through
symbol_get.Signed-off-by: Fernando Luis Vazquez Cao
Signed-off-by: Artem Bityutskiy -
I was experiencing overflows in multiplications for
volume->used_bytes in vmt.c & vtbl.c, while creating & resizing large volumes.vol->used_bytes is long long however its 2 operands vol->used_ebs &
vol->usable_leb_size
are int. So their multiplication for larger values causes integer overflows.
Typecasting them solves the problem.My machine & flash details:
64Bit dual-core AMD opteron, 1 GB RAM, linux 2.6.18.3.
mtd size = 6GB, volume size= 5GB, peb_size = 4MB.heres patch which does the fix.
Signed-off-by: Vinit Agnihotri
Signed-off-by: Artem Bityutskiy -
Do not zero max_sqnum after a new volume has been found.
Signed-off-by: Artem Bityutskiy
-
Hi,I came across problem of having two leb with same sequence no.This
happens when we continuously write one block again and again and reboot
machine before background thread erases those blocks.
The problem here was,when we find two blocks with same sequence no,we take
the higher one,but we were not updating max seq no,so next block may have
the same seqnum.
This patch solves this problem.Signed-off-by: Brijesh Singh
Signed-off-by: Artem Bityutskiy -
There is signed multiplication assigned to unsigned ei.addr in io.c.
This causes wrong addresses for big multiplication.This patch solves the
problem.Signed-off-by: Brijesh Singh
Signed-off-by: Artem Bityutskiy -
atomic_leb_change() is only allowed for dynamic volumes, so set
the volume type correctly.Signed-off-by: Artem Bityutskiy
-
Increase UBI devices couter after the message, not before.
Signed-off-by: Vinit Agnihotri
Signed-off-by: Artem Bityutskiy -
Do not check volumes which are currently in use because thay may be
in inconsistent state.Signed-off-by: Artem Bityutskiy
-
When volume creation fails, we have to set ubi->volumes[vol_id]
back to NULL.This patch also tweaks some debugging stuff.
Signed-off-by: Artem Bityutskiy
-
Replacing (n & (n-1)) in the context of power of 2 checks
with is_power_of_2Signed-off-by: Vignesh Babu
Signed-off-by: Artem Bityutskiy -
ubi->vtbl is allocated using vmalloc() in vtbl.c empty_create_lvol(),
but it is freed in build.c with kfree()Signed-off-by: Vinit Agnihotri
Signed-off-by: Artem Bityutskiy -
Do not call 'ubi_wl_put_peb()' if the LEB was unmapped.
Reported-by: Gabor Loki
Signed-off-by: Artem Bityutskiy -
Kill UBI's homegrown endianess handling and replace it with
the standard kernel endianess handling.Signed-off-by: Christoph Hellwig
Signed-off-by: Artem Bityutskiy -
- don't do access_ok + get/put user but use the proper macro
- remove useless checksSigned-off-by: Christoph Hellwig
Signed-off-by: Artem Bityutskiy -
No need to unlock the lock, this will be done at out_unlock.
Signed-off-by: Artem Bityutskiy
-
Use coma at the the last elements of structure initializer.
Daniel Stone's explanation:
Because it turns:
- .attr = foo
+ .attr = foo,
+ .bar = bazinto:
+ .bar = baz,i.e., far less likely to screw up a merge.
Signed-off-by: Artem Bityutskiy
-
UBI allocates temporary buffers of PEB size, which may be 256KiB.
Use vmalloc instead of kmalloc for such big temporary buffers.Signed-off-by: Artem Bityutskiy
-
Add few comments above ubi_scan_add_used() to explain why it is so
complex. Requested by Satyam Sharma .Signed-off-by: Artem Bityutskiy
-
In case of static volumes, make emulated MTD device size to
be equivalent to data size, rather then volume size.Reported-by: John Smith
Signed-off-by: Artem Bityutskiy -
In case of static volumes it is prohibited to read more data
then available.Signed-off-by: Artem Bityutskiy
-
There were several bugs in volume table creation error path. Thanks to
Satyam Sharma and Florin Malita
for finding and analysing them: http://lkml.org/lkml/2007/5/3/274This patch makes ubi_scan_add_to_list() static and renames it to
add_to_list(), just because it is not needed outside scan.c anymore.Signed-off-by: Artem Bityutskiy
-
Coverity (CID 1614) spotted new_seb being dereferenced after kfree() in
create_vtbl's write_error path.Signed-off-by: Florin Malita
Signed-off-by: Artem Bityutskiy -
Reported-by: Eric Sesterhenn / Snakebyte
Signed-off-by: Artem Bityutskiy -
Mark variables in drivers/* with uninitialized_var() if such a warning
appears, and analysis proves that the var is initialized properly on all
paths it is used.Signed-off-by: Jeff Garzik