On Mon, 2008-04-28 at 03:34 +0200, Ingo Molnar wrote:sigh, every time I fix this free list stuff in one place, it breaks in another. This one is caused by the alloc->put sequence for the host (it never got to scsi_add_host() where the freelist is allocated, so we need to not release it in that case). Try this; the signature for an uninitialised free list is easy (both list pointers NULL), so the patch detects that and doesn't try to run over the uninitialised list head. James --- diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 12d69d7..dc36321 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -481,6 +481,14 @@ int scsi_setup_command_freelist(struct Scsi_Host *shost) */ void scsi_destroy_command_freelist(struct Scsi_Host *shost) { + if (shost->free_list.next == NULL && shost->free_list.prev == NULL) + /* + * If the next and prev pointers are NULL, that + * means the list was never initialised, so it + * doesn't need freeing + */ + return; + while (!list_empty(&shost->free_list)) { struct scsi_cmnd *cmd; --
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 011/196] sysfs: Fix a copy-n-paste typo in comment |
| KAMEZAWA Hiroyuki | Re: 2.6.23-rc4-mm1 |
| Aubrey | O_DIRECT question |
git: | |
| Andy Parkins | Re: [RFC] Submodules in GIT |
| Shawn Pearce | Re: Notes on Using Git with Subprojects |
| Junio C Hamano | [RFD] On deprecating "git-foo" for builtins |
| Andrew Ruder | [PATCH] Add policy on user-interface changes |
| Steve Shockley | Re: Real men don't attack straw men |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Woodchuck | Re: bcw(4) is gone |
| Renaud Allard | Re: Spamd default behaviour of accepting everything |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| john ye | [PATCH: 2.6.13-15-SMP 3/3] network: concurrently run softirq network code on SMP |
| Patrick McHardy | [NET_SCHED 04/15]: act_api: use nlmsg_parse |
| David Miller | Re: 2.6.25-rc8: FTP transfer errors |
| high memory | 17 hours ago | Linux kernel |
| semaphore access speed | 20 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 21 hours ago | Linux kernel |
| Easter Eggs in windows XP | 23 hours ago | Windows |
| Shared swap partition | 1 day ago | Linux general |
| Root password | 1 day ago | Linux general |
| Where/when DNOTIFY is used? | 1 day ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 1 day ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 1 day ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
