lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1176991356.31764.3.camel@mulgrave.il.steeleye.com>
Date:	Thu, 19 Apr 2007 10:02:36 -0400
From:	James Bottomley <James.Bottomley@...elEye.com>
To:	Josef Bacik <jwhiter@...hat.com>
Cc:	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] fix for async scsi scan sysfs problem (resend)

On Thu, 2007-04-19 at 09:25 -0400, Josef Bacik wrote:
> Looking through everything I came to the conclusion that we don't really need
> the scsi_sysfs_add_devices in scsi_finish_async_scan, which gets run everytime
> we do a do_scan_async.  In doing the scanning, if we come upon anything we will
> already be registering the device with sysfs so the scsi_sysfs_add_devices step
> is kind of useless.

Unfortunately, it isn't.  The registration step while scanning is at the
end of scsi_add_lun():


	if (!async && scsi_sysfs_add_sdev(sdev) != 0)
		return SCSI_SCAN_NO_RESPONSE;

	return SCSI_SCAN_LUN_PRESENT;

The !async should mean that the addition *only* occurs for the non async
scan case ... if you remove the post async scan add, we'll lose devices.

>   I tested this and it worked fine on my UP box (where the
> problem was happening) and my SMP box (where the problem wasn't happening).  Now
> I'm not entirely sure if this is correct, but I'm attaching the patch that I
> used to fix it for me, please point out if I've done something wrong or if there
> is a different way this needs to be fixed.  Thank you,

Could you add some debugging first to see if we're actually adding the
device twice (and also, if we are, what the value of the async is).

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ