summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | [SCSI] qla4xxx: Assign values using correct datatypeAdheer Chandravanshi2013-05-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assign values using correct datatype in function qla4xxx_copy_to_fwddb_param() Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] qla4xxx: Fix smatch warningsAdheer Chandravanshi2013-05-021-16/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix following smatch warnings:- drivers/scsi/qla4xxx/ql4_os.c:6573 qla4xxx_sysfs_ddb_set_param() warn: possible memory leak of 'fw_ddb_entry' drivers/scsi/qla4xxx/ql4_os.c:6596 qla4xxx_sysfs_ddb_delete() warn: variable dereferenced before check 'fnode_sess' (see line 6584) drivers/scsi/qla4xxx/ql4_os.c:6632 qla4xxx_sysfs_ddb_delete() error: potential NULL dereference 'fw_ddb_entry'. Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] qla4xxx: Fix sparse warning for qla4xxx_sysfs_ddb_tgt_createVikas Chaudhary2013-05-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix following warning: drivers/scsi/qla4xxx/ql4_os.c:5507:5: warning: symbol 'qla4xxx_sysfs_ddb_tgt_create' was not declared. Should it be static? Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] qla4xxx: Silence gcc warningVikas Chaudhary2013-05-021-5/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix followig gcc warning:- drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_sysfs_ddb_get_param’: drivers/scsi/qla4xxx/ql4_os.c:6279: warning: comparison is always true due to limited range of data type drivers/scsi/qla4xxx/ql4_os.c:6290: warning: comparison is always true due to limited range of data type drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_sysfs_ddb_delete’: drivers/scsi/qla4xxx/ql4_os.c:6593: warning: ‘ddb_size’ may be used uninitialized in this function Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] libosd: remover duplicate __bitwise annotationDan Carpenter2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __be32 is already a __bitwise type so we don't need the second __bitwise here. It causes a Sparse error: include/scsi/osd_protocol.h:110:26: error: invalid modifier Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Benny Halevy <bhalevy@tonian.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] megaraid_sas: release lock on error pathDan Carpenter2013-05-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should unlock here before returning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] ibmvfc: Driver version 1.0.11Brian King2013-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] ibmvfc: Suppress ABTS if target goneBrian King2013-05-022-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for a new VIOS feature that allows ibmvfc to optimize terminate_rport_io by telling the VIOS the target is no longer accessible on the fabric and that it should not send an ABTS out on the fabric to the device. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] ibmvfc: Send cancel when link is downBrian King2013-05-021-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If attempting to abort requests due to a fail fail timeout or error handling while the link is down, we cannot send an abort out on the fabric. We can, however, send a cancel to the VIOS. This fixes ibmvfc to send a cancel in this case to prevent error handling from failing and/or escalating. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] ibmvfc: Support FAST_IO_FAIL in EH handlersBrian King2013-05-021-17/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for receiving FAST_IO_FAIL from fc_block_scsi_eh when in error recovery. This fixes cases of devices being taken offline when they are no longer accessible on the fabric, preventing them from coming back online when the fabric recovers. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] ibmvfc: Properly set cancel flags when cancelling abortBrian King2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flags on a cancel operation are intended to indicate what, if any, TMF will follow the cancel request. This fixes a case where we were incorrectly setting the abort task set flag on the cancel flag when we were cancelling an abort task set. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Bump the driver version to 10.0.467.0Jayamohan Kallickal2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix issue in passing the exp_cmdsn and max_cmdsnJayamohan Kallickal2013-05-021-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Command Window value from the CQE was used to calculate the max_cmdsn for that session.The command window value extracted for SKH-R adapter was not proper. The value was extracted from BE adapter completion event. Fixed the issue by getting the cmd_wnd value from SKH-R CQE. The exp_cmdsn and max_cmdsn values were not converted to BE format before calling the __iscsi_complete_pdu(). Fixed the issue of converting to BE format. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix possible reentrancy issue in be_iopollShlomo Pongratz2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver creates "NAPI" context per core which is fine, however the above routine declares the ret variable as static! Thus there is only one instance of this variable! When this routine is called from more than one thread of execution, than the result is unpredictable. static unsigned int ret; ..... ret = beiscsi_process_cq(pbe_eq); <--------Another thread can enter here and change "ret". if (ret < budget) { .... } <--------Another thread can enter here and change "ret". return ret; Fix - remove the "static" Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2scsi: Update copyright dates to 2013Jayamohan Kallickal2013-05-029-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix checking Adapter state while establishing CXNJayamohan Kallickal2013-05-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before tyring to establish a CXN with the target, check if the adapter is in a stable state Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix dynamic CID allocation Mechanism in driverJayamohan Kallickal2013-05-023-70/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Number of CID assigned to a function from adapter can be dynamic. The CID count for each function was fixed number before. Code Fix done so that adapters with fixed/dynamic CID count will work with the driver. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi : Fix the NOP-In handling code pathJayamohan Kallickal2013-05-023-15/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When target send a NOP-IN with valid TTT, driver issues a NOP-OUT and the task was not freed from driver. The task list available for the session used to run out, and as no more task list were available no more iSCSI commands were exchanged on that session. This patches fixed the issue, by calling iscsi_put_task. Signed-off-by: Minh Tran <minhduc.tran@emulex.com> Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix the Port Link Status issueJayamohan Kallickal2013-05-022-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the Logical Link status also as part of the port link status. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix displaying the Active Session Count from driverJayamohan Kallickal2013-05-023-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the displaying of number of active sessions in use. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix displaying the FW Version from driver.Jayamohan Kallickal2013-05-024-13/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mgmt_hba_attributes structure declared was not proper and because of that the FW response returned for the MBX_CMD was not matching. This issue went unnoticed as mgmt_hba_attribs structure members were never used in the code path. This fix of displaying the FW version had to change the mgmt_hba_attrib structure also. The latest driver will also work with the older FW as the issue was in the driver declaration. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix support for DEFQ extensionJayamohan Kallickal2013-05-022-12/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix support for DEFQ extension which will be used by latest adapters Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix MACRO for checking the adapter typeJayamohan Kallickal2013-05-023-76/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the code flow based on the MACRO defined to check for adapter. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix freeing CXN specific driver resources.Jayamohan Kallickal2013-05-023-22/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Free CXN specific resource held by driver when login redirection or connection retry happens. Login redirection was failing because WRB/SGL were not allocated from the CID on which doorbell was rung. Fixed the issue raised by MikeC Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix MSIX support in SKH-R to 32Jayamohan Kallickal2013-05-022-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch limits the max number of msix vectors to 32. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix MBX Command issuesJayamohan Kallickal2013-05-022-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Check Ready Bit before posting the BMBX Hi Address - Fix the parameters passed to beiscsi_mccq_compl in beiscsi_open_conn() - Fix tag value check in beiscsi_ep_connect. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix returning Failure when MBX fails with Insufficient ↵Jayamohan Kallickal2013-05-022-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer error When MBX command fails with insufficent buffer, check for the response lenght returned. Return success if response length is non-zero value which indicates valid data. Signed-off-by: Minh Tran <minhduc.tran@emulex.com> Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] be2iscsi: Fix lack of uninitialize pattern to FWJayamohan Kallickal2013-05-023-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sends uninitialize pattern to FW during driver unload which is expected by FW for cleanup Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] csiostor: off by one errorDan Carpenter2013-05-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to store PROTO_ERR_IMPL_LOGO (26) things here, but the first element isn't used so the array should have 27 elements. This matches fwevt_to_rnevt[] which has 27 elements. The patch solves a Smatch static checker warning on my system: drivers/scsi/csiostor/csio_rnode.c:880 csio_rnode_fwevt_handler() error: buffer overflow '(rn)->stats.n_evt_fw' 26 <= 26 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Naresh Kumar Inna <naresh@chelsio.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] bnx2fc: Bumped version to 1.0.14Bhanu Prakash Gollapudi2013-05-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] bnx2fc: Update copyright datesBhanu Prakash Gollapudi2013-05-026-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] bnx2fc: Fix race condition between IO completion and abortBhanu Prakash Gollapudi2013-05-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When IO is successfully completed while an abort is pending, eh_abort incorrectly assumes that abort failed and performes recovery by issuing cleanup. Howerver, cleanup timesout as the firmware has no clue about this IO. Fix this by checking if the IO has already completed. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] bnx2fc: Include chip number in the symbolic nameBhanu Prakash Gollapudi2013-05-023-7/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [jejb: move PCI_DEVICE_ID definitions to include/pci_ids.h] Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] bnx2fc: Enable cached tasks to improve performanceBhanu Prakash Gollapudi2013-05-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set perf_config to 3 during firmware initialization to enable both cached connections as well as cached tasks. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] fnic: Incremented driver versionHiral Patel2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Brian Uchino <buchino@cisco.com> Signed-off-by: Hiral Patel <hiralpat@cisco.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] fnic: Kernel panic due to FIP mode misconfigurationHiral Patel2013-05-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If switch configured in FIP and adapter configured in non-fip mode, driver panics while queueing FIP frame in non-existing fip_frame_queue. Added config check before queueing FIP frame in misconfiguration case to avoid kernel panic. Signed-off-by: Hiral Patel <hiralpat@cisco.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| | * | | | [SCSI] fnic: FIP VLAN Discovery Feature SupportHiral Patel2013-05-027-4/+784
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FIP VLAN discovery discovers the FCoE VLAN that will be used by all other FIP protocols as well as by the FCoE encapsulation for Fibre Channel payloads on the established virtual link. One of the goals of FC-BB-5 was to be as nonintrusive as possible on initiators and targets, and therefore FIP VLAN discovery occurs in the native VLAN used by the initiator or target to exchange Ethernet traffic. The FIP VLAN discovery protocol is the only FIP protocol running on the native VLAN; all other FIP protocols run on the discovered FCoE VLANs. If an administrator has manually configured FCoE VLANs on ENodes and FCFs, there is no need to use this protocol. FIP and FCoE will run over the configured VLANs. An ENode without FCoE VLANs configuration would use this automated discovery protocol to discover over which VLANs FCoE is running. The ENode sends a FIP VLAN discovery request to a multicast MAC address called All-FCF-MACs, which is a multicast MAC address to which all FCFs listen. All FCFs that can be reached in the native VLAN of the ENode are expected to respond on the same VLAN with a response that lists one or more FCoE VLANs that are available for the ENode's VN_Port login. This protocol has the sole purpose of allowing the ENode to discover all the available FCoE VLANs. Now the ENode may enable a subset of these VLANs for FCoE Running the FIP protocol in these VLANs on a per VLAN basis. And FCoE data transactions also would occur on this VLAN. Hence, Except for FIP VLAN discovery, all other FIP and FCoE traffic runs on the selected FCoE VLAN. Its only the FIP VLAN Discovery protocol that is permitted to run on the Default native VLAN of the system. [**** NOTE ****] We are working on moving this feature definitions and functionality to libfcoe module. We need this patch to be approved, as Suse is looking forward to merge this feature in SLES 11 SP3 release. Once this patch is approved, we will submit patch which should move vlan discovery feature to libfoce. [Fengguang Wu <fengguang.wu@intel.com>: kmalloc cast removal] Signed-off-by: Anantha Prakash T <atungara@cisco.com> Signed-off-by: Hiral Patel <hiralpat@cisco.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* | | | | | Merge branch 'release' of ↵Linus Torvalds2013-05-124-2/+78
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull idle update from Len Brown: "Add support for new Haswell-ULT CPU idle power states" * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: intel_idle: initial C8, C9, C10 support tools/power turbostat: display C8, C9, C10 residency
| * | | | | | intel_idle: initial C8, C9, C10 supportLen Brown2013-04-182-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow intel_idle and cpuidle to utilize C8, C9, C10 when they are present on... "Fourth Generation Intel(R) Core(TM) Processors", which are based on Intel(R) microarchitecture code name Haswell. Signed-off-by: Len Brown <len.brown@intel.com>
| * | | | | | tools/power turbostat: display C8, C9, C10 residencyKristen Carlson Accardi2013-04-182-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Display residency in the new C-states, C8, C9, C10. C8, C9, C10 are present on some: "Fourth Generation Intel(R) Core(TM) Processors", which are based on Intel(R) microarchitecture code name Haswell. Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | | | | | | Merge git://git.infradead.org/users/eparis/auditLinus Torvalds2013-05-1112-867/+745Star
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull audit changes from Eric Paris: "Al used to send pull requests every couple of years but he told me to just start pushing them to you directly. Our touching outside of core audit code is pretty straight forward. A couple of interface changes which hit net/. A simple argument bug calling audit functions in namei.c and the removal of some assembly branch prediction code on ppc" * git://git.infradead.org/users/eparis/audit: (31 commits) audit: fix message spacing printing auid Revert "audit: move kaudit thread start from auditd registration to kaudit init" audit: vfs: fix audit_inode call in O_CREAT case of do_last audit: Make testing for a valid loginuid explicit. audit: fix event coverage of AUDIT_ANOM_LINK audit: use spin_lock in audit_receive_msg to process tty logging audit: do not needlessly take a lock in tty_audit_exit audit: do not needlessly take a spinlock in copy_signal audit: add an option to control logging of passwords with pam_tty_audit audit: use spin_lock_irqsave/restore in audit tty code helper for some session id stuff audit: use a consistent audit helper to log lsm information audit: push loginuid and sessionid processing down audit: stop pushing loginid, uid, sessionid as arguments audit: remove the old depricated kernel interface audit: make validity checking generic audit: allow checking the type of audit message in the user filter audit: fix build break when AUDIT_DEBUG == 2 audit: remove duplicate export of audit_enabled Audit: do not print error when LSMs disabled ...
| * | | | | | | audit: fix message spacing printing auidEric Paris2013-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The helper function didn't include a leading space, so it was jammed against the previous text in the audit record. Signed-off-by: Eric Paris <eparis@redhat.com>
| * | | | | | | Revert "audit: move kaudit thread start from auditd registration to kaudit init"Eric Paris2013-05-081-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6ff5e45985c2fcb97947818f66d1eeaf9d6600b2. Conflicts: kernel/audit.c This patch was starting a kthread for all the time. Since the follow on patches that required it didn't get finished in 3.10 time, we shouldn't ship this change in 3.10. Signed-off-by: Eric Paris <eparis@redhat.com>
| * | | | | | | audit: vfs: fix audit_inode call in O_CREAT case of do_lastJeff Layton2013-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jiri reported a regression in auditing of open(..., O_CREAT) syscalls. In older kernels, creating a file with open(..., O_CREAT) created audit_name records that looked like this: type=PATH msg=audit(1360255720.628:64): item=1 name="/abc/foo" inode=138810 dev=fd:00 mode=0100640 ouid=0 ogid=0 rdev=00:00 obj=unconfined_u:object_r:default_t:s0 type=PATH msg=audit(1360255720.628:64): item=0 name="/abc/" inode=138635 dev=fd:00 mode=040750 ouid=0 ogid=0 rdev=00:00 obj=unconfined_u:object_r:default_t:s0 ...in recent kernels though, they look like this: type=PATH msg=audit(1360255402.886:12574): item=2 name=(null) inode=264599 dev=fd:00 mode=0100640 ouid=0 ogid=0 rdev=00:00 obj=unconfined_u:object_r:default_t:s0 type=PATH msg=audit(1360255402.886:12574): item=1 name=(null) inode=264598 dev=fd:00 mode=040750 ouid=0 ogid=0 rdev=00:00 obj=unconfined_u:object_r:default_t:s0 type=PATH msg=audit(1360255402.886:12574): item=0 name="/abc/foo" inode=264598 dev=fd:00 mode=040750 ouid=0 ogid=0 rdev=00:00 obj=unconfined_u:object_r:default_t:s0 Richard bisected to determine that the problems started with commit bfcec708, but the log messages have changed with some later audit-related patches. The problem is that this audit_inode call is passing in the parent of the dentry being opened, but audit_inode is being called with the parent flag false. This causes later audit_inode and audit_inode_child calls to match the wrong entry in the audit_names list. This patch simply sets the flag to properly indicate that this inode represents the parent. With this, the audit_names entries are back to looking like they did before. Cc: <stable@vger.kernel.org> # v3.7+ Reported-by: Jiri Jaburek <jjaburek@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Test By: Richard Guy Briggs <rbriggs@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
| * | | | | | | audit: Make testing for a valid loginuid explicit.Eric W. Biederman2013-05-084-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | audit rule additions containing "-F auid!=4294967295" were failing with EINVAL because of a regression caused by e1760bd. Apparently some userland audit rule sets want to know if loginuid uid has been set and are using a test for auid != 4294967295 to determine that. In practice that is a horrible way to ask if a value has been set, because it relies on subtle implementation details and will break every time the uid implementation in the kernel changes. So add a clean way to test if the audit loginuid has been set, and silently convert the old idiom to the cleaner and more comprehensible new idiom. Cc: <stable@vger.kernel.org> # 3.7 Reported-By: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Tested-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
| * | | | | | | audit: fix event coverage of AUDIT_ANOM_LINKEric Paris2013-04-304-369/+405
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The userspace audit tools didn't like the existing formatting of the AUDIT_ANOM_LINK event. It needed to be expanded to emit an AUDIT_PATH event as well, so this implements the change. The bulk of the patch is moving code out of auditsc.c into audit.c and audit.h for general use. It expands audit_log_name to include an optional "struct path" argument for the simple case of just needing to report a pathname. This also makes audit_log_task_info available when syscall auditing is not enabled, since it is needed in either case for process details. Signed-off-by: Kees Cook <keescook@chromium.org> Reported-by: Steve Grubb <sgrubb@redhat.com>
| * | | | | | | audit: use spin_lock in audit_receive_msg to process tty loggingEric Paris2013-04-301-6/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is called when we receive a netlink message from userspace. We don't need to worry about it coming from irq context or irqs making it re-entrant. Signed-off-by: Eric Paris <eparis@redhat.com>
| * | | | | | | audit: do not needlessly take a lock in tty_audit_exitEric Paris2013-04-301-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were doing spin_lock_irq and spin_unlock_irq. This is STOOPID. If we were in interupt context we were already screwed and called panic() in do_exit(). So the irq stuff is useless. Also, these values can only be changed by receiving a netlink message from current. Since we are in do_exit() clearly we aren't in the syscall sending the netlink message to change these values. Thus, just read them and go with it. Signed-off-by: Eric Paris <eparis@redhat.com>
| * | | | | | | audit: do not needlessly take a spinlock in copy_signalEric Paris2013-04-301-4/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | current->signal->audit_* can only change from a netlink message from current. Obviously in this case we cannot be handling a netlink message from current. So there is no change these can change under us. No need to take a lock to read them. Signed-off-by: Eric Paris <eparis@redhat.com>
| * | | | | | | audit: add an option to control logging of passwords with pam_tty_auditRichard Guy Briggs2013-04-304-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most commands are entered one line at a time and processed as complete lines in non-canonical mode. Commands that interactively require a password, enter canonical mode to do this while shutting off echo. This pair of features (icanon and !echo) can be used to avoid logging passwords by audit while still logging the rest of the command. Adding a member (log_passwd) to the struct audit_tty_status passed in by pam_tty_audit allows control of canonical mode without echo per task. Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>