mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
UBI: use raw mtd read function in debugging code
This change affects only the debugging code. Namely, use mtd->read() function instead of ubi_io_read() to avoid bit-flips injection (ubi_dbg_is_bitflip()) which we do not want on the debugging path. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
276832d878
commit
7950d023c5
1 changed files with 4 additions and 2 deletions
|
@ -1325,10 +1325,12 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum,
|
||||||
int offset, int len)
|
int offset, int len)
|
||||||
{
|
{
|
||||||
int err, i;
|
int err, i;
|
||||||
|
size_t read;
|
||||||
|
loff_t addr = (loff_t)pnum * ubi->peb_size + offset;
|
||||||
|
|
||||||
mutex_lock(&ubi->dbg_buf_mutex);
|
mutex_lock(&ubi->dbg_buf_mutex);
|
||||||
err = ubi_io_read(ubi, ubi->dbg_peb_buf, pnum, offset, len);
|
err = ubi->mtd->read(ubi->mtd, addr, len, &read, ubi->dbg_peb_buf);
|
||||||
if (err)
|
if (err && err != -EUCLEAN)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue