lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 31 Oct 2006 13:10:42 -0500
From:	"Holden Karau" <holden@...scanfly.ca>
To:	"Jörn Engel" <joern@...nheim.fh-wedel.de>
Cc:	"Holden Karau" <holdenk@...dros.com>,
	"Josef Sipek" <jsipek@....cs.sunysb.edu>,
	hirofumi@...l.parknet.co.jp, linux-kernel@...r.kernel.org,
	"akpm@...l.org" <akpm@...l.org>, linux-fsdevel@...r.kernel.org,
	"Nick Piggin" <nickpiggin@...oo.com.au>
Subject: Re: [PATCH 1/1] fat: improve sync performance by grouping writes revised

On 10/31/06, Jörn Engel <joern@...nheim.fh-wedel.de> wrote:
> On Tue, 31 October 2006 10:03:08 -0500, Holden Karau wrote:
> > +static int fat_mirror_bhs_optw(struct super_block *sb, struct buffer_head **bhs,
> > +                            int nr_bhs , int wait)
> >  {
> >       struct msdos_sb_info *sbi = MSDOS_SB(sb);
> > -     struct buffer_head *c_bh;
> > +     struct buffer_head *c_bh[nr_bhs*(sbi->fats)];
>
> Variable-sized array on the kernel-stack?  That can easily explode in
> your hands.  Unless you are _very_ sure about the bounds, you should
> do an explicit kmalloc.  And if you were that sure, you could just as
> well have an array with fixed size.
>
sbi->fats has a range of 2 to 4, but I suppose that might concievably
change if someone decides they want a fat filesystem with a lot of
backup FATs and modifies some other parts of the driver to support
that. I'll change it to use kmalloc.
> > +     if (sb->s_flags & MS_SYNCHRONOUS )
> [...]
> > +             }
> [...]
> > +                              int nr_bhs )
>
> Trailing whitespace in those lines.
..... oops. I'll fix that.
>
> Jörn
>
> --
> Prosperity makes friends, adversity tries them.
> -- Publilius Syrus
> -
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Cell: 613-276-1645
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ