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:	Fri, 1 Aug 2008 19:40:25 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Dan Williams <dan.j.williams@...el.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Neil Brown <neilb@...e.de>, Arthur Jones <ajones@...erbed.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-raid@...r.kernel.org, "Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: [PULL REQUEST] md bug fixes and minor improvements

On Fri, Aug 01 2008, Dan Williams wrote:
> 
> On Fri, 2008-08-01 at 19:22 +0200, Jens Axboe wrote:
> > It is a bit asymmetrical, largely due to the fact that the ->unplug_fn()
> > itself grabs the lock. The below patch should fix it, since Neil has
> > added a proper queue lock to the md queues. If someone can confirm that
> > this fixes it, I'll queue up a patch with proper descriptions.
> > 
> > > I guess Jens is gone too..
> > 
> > I'm back, just been busy this week :-)
> > 
> > diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> > index 621a272..f19b52f 100644
> > --- a/drivers/md/bitmap.c
> > +++ b/drivers/md/bitmap.c
> > @@ -1234,7 +1234,9 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect
> >  		case 0:
> >  			bitmap_file_set_bit(bitmap, offset);
> >  			bitmap_count_page(bitmap,offset, 1);
> > +			spin_lock_irq(&bitmap->mddev->queue->queue_lock);
> >  			blk_plug_device(bitmap->mddev->queue);
> > +			spin_unlock_irq(&bitmap->mddev->queue->queue_lock);
> >  			/* fall through */
> >  		case 1:
> >  			*bmc = 2;
> > 
> 
> We also need to protect the blk_plug_device call a few lines down (and
> an obvious compile fix).

Old source I guess, just one blk_plug_device() in the copy I have here.
Just checked latest git, still just one blk_plug_device(), are you
diffing against -mm or something like that? Or linux-next?

And queue_lock is of course a pointer, I didn't even compile the
thing... Thanks for the updated variant!

-- 
Jens Axboe

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