mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] udf: Check for IS_ERR in udf_get_pblock_meta25
@ 2016-05-18 17:35 Laura Abbott
  2016-05-19 11:47 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Laura Abbott @ 2016-05-18 17:35 UTC (permalink / raw)
  To: Jan Kara; +Cc: Laura Abbott, linux-kernel

udf_find_metadata_inode_efe returns an error pointer, not just
NULL. Check the return with IS_ERR appropriately.

Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
---
Came out of https://bugzilla.redhat.com/show_bug.cgi?id=1301295, I never
heard back from the reporter so I've had this sitting around for a bit and
haven't been able to confirm it fixes the crash. The logic makes sense
for the crash though.
---
 fs/udf/partition.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/udf/partition.c b/fs/udf/partition.c
index 5f861ed2..a8ee7fc 100644
--- a/fs/udf/partition.c
+++ b/fs/udf/partition.c
@@ -329,7 +329,7 @@ uint32_t udf_get_pblock_meta25(struct super_block *sb, uint32_t block,
 		}
 
 		inode = mdata->s_mirror_fe;
-		if (!inode)
+		if (IS_ERR(inode))
 			return 0xFFFFFFFF;
 		retblk = udf_try_read_meta(inode, block, partition, offset);
 	}
-- 
2.5.5

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-19 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-18 17:35 [PATCH] udf: Check for IS_ERR in udf_get_pblock_meta25 Laura Abbott
2016-05-19 11:47 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®