- 03 Jul, 2013 2 commits
-
-
Kees Cook authored
Calling dev_set_name with a single paramter causes it to be handled as a format string. Many callers are passing potentially dynamic string content, so use "%s" in those cases to avoid any potential accidents, including wrappers like device_create*() and bdi_register(). Signed-off-by:
Kees Cook <keescook@chromium.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Kees Cook authored
Disk names may contain arbitrary strings, so they must not be interpreted as format strings. It seems that only md allows arbitrary strings to be used for disk names, but this could allow for a local memory corruption from uid 0 into ring 0. CVE-2013-2851 Signed-off-by:
Kees Cook <keescook@chromium.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: <stable@vger.kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 29 Jun, 2013 3 commits
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 25 Jun, 2013 1 commit
-
-
Robert Love authored
fcoe_xmit was coded such that it would skip the vlan net device/layer and instead set some vlan flags and transmit on the real net device. The real net device has code that would add the vlan tag for fcoe skbs. This avoids some extra processing for data frames and provides a small performance improvement. Since fcoe_xmit was not using the vlan net device, __vlan_put_tag within the real net device's xmit routine was ultimately being called to set the vlan tag. With the below change the behavior of __vlan_put_tag changed slightly, it now sets the skb->protocol = vlan_proto. vlan_proto was not a field being set by fcoe_xmit, so the skb->protocol is now not being set to ETH_P_8021Q, as it should be. This patch converts fcoe_xmit to use the vlan_put_tag routine which will tag the skb and fcoe will continue to transmit fcoe skbs on the real net device. For reference, the below change was the one that altered the __vlan_put_tag behavior. commit 86a9bad3 Author: Patrick McHardy <kaber@trash.net> Date: Fri Apr 19 02:04:30 2013 +0000 net: vlan: add protocol argument to packet tagging functions Add a protocol argument to the VLAN packet tagging functions. In case of HW tagging, we need that protocol available in the ndo_start_xmit functions, so it is stored in a new field in the skb. The new field fits into a hole (on 64 bit) and doesn't increase the sks's size. Signed-off-by:
Robert Love <robert.w.love@intel.com> Acked-by:
Neil Horman <nhorman@tuxdriver.com> Acked-by:
John Fastabend <john.r.fastabend@intel.com>
-
- 19 Jun, 2013 1 commit
-
-
Arnd Bergmann authored
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
GOTO Masanori <gotom@debian.or.jp> Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: linux-scsi@vger.kernel.org
-
- 16 Jun, 2013 1 commit
-
-
Al Viro authored
When you copy some code, you are supposed to read it. If nothing else, there's a chance to spot and fix an obvious bug instead of sharing it... X-Song: "I Got It From Agnes", by Tom Lehrer Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> [ Tom Lehrer? You're dating yourself, Al ] Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 14 Jun, 2013 1 commit
-
-
Roland Dreier authored
Suppose an initiator sends a DATA IN command with an allocation length shorter than the FC transfer length -- we get a target message like TARGET_CORE[qla2xxx]: Expected Transfer Length: 256 does not match SCSI CDB Length: 0 for SAM Opcode: 0x12 In that case, the target core adjusts the data_length and sets se_cmd->residual_count for the underrun. But now suppose that command fails and we end up in tcm_qla2xxx_queue_status() -- that function unconditionally overwrites residual_count with the already adjusted data_length, and the initiator will burp with a message like qla2xxx [0000:00:06.0]-301d:0: Dropped frame(s) detected (0x100 of 0x100 bytes). Fix this by adding on to the existing underflow residual count instead. Signed-off-by:
Roland Dreier <roland@purestorage.com> Cc: Giridhar Malavali <giridhar.malavali@qlogic.com> Cc: Chad Dupuis <chad.dupuis@qlogic.com> Cc: stable <stable@vger.kernel.org> Signed-off-by:
Nicholas Bellinger <nab@linux-iscsi.org>
-
- 31 May, 2013 1 commit
-
-
Jan Beulich authored
That patch failed to set proc_scsi_fops' .release method. Signed-off-by:
Jan Beulich <jbeulich@suse.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 20 May, 2013 1 commit
-
-
Joern Engel authored
Drop unused transport_wait_for_tasks() check in target_wait_for_sess_cmds shutdown code, and convert tcm_qla2xxx + ib_srpt fabric drivers. Cc: Joern Engel <joern@logfs.org> Cc: Roland Dreier <roland@kernel.org> Signed-off-by:
Nicholas Bellinger <nab@linux-iscsi.org>
-
- 12 May, 2013 2 commits
-
-
wenxiong@linux.vnet.ibm.com authored
Defined target_ids,array_ids and vsets_ids as unsigned long to avoid target_destroy accessing memory after it was freed. Signed-off-by:
Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
gurinder.shergill@hp.com authored
The driver uses ha->mbx_cmd_flags variable to pass information between its ISR and mailbox routines, however, it does so without the protection of any locks. Under certain conditions, this can lead to multiple mailbox command completions being signaled, which, in turn, leads to a false mailbox timeout error for the subsequently issued mailbox command. The issue occurs frequently but intermittenly with the Qlogic 8GFC mezz card during card initialization, resulting in card initialization failure. Signed-off-by:
Gurinder (Sunny) Shergill <gurinder.shergill@hp.com> Acked-by:
Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- 10 May, 2013 19 commits
-
-
Neil Horman authored
This warning was reported recently: WARNING: at drivers/scsi/libfc/fc_exch.c:478 fc_seq_send+0x14f/0x160 [libfc]() (Not tainted) Hardware name: ProLiant DL120 G7 Modules linked in: tcm_fc target_core_iblock target_core_file target_core_pscsi target_core_mod configfs dm_round_robin dm_multipath 8021q garp stp llc bnx2fc cnic uio fcoe libfcoe libfc scsi_transport_fc scsi_tgt autofs4 sunrpc pcc_cpufreq ipv6 hpilo hpwdt e1000e microcode iTCO_wdt iTCO_vendor_support serio_raw shpchp ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif pata_acpi ata_generic ata_piix hpsa dm_mirror dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan] Pid: 5464, comm: target_completi Not tainted 2.6.32-272.el6.x86_64 #1 Call Trace: [<ffffffff8106b747>] ? warn_slowpath_common+0x87/0xc0 [<ffffffff8106b79a>] ? warn_slowpath_null+0x1a/0x20 [<ffffffffa025f7df>] ? fc_seq_send+0x14f/0x160 [libfc] [<ffffffffa035cbce>] ? ft_queue_status+0x16e/0x210 [tcm_fc] [<ffffffffa030a660>] ? target_complete_ok_work+0x0/0x4b0 [target_core_mod] [<ffffffffa030a766>] ? target_complete_ok_work+0x106/0x4b0 [target_core_mod] [<ffffffffa030a660>] ? target_complete_ok_work+0x0/0x4b0 [target_core_mod] [<ffffffff8108c760>] ? worker_thread+0x170/0x2a0 [<ffffffff810920d0>] ? autoremove_wake_function+0x0/0x40 [<ffffffff8108c5f0>] ? worker_thread+0x0/0x2a0 [<ffffffff81091d66>] ? kthread+0x96/0xa0 [<ffffffff8100c14a>] ? child_rip+0xa/0x20 [<ffffffff81091cd0>] ? kthread+0x0/0xa0 [<ffffffff8100c140>] ? child_rip+0x0/0x20 It occurs because fc_seq_send can have multiple contexts executing within it at the same time, and fc_seq_send doesn't consistently use the ep->ex_lock that protects this structure. Because of that, its possible for one context to clear the INIT bit in the ep->esb_state field while another checks it, leading to the above stack trace generated by the WARN_ON in the function. We should probably undertake the effort to convert access to the fc_exch structures to use rcu, but that a larger work item. To just fix this specific issue, we can just extend the ex_lock protection through the entire fc_seq_send path Signed-off-by:
Neil Horman <nhorman@tuxdriver.com> Reported-by:
Gris Ge <fge@redhat.com> CC: Robert Love <robert.w.love@intel.com> Signed-off-by:
Robert Love <robert.w.love@intel.com>
-
Mark Rustad authored
The service_params field is being checked against the symbol FC_RPORT_ROLE_FCP_INITIATOR where it really should be checked against FCP_SPPF_INIT_FCN. Signed-off-by:
Mark Rustad <mark.d.rustad@intel.com> Tested-by:
Jack Morgan <jack.morgan@intel.com> Signed-off-by:
Robert Love <robert.w.love@intel.com>
-
Krishna Mohan authored
When multiple FCFs in use, and first FIP Advertisement received is with "Available for Login" i.e A bit set to 0, FCF selection will fail. The fix is to remove the assumption in the code that first FCF is only allowed selectable FCF. Consider the scenario fip->fcfs contains FCF1(fabricname X, marked A=0) FCF2(fabricname Y, marked A=1). list_first_entry(first) points to FCF1 and 1st iteration we ignore the FCF and on 2nd iteration we compare FCF1 & FCF2 fabric name and we fails to perform FCF selection. Signed-off-by:
Krishna Mohan <krmohan@cisco.com> Reviewed-by:
Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by:
Robert Love <robert.w.love@intel.com>
-
Chad Dupuis authored
Signed-off-by:
Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by:
Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Mike Christie authored
This fixes a bug where the iscsi class/driver did not do a put_device when a sess/conn device was found. This also simplifies the interface by not having to pass in some arguments that were duplicated and did not need to be exported. Reported-by:
Zhao Hongjiang <zhaohongjiang@huawei.com> Signed-off-by:
Mike Christie <michaelc@cs.wisc.edu> Acked-by:
Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
James Bottomley authored
These enums have been separate since the dawn of SAS, mainly because the latter is a procotol only enum and the former includes additional state for libsas. The dichotomy causes endless confusion about which one you should use where and leads to pointless warnings like this: drivers/scsi/mvsas/mv_sas.c: In function 'mvs_update_phyinfo': drivers/scsi/mvsas/mv_sas.c:1162:34: warning: comparison between 'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare] Fix by eliminating one of them. The one kept is effectively the sas.h one, but call it sas_device_type and make sure the enums are all properly namespaced with the SAS_ prefix. Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Modified thermal configuration to happen after interrupt registration Added SAS controller configuration during initialization Added error handling logic to handle I_T_Nexus errors and variants [jejb: fix up tabs and spaces issues] Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Handled NCQ errors in the low level driver as the FW is not providing the faulty tag for NCQ errors for libsas to recover. [jejb: fix checkpatch issues] Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Individual WWN read operations based on controller. PM8081 - Read WWN from Flash VPD. PM8088/89 - Read WWN from EEPROM. PM8001 - Read WWN from NVM. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Changed name in driver to pm80xx. Updated debug messages. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Performing pci_free_consistent in tasklet had result in a core dump. So allocated a new memory region for it. Fix for passing proper address and operation in firmware flash update. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Additional bar shift for new SPC firmware, applicable to device id 0x8081 only. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Implementation of SPCv/ve specific hardware functionality and macros. Changing common functionalities wrt SPCv/ve operations. Conditional checks for SPC specific operations. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Implementation of interrupt handlers and tasklets to support upto 64 interrupt for the device. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Update of function prototype for common function to SPC and SPCv/ve. Multiple queues implementation for IO. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Memory allocation and configuration of multiple inbound and outbound queues. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Sakthivel K authored
Updated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related macros. Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware functionalities. Signed-off-by:
Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by:
Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by:
Jack Wang <jack_wang@usish.com> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
James Bottomley authored
lpfc uses the generic checksum as well as the T10DIF one from the lib/ directory, so make sure they're selected. Reported-by:
Randy Dunlap <rdunlap@infradead.org> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Hannes Reinecke authored
scsi_send_eh_cmnd() is calling queuecommand() directly, so it needs to check the return value here. The only valid return codes for queuecommand() are 'busy' states, so we need to wait for a bit to allow the LLDD to recover. Based on an earlier patch from Wen Xiong. [jejb: fix confusion between msec and jiffies values and other issues] [bvanassche: correct stall_for interval] Cc: Wen Xiong <wenxiong@linux.vnet.ibm.com> Cc: Brian King <brking@linux.vnet.ibm.com> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- 07 May, 2013 2 commits
-
-
Kent Overstreet authored
Faster kernel compiles by way of fewer unnecessary includes. [akpm@linux-foundation.org: fix fallout] [akpm@linux-foundation.org: fix build] Signed-off-by:
Kent Overstreet <koverstreet@google.com> Cc: Zach Brown <zab@redhat.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jens Axboe <axboe@kernel.dk> Cc: Asai Thambi S P <asamymuthupa@micron.com> Cc: Selvan Mani <smani@micron.com> Cc: Sam Bradshaw <sbradshaw@micron.com> Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Benjamin LaHaise <bcrl@kvack.org> Reviewed-by:
"Theodore Ts'o" <tytso@mit.edu> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Al Viro authored
The value passed is 0 in all but "it can never happen" cases (and those only in a couple of drivers) *and* it would've been lost on the way out anyway, even if something tried to pass something meaningful. Just don't bother. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 06 May, 2013 2 commits
-
-
Lin Ming authored
Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume for devices that take advantage of it. Remove scsi_autopm_* from sd open/release path and check_events path. Signed-off-by:
Lin Ming <ming.m.lin@intel.com> Signed-off-by:
Aaron Lu <aaron.lu@intel.com> Acked-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Lin Ming authored
With the introduction of REQ_PM, modify sd's runtime suspend operation functions to use that flag so that the operations to put the device into runtime suspended state(i.e. sync cache and stop device) will not affect its runtime PM status. Signed-off-by:
Lin Ming <ming.m.lin@intel.com> Signed-off-by:
Aaron Lu <aaron.lu@intel.com> Acked-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- 04 May, 2013 2 commits
-
-
Al Viro authored
Cc: stable@vger.kernel.org Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Geert Uytterhoeven authored
Based on Al's changes to atari_scsi. Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 02 May, 2013 2 commits
-
-
Vikas Chaudhary authored
Increment 'ha->iocb_cnt' before adding mbox_iocb to iocb queue. Signed-off-by:
Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Vinayak Holikatti authored
This patch corrects the expected data transfer size of the command UPIU. The current implementation of cmd->transfersize is wrong as it probably equal to sector size. With this implementation the transfer size is updated correctly Reported-by:
KOBAYASHI Yoshitake <yoshitake.kobayashi@toshiba.co.jp> Reviewed-by:
Arnd Bergmann <arnd@arndb.de> Reviewed-by:
Namjae Jeon <linkinjeon@gmail.com> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Tested-by:
Maya Erez <merez@codeaurora.org> Signed-off-by:
Santosh Yaraganavi <santoshsy@gmail.com> Signed-off-by:
Vinayak Holikatti <vinholikatti@gmail.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-