* Re: scsi proc_info called unconditionally
[not found] <20030816084409.GA8038@suse.de>
@ 2003-08-16 10:06 ` Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2003-08-16 10:06 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-kernel, linux-scsi
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-08-16 10:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20030816084409.GA8038@suse.de>
2003-08-16 10:06 ` scsi proc_info called unconditionally Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox