Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3170

kernel-2.6.18-194.11.1.el5.src.rpm

From: Hans-Joachim Picht <hpicht@redhat.com>
Date: Thu, 21 Aug 2008 17:33:06 +0200
Subject: [s390] qdio: fix module ref counting in qdio_free
Message-id: 20080821153306.GA21997@redhat.com
O-Subject: Re: [RHEL5 U3 PATCH 4/5] s390 - qdio: Module ref counting (module_put) in qdio_free not in proper place.
Bugzilla: 458074
RH-Acked-by: Jarod Wilson <jwilson@redhat.com>
RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com>

Description
============

We see a kernel OOPS on certain zfcp CHPID offline/online sequences. This
can
be fixed moving the module_put request into the qdio_shutdown function.

Bugzilla
=========

BZ 458074
https://bugzilla.redhat.com/show_bug.cgi?id=458074

Upstream status of the patch:
=============================

The code for this fix was released as part of
the qdio driver rewrite effort which is upstream
as of git commit 779e6e1c724d30e0fd1baca78b852e41e3a23c1d

Test status:
============

The patch has been tested and fixes the problem.
The fix has been verified by the IBM test department.

Please ACK.

With best regards,

        -Hans

diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index cb6037c..c2194dc 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -2723,7 +2723,6 @@ qdio_free(struct ccw_device *cdev)
 	up(&irq_ptr->setting_up_sema);
 
 	qdio_release_irq_memory(irq_ptr);
-	module_put(THIS_MODULE);
 	return 0;
 }
 
@@ -3060,12 +3059,6 @@ int qdio_fill_irq(struct qdio_initialize *init_data)
 	   	     init_data->input_sbal_addr_array,
    		     init_data->output_sbal_addr_array);
 
-	if (!try_module_get(THIS_MODULE)) {
-		QDIO_PRINT_CRIT("try_module_get() failed!\n");
-		qdio_release_irq_memory(irq_ptr);
-		return -EINVAL;
-	}
-
 	qdio_fill_thresholds(irq_ptr,init_data->no_input_qs,
 			     init_data->no_output_qs,
 			     init_data->min_input_threshold,