All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix more ipr kref problems
@ 2004-08-29 21:51 James Bottomley
  2004-08-30 14:01 ` Brian King
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2004-08-29 21:51 UTC (permalink / raw)
  To: Brian King, Andrew Morton, greg; +Cc: SCSI Mailing List

This was caused by

KREF: make kref_get() return void as it makes sense to do so.
  
drivers/scsi/ipr.c: In function `ipr_worker_thread':
drivers/scsi/ipr.c:1825: error: wrong type argument to unary exclamation
mark
make[2]: *** [drivers/scsi/ipr.o] Error 1

The fix is fairly simple.

James

===== drivers/scsi/ipr.c 1.25 vs edited =====
--- 1.25/drivers/scsi/ipr.c	2004-08-16 01:40:17 -05:00
+++ edited/drivers/scsi/ipr.c	2004-08-29 16:25:31 -05:00
@@ -1822,10 +1822,11 @@
 
 	if (ioa_cfg->sdt_state == GET_DUMP) {
 		dump = ioa_cfg->dump;
-		if (!dump || !kref_get(&dump->kref)) {
+		if (!dump) {
 			spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 			return;
 		}
+		kref_get(&dump->kref);
 		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 		ipr_get_ioa_dump(ioa_cfg, dump);
 		kref_put(&dump->kref, ipr_release_dump);
@@ -2423,11 +2424,11 @@
 	spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
 	dump = ioa_cfg->dump;
 
-	if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump || !kref_get(&dump->kref)) {
+	if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump) {
 		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 		return 0;
 	}
-
+	kref_get(&dump->kref);
 	spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 
 	if (off > dump->driver_dump.hdr.len) {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix more ipr kref problems
  2004-08-29 21:51 [PATCH] fix more ipr kref problems James Bottomley
@ 2004-08-30 14:01 ` Brian King
  2004-08-30 17:07   ` syslog message Vladimir G. Ivanovic
  0 siblings, 1 reply; 3+ messages in thread
From: Brian King @ 2004-08-30 14:01 UTC (permalink / raw)
  To: James Bottomley; +Cc: Andrew Morton, greg, SCSI Mailing List

Patch looks good. Thanks.

-Brian

James Bottomley wrote:
> This was caused by
> 
> KREF: make kref_get() return void as it makes sense to do so.
>   
> drivers/scsi/ipr.c: In function `ipr_worker_thread':
> drivers/scsi/ipr.c:1825: error: wrong type argument to unary exclamation
> mark
> make[2]: *** [drivers/scsi/ipr.o] Error 1
> 
> The fix is fairly simple.
> 
> James
> 
> ===== drivers/scsi/ipr.c 1.25 vs edited =====
> --- 1.25/drivers/scsi/ipr.c	2004-08-16 01:40:17 -05:00
> +++ edited/drivers/scsi/ipr.c	2004-08-29 16:25:31 -05:00
> @@ -1822,10 +1822,11 @@
>  
>  	if (ioa_cfg->sdt_state == GET_DUMP) {
>  		dump = ioa_cfg->dump;
> -		if (!dump || !kref_get(&dump->kref)) {
> +		if (!dump) {
>  			spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
>  			return;
>  		}
> +		kref_get(&dump->kref);
>  		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
>  		ipr_get_ioa_dump(ioa_cfg, dump);
>  		kref_put(&dump->kref, ipr_release_dump);
> @@ -2423,11 +2424,11 @@
>  	spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
>  	dump = ioa_cfg->dump;
>  
> -	if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump || !kref_get(&dump->kref)) {
> +	if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump) {
>  		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
>  		return 0;
>  	}
> -
> +	kref_get(&dump->kref);
>  	spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
>  
>  	if (off > dump->driver_dump.hdr.len) {
> 
> 

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 3+ messages in thread

* syslog message
  2004-08-30 14:01 ` Brian King
@ 2004-08-30 17:07   ` Vladimir G. Ivanovic
  0 siblings, 0 replies; 3+ messages in thread
From: Vladimir G. Ivanovic @ 2004-08-30 17:07 UTC (permalink / raw)
  To: SCSI Mailing List

This
kernel: Badness in sym_complete_error at drivers/scsi/sym53c8xx_2/sym_hipd.c:5513
kernel:  [<82886a76>] sym_complete_error+0x96/0x233 [sym53c8xx]
kernel:  [<8288021f>] sym53c8xx_intr+0x59/0xc5 [sym53c8xx]
kernel:  [<021073f1>] handle_IRQ_event+0x21/0x43
kernel:  [<02107884>] do_IRQ+0x15f/0x22e
kernel:  =======================
kernel:  [<021168b6>] smp_apic_timer_interrupt+0x122/0x127
kernel:  [<02104018>] default_idle+0x0/0x2c
kernel:  [<022d007b>] unix_stream_data_wait+0x28/0x10c
kernel:  [<02104041>] default_idle+0x29/0x2c
kernel:  [<0210409d>] cpu_idle+0x26/0x3b
kernel:  [<0238d78c>] start_kernel+0x1d0/0x1d5


--- Vladimir

-- 
Vladimir G. Ivanovic                        http://leonora.org/~vladimir
Palo Alto, CA 94306                                      +1 650 678 8014

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-30 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-29 21:51 [PATCH] fix more ipr kref problems James Bottomley
2004-08-30 14:01 ` Brian King
2004-08-30 17:07   ` syslog message Vladimir G. Ivanovic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.