linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug in UDF, setting larger file size when data in ICB
@ 2012-07-23 15:19 Ian Abbott
  2012-07-23 16:43 ` Ian Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Abbott @ 2012-07-23 15:19 UTC (permalink / raw)
  To: lkml; +Cc: Jan Kara

Hi folks,

in fs/udf/inode.c, udf_setsize(), if the new size is larger than the old 
size and the old data is in the ICB and the new size still fits in the 
ICB (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB and iinfo->i_lenAlloc 
= newsize), udf_extend_file() is called which promptly calls BUG() 
because it does not like this i_alloc_type value.

I think the simplest fix would be to add a 'goto' after the assignment 
to iinfo->i_lenAlloc, bypassing the call to udf_extend_file().

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

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

* Re: Bug in UDF, setting larger file size when data in ICB
  2012-07-23 15:19 Bug in UDF, setting larger file size when data in ICB Ian Abbott
@ 2012-07-23 16:43 ` Ian Abbott
  2012-08-14 22:22   ` Jan Kara
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Abbott @ 2012-07-23 16:43 UTC (permalink / raw)
  To: lkml; +Cc: Jan Kara

On 2012-07-23 16:19, Ian Abbott wrote:
> Hi folks,
>
> in fs/udf/inode.c, udf_setsize(), if the new size is larger than the old
> size and the old data is in the ICB and the new size still fits in the
> ICB (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB and iinfo->i_lenAlloc
> = newsize), udf_extend_file() is called which promptly calls BUG()
> because it does not like this i_alloc_type value.
>
> I think the simplest fix would be to add a 'goto' after the assignment
> to iinfo->i_lenAlloc, bypassing the call to udf_extend_file().

Jan is on vacation until early August, so I submitted my own patch:

Date: Mon, 23 Jul 2012 17:39:29 +0100
Subject: [PATCH] udf: fix udf_setsize() for file data in ICB
Message-ID: <1343061569-3629-1-git-send-email-abbotti@mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-



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

* Re: Bug in UDF, setting larger file size when data in ICB
  2012-07-23 16:43 ` Ian Abbott
@ 2012-08-14 22:22   ` Jan Kara
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kara @ 2012-08-14 22:22 UTC (permalink / raw)
  To: Ian Abbott; +Cc: lkml, Jan Kara

On Mon 23-07-12 17:43:37, Ian Abbott wrote:
> On 2012-07-23 16:19, Ian Abbott wrote:
> >Hi folks,
> >
> >in fs/udf/inode.c, udf_setsize(), if the new size is larger than the old
> >size and the old data is in the ICB and the new size still fits in the
> >ICB (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB and iinfo->i_lenAlloc
> >= newsize), udf_extend_file() is called which promptly calls BUG()
> >because it does not like this i_alloc_type value.
> >
> >I think the simplest fix would be to add a 'goto' after the assignment
> >to iinfo->i_lenAlloc, bypassing the call to udf_extend_file().
> 
> Jan is on vacation until early August, so I submitted my own patch:
> 
> Date: Mon, 23 Jul 2012 17:39:29 +0100
> Subject: [PATCH] udf: fix udf_setsize() for file data in ICB
> Message-ID: <1343061569-3629-1-git-send-email-abbotti@mev.co.uk>
  Thanks for the patch. I've added it to my tree and will send it to Linus
soon.

								Honza

-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

end of thread, other threads:[~2012-08-14 22:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-23 15:19 Bug in UDF, setting larger file size when data in ICB Ian Abbott
2012-07-23 16:43 ` Ian Abbott
2012-08-14 22:22   ` Jan Kara

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).