lkml.org 
[lkml]   [2003]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: scsi proc_info called unconditionally
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.057 / U:1.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site