]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iscsi_ibft, be2iscsi, iscsi_boot: fix boot kobj data lifetime management
authorMike Christie <michaelc@cs.wisc.edu>
Fri, 24 Jun 2011 20:11:53 +0000 (15:11 -0500)
committerGuru Anbalagane <guru.anbalagane@oracle.com>
Fri, 16 Dec 2011 02:30:23 +0000 (18:30 -0800)
commit1267e3656dbf233a8e2a010658e270676d4b428f
tree43c4cb066124d4e17db47d66f90b3a3deca3562b
parent48814e7af977a79335e26f30cb7d22fbcd0eed8a
iscsi_ibft, be2iscsi, iscsi_boot: fix boot kobj data lifetime management

be2iscsi passes the boot functions its phba object which is
allocated in the shost, but iscsi_ibft passes in a object
allocated for each item to display. The problem is that
iscsi_boot_sysfs was managing the lifetime of the object
passed in and doing a kfree on release. This causes a double
free for be2iscsi which frees the shost in its pci_remove.

This patch fixes the problem by adding a release callback
which the drivers can call kfree or a put() type of function
(needed for be2iscsi which will do a get/put on the shost).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/firmware/iscsi_ibft.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/iscsi_boot_sysfs.c
include/linux/iscsi_boot_sysfs.h