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]
Message-ID: <20101106121605.GA6736@redhat.com>
Date:	Sat, 6 Nov 2010 08:16:05 -0400
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Randy Dunlap <randy.dunlap@...cle.com>,
	Jens Axboe <jaxboe@...ionio.com>,
	David Miller <davem@...emloft.net>,
	Eric Dumazet <eric.dumazet@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Linux 2.6.37-rc1 (floppy module load: no device found)

On Fri, Nov 05, 2010 at 04:36:59PM -0700, Linus Torvalds wrote:
> On Fri, Nov 5, 2010 at 4:03 PM, Randy Dunlap <randy.dunlap@...cle.com> wrote:
> > On 11/05/10 15:10, Linus Torvalds wrote:
> >>
> >> Randy, is this one also related to that ipv6 percpu list corruption?
> >> IOW, does it go away with
> >>
> >>   http://patchwork.ozlabs.org/patch/69939/
> >>
> >> like one of your other reports did?
> >
> > The list_debug.c message goes away, but it still gets the GP fault.
> 
> Ok. I think there's a separate floppy.c bug introduced in commit
> 488211844e0c ("floppy: switch to one queue per drive instead of
> sharing a queue").
> 
> We do "put_disk()" on the disk device _before_ we then clean up the
> queue associated with that disk.
> 
> So maybe this trivial patch is in order?
> 
> Again - UNTESTED. Jens, Vivek?

This one looks good to me.

While scanning the floopy code, I found one more instance of trying to
access disk->queue pointer after doing put_disk() on gendisk. For some
reason, floppy moule still loads/unloads fine. May be object is still
around with right pointer values.


o There seems to be one more instance of trying to cleanup the request queue
  after we have called put_disk() on associated gendisk.

o This fix is more out of code inspection. Even without this fix for some
  reason I am able to load/unload floppy module without any issues.

o Floppy module loads/unloads fine after the fix.

Signed-off-by: Vivek Goyal <vgoyal@...hat.com>
---
 drivers/block/floppy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/block/floppy.c
===================================================================
--- linux-2.6.orig/drivers/block/floppy.c	2010-11-06 07:49:29.000000000 -0400
+++ linux-2.6/drivers/block/floppy.c	2010-11-06 08:03:37.646062993 -0400
@@ -4573,8 +4573,8 @@ static void __exit floppy_module_exit(vo
 			device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos);
 			platform_device_unregister(&floppy_device[drive]);
 		}
-		put_disk(disks[drive]);
 		blk_cleanup_queue(disks[drive]->queue);
+		put_disk(disks[drive]);
 	}
 
 	del_timer_sync(&fd_timeout);
--
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