* [PATCH 11/14] ubifs: check return code of ubifs_lpt_lookup
@ 2010-09-05 18:33 Kulikov Vasiliy
2010-09-07 9:32 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Kulikov Vasiliy @ 2010-09-05 18:33 UTC (permalink / raw)
To: kernel-janitors
Cc: Artem Bityutskiy, Vasiliy Kulikov, linux-kernel, Julia Lawall,
Tejun Heo, linux-mtd, Adrian Hunter
From: Vasiliy Kulikov <segooon@gmail.com>
Function ubifs_lpt_lookup may return ERR_PTR(...). Check for it.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
Compile tested.
fs/ubifs/lpt.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index 0084a33..841bb36 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -1351,6 +1351,7 @@ static int read_lsave(struct ubifs_info *c)
{
int err, i;
void *buf;
+ struct ubifs_lprops *perr;
buf = vmalloc(c->lsave_sz);
if (!buf)
@@ -1370,7 +1371,11 @@ static int read_lsave(struct ubifs_info *c)
*/
if (lnum >= c->leb_cnt)
continue;
- ubifs_lpt_lookup(c, lnum);
+ perr = ubifs_lpt_lookup(c, lnum);
+ if (IS_ERR(perr)) {
+ err = PTR_ERR(perr);
+ goto out;
+ }
}
out:
vfree(buf);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 11/14] ubifs: check return code of ubifs_lpt_lookup
2010-09-05 18:33 [PATCH 11/14] ubifs: check return code of ubifs_lpt_lookup Kulikov Vasiliy
@ 2010-09-07 9:32 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-09-07 9:32 UTC (permalink / raw)
To: Kulikov Vasiliy
Cc: kernel-janitors, linux-kernel, Julia Lawall, Tejun Heo, linux-mtd,
Adrian Hunter
On Sun, 2010-09-05 at 22:33 +0400, Kulikov Vasiliy wrote:
> From: Vasiliy Kulikov <segooon@gmail.com>
>
> Function ubifs_lpt_lookup may return ERR_PTR(...). Check for it.
>
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> ---
Pushed both patches to the UBIFS tree, thanks:
http://git.infradead.org/ubifs-2.6.git
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-07 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-05 18:33 [PATCH 11/14] ubifs: check return code of ubifs_lpt_lookup Kulikov Vasiliy
2010-09-07 9:32 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).