From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754560AbcESLrc (ORCPT ); Thu, 19 May 2016 07:47:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:48325 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbcESLrb (ORCPT ); Thu, 19 May 2016 07:47:31 -0400 Date: Thu, 19 May 2016 13:47:27 +0200 From: Jan Kara To: Laura Abbott Cc: Jan Kara , Laura Abbott , linux-kernel@vger.kernel.org Subject: Re: [PATCH] udf: Check for IS_ERR in udf_get_pblock_meta25 Message-ID: <20160519114727.GD8839@quack2.suse.cz> References: <1463592931-7157-1-git-send-email-labbott@fedoraproject.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463592931-7157-1-git-send-email-labbott@fedoraproject.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 18-05-16 10:35:31, Laura Abbott wrote: > udf_find_metadata_inode_efe returns an error pointer, not just > NULL. Check the return with IS_ERR appropriately. > > Signed-off-by: Laura Abbott > --- > 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. Thanks for the patch. I've just merged a more comprehensive set of fixes from Alden which fix this issue as well. Honza > --- > 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 > > -- Jan Kara SUSE Labs, CR