All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Olaf Hering <olh@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: scsi proc_info called unconditionally
Date: Sat, 16 Aug 2003 11:06:16 +0100	[thread overview]
Message-ID: <20030816110616.A26667@infradead.org> (raw)
In-Reply-To: <20030816084409.GA8038@suse.de>; from olh@suse.de on Sat, Aug 16, 2003 at 10:44:09AM +0200

On Sat, Aug 16, 2003 at 10:44:09AM +0200, Olaf Hering wrote:
> 
> Why is ->proc_info() called when the function pointer is NULL?

Looks like the check for it's presence got lost in

	[PATCH] Correct removal of procfs host enteries [1/2]

Here's a trivial patch to get it back:


--- 1.32/drivers/scsi/scsi_proc.c	Thu Jul 31 10:31:51 2003
+++ edited/drivers/scsi/scsi_proc.c	Sat Aug 16 10:31:37 2003
@@ -81,6 +81,9 @@
 
 void scsi_proc_hostdir_add(struct scsi_host_template *sht)
 {
+	if (!sht->proc_info)
+		return;
+
 	down(&global_host_template_sem);
 	if (!sht->present++) {
 		sht->proc_dir = proc_mkdir(sht->proc_name, proc_scsi);
@@ -96,6 +99,9 @@
 
 void scsi_proc_hostdir_rm(struct scsi_host_template *sht)
 {
+	if (!sht->proc_info)
+		return;
+
 	down(&global_host_template_sem);
 	if (!--sht->present && sht->proc_dir) {
 		remove_proc_entry(sht->proc_name, proc_scsi);

  reply	other threads:[~2003-08-16 10:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-16  8:44 scsi proc_info called unconditionally Olaf Hering
2003-08-16 10:06 ` Christoph Hellwig [this message]
2003-08-16 17:00 ` Alan Cox
2003-08-17  8:09   ` Olaf Hering
2003-08-17  9:39     ` Christoph Hellwig
2003-08-17  9:56       ` Alan Cox
2003-08-17 10:07         ` Christoph Hellwig

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=20030816110616.A26667@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=olh@suse.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.