LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Gerald Schaefer <geraldsc@de.ibm.com>,
	Carsten Otte <cotte@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 18/18] dcss: Initialize workqueue before using it.
Date: Tue, 05 Feb 2008 16:38:53 +0100	[thread overview]
Message-ID: <20080205153916.234022436@de.ibm.com> (raw)
In-Reply-To: <20080205153835.337897404@de.ibm.com>

[-- Attachment #1: 018-dcss-workqueue.diff --]
[-- Type: text/plain, Size: 3347 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

In case a dcss segment cannot be loaded blk_cleanup_queue
will be called before blk_queue_make_request, leaving the
struct work unplug_work of the request queue uninitialized
before it is used.
That leads also to the lockdep message below.
To avoid that call blk_queue_make_request right after the
request_queue has been allocated. 
This makes sure that the struct work is always initialized
before it is used.

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 2 Not tainted 2.6.24 #6
Process swapper (pid: 1, task: 000000000f854038, ksp: 000000000f85f980)
040000000f85f860 000000000f85f880 0000000000000002 0000000000000000 
       000000000f85f920 000000000f85f898 000000000f85f898 000000000001622e 
       0000000000000000 000000000f85f980 0000000000000000 0000000000000000 
       000000000f85f880 000000000000000c 000000000f85f880 000000000f85f8f0 
       0000000000342908 000000000001622e 000000000f85f880 000000000f85f8d0 
Call Trace:
([<000000000001619e>] show_trace+0xda/0x104)
 [<0000000000016288>] show_stack+0xc0/0xf8
 [<00000000000163d0>] dump_stack+0xb0/0xc0
 [<000000000006e4ea>] __lock_acquire+0x47e/0x1160
 [<000000000006f27c>] lock_acquire+0xb0/0xd8
 [<000000000005a522>] __cancel_work_timer+0x9e/0x240
 [<000000000005a72e>] cancel_work_sync+0x2a/0x3c
 [<0000000000165c46>] kblockd_flush_work+0x26/0x34
 [<0000000000169034>] blk_sync_queue+0x38/0x48
 [<0000000000169080>] blk_release_queue+0x3c/0xa8
 [<000000000017bce8>] kobject_cleanup+0x58/0xac
 [<000000000017bd66>] kobject_release+0x2a/0x38
 [<000000000017d28e>] kref_put+0x6e/0x94
 [<000000000017bc80>] kobject_put+0x38/0x48
 [<00000000001653be>] blk_put_queue+0x2a/0x38
 [<0000000000168fee>] blk_cleanup_queue+0x82/0x90
 [<0000000000213e7e>] dcssblk_add_store+0x34e/0x700
 [<00000000005243b8>] dcssblk_init+0x1a0/0x308
 [<000000000050a3c2>] kernel_init+0x1b2/0x3a4
 [<000000000001ac82>] kernel_thread_starter+0x6/0xc
 [<000000000001ac7c>] kernel_thread_starter+0x0/0xc

INFO: lockdep is turned off.

Cc: Gerald Schaefer <geraldsc@de.ibm.com>
Cc: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 drivers/s390/block/dcssblk.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: quilt-2.6/drivers/s390/block/dcssblk.c
===================================================================
--- quilt-2.6.orig/drivers/s390/block/dcssblk.c
+++ quilt-2.6/drivers/s390/block/dcssblk.c
@@ -415,6 +415,8 @@ dcssblk_add_store(struct device *dev, st
 	dev_info->gd->queue = dev_info->dcssblk_queue;
 	dev_info->gd->private_data = dev_info;
 	dev_info->gd->driverfs_dev = &dev_info->dev;
+	blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request);
+	blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096);
 	/*
 	 * load the segment
 	 */
@@ -472,9 +474,6 @@ dcssblk_add_store(struct device *dev, st
 	if (rc)
 		goto unregister_dev;
 
-	blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request);
-	blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096);
-
 	add_disk(dev_info->gd);
 
 	switch (dev_info->segment_type) {

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


  parent reply	other threads:[~2008-02-05 15:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 15:38 [patch 00/18] s390 bug fix patches Martin Schwidefsky
2008-02-05 15:38 ` [patch 01/18] cio: make sense id procedure work with partial hardware response Martin Schwidefsky
2008-02-05 15:38 ` [patch 02/18] cio: Clean up chsc response code handling Martin Schwidefsky
2008-02-05 15:38 ` [patch 03/18] cio: Update documentation Martin Schwidefsky
2008-02-05 15:38 ` [patch 04/18] cio: Add shutdown callback for ccwgroup Martin Schwidefsky
2008-02-05 15:38 ` [patch 05/18] DEBUG_PAGEALLOC support for s390 Martin Schwidefsky
2008-02-05 15:38 ` [patch 06/18] Fix linker script Martin Schwidefsky
2008-02-05 15:38 ` [patch 07/18] Fix smp_call_function_mask semantics Martin Schwidefsky
2008-02-05 15:38 ` [patch 08/18] Fix couple of section mismatches Martin Schwidefsky
2008-02-05 15:38 ` [patch 09/18] console: allow vt220 console to be the only console Martin Schwidefsky
2008-02-05 15:38 ` [patch 10/18] Define GENERIC_LOCKBREAK Martin Schwidefsky
2008-02-05 15:38 ` [patch 11/18] Cleanup & optimize bitops Martin Schwidefsky
2008-02-05 15:38 ` [patch 12/18] Implement ext2_find_next_bit Martin Schwidefsky
2008-02-05 15:38 ` [patch 13/18] latencytop s390 support Martin Schwidefsky
2008-02-05 15:38 ` [patch 14/18] dasd: add ifcc handling Martin Schwidefsky
2008-02-05 15:38 ` [patch 15/18] dasd: fix panic caused by alias device offline Martin Schwidefsky
2008-02-05 15:38 ` [patch 16/18] sclp_tty/sclp_vt220: Fix scheduling while atomic Martin Schwidefsky
2008-02-05 15:38 ` [patch 17/18] Remove BUILD_BUG_ON() in vmem code Martin Schwidefsky
2008-02-05 15:38 ` Martin Schwidefsky [this message]
2008-02-05 15:45   ` [patch 18/18] dcss: Initialize workqueue before using it Carsten Otte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080205153916.234022436@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=geraldsc@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --subject='Re: [patch 18/18] dcss: Initialize workqueue before using it.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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