FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 06-02-2008, 05:39 PM
Ben Collins
 
Default FIx crash in mmc_block on 64-bit

Fairly simple. "dev_use" was being allocated as a zero length array
because of bad math on 64-bit systems causing a crash in
find_first_zero_bit(). One-liner follows:

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 91ded3e..f9ad960 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -46,7 +46,7 @@
#define MMC_SHIFT 3
#define MMC_NUM_MINORS (256 >> MMC_SHIFT)

-static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))];
+static DECLARE_BITMAP(dev_use, MMC_NUM_MINORS);

/*
* There is one mmc_blk_data per slot.



--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 06-05-2008, 09:25 PM
Pierre Ossman
 
Default FIx crash in mmc_block on 64-bit

On Mon, 02 Jun 2008 13:39:19 -0400
Ben Collins <ben.collins@canonical.com> wrote:

> Fairly simple. "dev_use" was being allocated as a zero length array
> because of bad math on 64-bit systems causing a crash in
> find_first_zero_bit(). One-liner follows:
>

A signed-off-by to make things nice and proper, please.

You can add an Acked-by: Pierre Ossman <drzeus@drzeus.cx> and pass it
on directly to Linus.

Rgds
--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 06-05-2008, 11:11 PM
Ben Collins
 
Default FIx crash in mmc_block on 64-bit

On Thu, 2008-06-05 at 23:25 +0200, Pierre Ossman wrote:
> On Mon, 02 Jun 2008 13:39:19 -0400
> Ben Collins <ben.collins@canonical.com> wrote:
>
> > Fairly simple. "dev_use" was being allocated as a zero length array
> > because of bad math on 64-bit systems causing a crash in
> > find_first_zero_bit(). One-liner follows:
> >
>
> A signed-off-by to make things nice and proper, please.
>
> You can add an Acked-by: Pierre Ossman <drzeus@drzeus.cx> and pass it
> on directly to Linus.

Not sure how I missed the signed-off-by, but resent to Linus with your
ack. Thanks


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 11:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org