Linux 3.4.15
I'm announcing the release of the 3.4.15 kernel.
All users of the 3.4 kernel series must upgrade.
The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/Kconfig | 10 ++ arch/arm/include/asm/vfpmacros.h | 4 arch/arm/mm/cache-v7.S | 3 arch/mips/kernel/kgdb.c | 9 ++ arch/x86/xen/enlighten.c | 18 ++++ block/blk-core.c | 2 drivers/acpi/ec.c | 30 ++++++- drivers/char/tpm/tpm.c | 21 +++-- drivers/firewire/core-cdev.c | 4 drivers/gpu/drm/i915/intel_display.c | 4 drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 6 - drivers/md/raid10.c | 2 drivers/net/ethernet/intel/e1000e/e1000.h | 6 - drivers/net/ethernet/intel/e1000e/netdev.c | 2 drivers/net/wireless/ath/ath9k/beacon.c | 2 drivers/net/wireless/ath/ath9k/main.c | 2 drivers/net/wireless/ath/ath9k/xmit.c | 53 ++++++------ drivers/scsi/hpsa.c | 39 ++++++++- drivers/scsi/hpsa.h | 2 drivers/scsi/hpsa_cmd.h | 1 drivers/scsi/scsi_debug.c | 2 drivers/scsi/storvsc_drv.c | 5 + drivers/target/iscsi/iscsi_target.c | 2 drivers/target/iscsi/iscsi_target_core.h | 4 drivers/target/iscsi/iscsi_target_tpg.c | 12 ++ drivers/target/target_core_configfs.c | 8 + drivers/tty/vt/vt.c | 13 +++ drivers/usb/class/cdc-acm.c | 3 drivers/usb/gadget/at91_udc.c | 2 drivers/video/udlfb.c | 2 drivers/video/via/via_clock.c | 19 ++++ fs/autofs4/root.c | 6 - fs/ceph/export.c | 18 +++- fs/ecryptfs/ecryptfs_kernel.h | 2 fs/ecryptfs/file.c | 100 +++++++++++------------- fs/ecryptfs/inode.c | 65 ++++++++------- fs/ecryptfs/main.c | 1 fs/ecryptfs/mmap.c | 39 +++------ fs/gfs2/export.c | 4 fs/isofs/export.c | 2 fs/jbd/commit.c | 45 ++++++++-- fs/jbd/transaction.c | 64 ++++++++++----- fs/lockd/mon.c | 4 fs/nfsd/nfs4idmap.c | 2 fs/nfsd/nfs4state.c | 1 fs/reiserfs/inode.c | 6 + fs/xfs/xfs_export.c | 3 include/linux/netfilter/ipset/ip_set_timeout.h | 4 include/net/ip_vs.h | 2 include/net/netfilter/nf_conntrack_ecache.h | 1 kernel/debug/kdb/kdb_io.c | 33 ++++++- kernel/module.c | 4 kernel/timer.c | 10 +- mm/shmem.c | 6 - net/core/pktgen.c | 2 net/ipv4/netfilter/nf_nat_sip.c | 10 +- net/netfilter/ipvs/ip_vs_ctl.c | 5 - net/netfilter/nf_conntrack_core.c | 16 ++- net/netfilter/nf_conntrack_expect.c | 29 +----- net/netfilter/xt_hashlimit.c | 8 - net/netfilter/xt_limit.c | 13 +-- net/netfilter/xt_set.c | 17 +++- net/sunrpc/xprtsock.c | 21 +++-- sound/pci/ac97/ac97_codec.c | 2 sound/pci/emu10k1/emu10k1_main.c | 9 ++ sound/pci/hda/patch_cirrus.c | 6 - sound/pci/hda/patch_realtek.c | 6 + sound/soc/codecs/wm2200.c | 3 sound/soc/omap/omap-abe-twl6040.c | 2 sound/soc/sh/fsi.c | 15 +-- 71 files changed, 583 insertions(+), 297 deletions(-)
Alexander Holler (1):
video/udlfb: fix line counting in fb_write
Amerigo Wang (1):
pktgen: fix crash when generating IPv6 packets
Christoph Hellwig (1):
iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
Dan Carpenter (1):
md/raid10: use correct limit variable
Daniel Drake (1):
viafb: don't touch clock state on OLPC XO-1.5
David Henningsson (2):
ALSA: hda - do not detect jack on internal speakers for Realtek
ALSA: hda - Always check array bounds in alc_get_line_out_pfx
Egbert Eich (1):
drm/radeon: Don't destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy().
Fabio Porcedda (1):
usb: gadget: at91_udc: fix dt support
Felix Fietkau (1):
ath9k: use ieee80211_free_txskb
Feng Tang (2):
ACPI: EC: Make the GPE storm threshold a module parameter
ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop
Florian Westphal (1):
netfilter: limit, hashlimit: avoid duplicated inline
Greg Kroah-Hartman (1):
Linux 3.4.15
Guennadi Liakhovetski (1):
ASoC: fsi: don't reschedule DMA from an atomic context
Hildner, Christian (1):
timers: Fix endless looping between cascade() and internal_add_timer()
Hiroaki SHIMODA (1):
e1000e: Change wthresh to 1 to avoid possible Tx stalls
Hugh Dickins (1):
tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking
Ian Kent (1):
autofs4 - fix reset pending flag on mount fail
J. Bruce Fields (1):
nfsd4: fix nfs4 stateid leak
Jan Engelhardt (1):
netfilter: xt_limit: have r->cost != 0 case work
Jan Kara (1):
jbd: Fix assertion failure in commit code due to lacking transaction credits
Jani Nikula (1):
drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
Jason Wessel (2):
mips,kgdb: fix recursive page fault with CONFIG_KPROBES kdb,vt_console: Fix missed data due to pager overruns
Jean-Christian de Rivaz (1):
Add CDC-ACM support for the CX93010-2x UCMxx USB Modem
Jozsef Kadlecsik (2):
netfilter: ipset: fix timeout value overflow bug
netfilter: ipset: timeout fixing bug broke SET target special timeout value
Julian Anastasov (1):
ipvs: fix oops in ip_vs_dst_event on rmmod
K. Y. Srinivasan (1):
SCSI: storvsc: Account for in-transit packets in the RESET path
Konrad Rzeszutek Wilk (2):
xen/bootup: allow {read|write}_cr8 pvops call. xen/bootup: allow read_tscp call for Xen PV guests.
Lin Ming (1):
ipvs: fix oops on NAT reply in br_nf context
Lukas Czerner (1):
SCSI: scsi_debug: Fix off-by-one bug when unmapping region
Malahal Naineni (1):
NFSD: pass null terminated buf to kstrtouint()
Mark Brown (2):
ASoC: wm2200: Use rev A register patches on rev B
ASoC: wm2200: Fix non-inverted OUT2 mute control
Matthew Garrett (1):
module: taint kernel when lve module is loaded
Maxim Kachur (1):
ALSA: emu10k1: add chip details for E-mu 1010 PCIe card
Nicholas Bellinger (3):
iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU
iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode
iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values
Pablo Neira Ayuso (3):
netfilter: nf_conntrack: fix racy timer handling with reliable events
netfilter: nf_nat_sip: fix incorrect handling of EBUSY for RTCP expectation
netfilter: nf_ct_expect: fix possible access to uninitialized timer
Patrick McHardy (1):
netfilter: nf_nat_sip: fix via header translation with multiple parameters
Peter Huewe (1):
tpm: Propagate error from tpm_transmit to fix a timeout hang
Peter Senna Tschudin (1):
target: fix return code in target_core_init_configfs error path
Peter Ujfalusi (1):
ASoC: omap-abe-twl6040: Fix typo of Vibrator
Russell King (1):
ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels
Simon Horman (1):
ARM: 7541/1: Add ARM ERRATA 775420 workaround
Stanislav Kinsbursky (1):
lockd: use rpc client's cl_nodename for id encoding
Stefan Richter (1):
firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel)
Stephen M. Cameron (1):
SCSI: hpsa: dial down lockup detection during firmware flash
Takashi Iwai (2):
ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
Tejun Heo (1):
block: fix request_queue->flags initialization
Trond Myklebust (1):
SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT
Tyler Hicks (5):
eCryptfs: Unlink lower inode when ecryptfs_create() fails
eCryptfs: Initialize empty lower files when opening them
eCryptfs: Revert to a writethrough cache model
eCryptfs: Write out all dirty pages just before releasing the lower file
eCryptfs: Call lower ->flush() from ecryptfs_flush()
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 14 +SUBLEVEL = 15 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/Kconfig +10 -0
@@ -1405,6 +1405,16 @@ config PL310_ERRATA_769419 on systems with an outer cache, the store buffer is drained explicitly. +config ARM_ERRATA_775420 + bool "ARM errata: A data cache maintenance operation which aborts, might lead to deadlock" + depends on CPU_V7 + help + This option enables the workaround for the 775420 Cortex-A9 (r2p2, + r2p6,r2p8,r2p10,r3p0) erratum. In case a date cache maintenance + operation aborts with MMU exception, it might cause the processor + to deadlock. This workaround puts DSB before executing ISB if + an abort may occur on cache maintenance. + endmenu source "arch/arm/common/Kconfig"
arch/arm/include/asm/vfpmacros.h +2 -2
@@ -28,7 +28,7 @@ ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] tst \tmp, #HWCAP_VFPv3D16 - ldceq p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} + ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} addne \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0
@@ -52,7 +52,7 @@ ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] tst \tmp, #HWCAP_VFPv3D16 - stceq p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} + stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} addne \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0
arch/arm/mm/cache-v7.S +3 -0
@@ -211,6 +211,9 @@ ENTRY(v7_coherent_user_range) * isn't mapped, just try the next page. */ 9001: +#ifdef CONFIG_ARM_ERRATA_775420 + dsb +#endif mov r12, r12, lsr #12 mov r12, r12, lsl #12 add r12, r12, #4096
arch/mips/kernel/kgdb.c +9 -0
@@ -283,6 +283,15 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd,struct pt_regs *regs = args->regs;int trap = (regs->cp0_cause &0x7c ) >>2 ; +#ifdef CONFIG_KPROBES +/* +* Return immediately if the kprobes fault notifier has set +* DIE_PAGE_FAULT. +*/ +if (cmd ==DIE_PAGE_FAULT ) +return NOTIFY_DONE ; +#endif /* CONFIG_KPROBES */ +/* Userspace events, ignore. */ if (user_mode (regs))return NOTIFY_DONE ;
arch/x86/xen/enlighten.c +17 -1
@@ -942,7 +942,16 @@ static void xen_write_cr4(unsigned long cr4)native_write_cr4 (cr4); } - +#ifdef CONFIG_X86_64 +static inline unsigned long xen_read_cr8 (void ) +{ +return 0 ; +} +static inline void xen_write_cr8 (unsigned long val) +{ +BUG_ON (val); +} +#endif static int xen_write_msr_safe (unsigned int msr,unsigned low,unsigned high) {int ret;
@@ -1111,6 +1120,11 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .read_cr4_safe = native_read_cr4_safe, .write_cr4 = xen_write_cr4, +#ifdef CONFIG_X86_64 + .read_cr8 = xen_read_cr8, + .write_cr8 = xen_write_cr8, +#endif + .wbinvd = native_wbinvd, .read_msr = native_read_msr_safe,
@@ -1121,6 +1135,8 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .read_tsc = native_read_tsc, .read_pmc = native_read_pmc, + .read_tscp = native_read_tscp, + .iret = xen_iret, .irq_enable_sysexit = xen_sysexit,#ifdef CONFIG_X86_64
block/blk-core.c +1 -1
@@ -601,7 +601,7 @@ blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, q->request_fn = rfn; q->prep_rq_fn =NULL ; q->unprep_rq_fn =NULL ; - q->queue_flags =QUEUE_FLAG_DEFAULT ; + q->queue_flags |=QUEUE_FLAG_DEFAULT ;/* Override internal queue lock with supplied lock pointer */ if (lock)
drivers/acpi/ec.c +25 -5
@@ -71,9 +71,6 @@ enum ec_command {#define ACPI_EC_UDELAY_GLK 1000/* Wait 1ms max. to get global lock */ #define ACPI_EC_MSI_UDELAY 550/* Wait 550us for MSI EC */ -#define ACPI_EC_STORM_THRESHOLD 8/* number of false interrupts -per one transaction */ -enum {EC_FLAGS_QUERY_PENDING ,/* Query is pending */ EC_FLAGS_GPE_STORM ,/* GPE storm detected */
@@ -87,6 +84,15 @@ static unsigned int ec_delay __read_mostly = ACPI_EC_DELAY;module_param (ec_delay, uint,0644 );MODULE_PARM_DESC (ec_delay,"Timeout(ms) waited until an EC command completes" ); +/* +* If the number of false interrupts per one transaction exceeds +* this threshold, will think there is a GPE storm happened and +* will disable the GPE for normal transaction. +*/ +static unsigned int ec_storm_threshold__read_mostly =8 ; +module_param (ec_storm_threshold, uint,0644 ); +MODULE_PARM_DESC (ec_storm_threshold,"Maxim false GPE numbers not considered as GPE storm" ); +/* If we find an EC via the ECDT, we need to keep a ptr to its context */ /* External interfaces use first EC only, so remember */ typedef int (*acpi_ec_query_func ) (void *data);
@@ -319,7 +325,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t)msleep (1 );/* It is safe to enable the GPE outside of the transaction. */ acpi_enable_gpe (NULL , ec->gpe); - }else if (t->irq_count >ACPI_EC_STORM_THRESHOLD ) { + }else if (t->irq_count > ec_storm_threshold) {pr_info (PREFIX "GPE storm detected, " "transactions will use polling mode\n" );set_bit (EC_FLAGS_GPE_STORM , &ec->flags);
@@ -924,6 +930,17 @@ static int ec_flag_msi(const struct dmi_system_id *id)return 0 ; } +/* +* Clevo M720 notebook actually works ok with IRQ mode, if we lifted +* the GPE storm threshold back to 20 +*/ +static int ec_enlarge_storm_threshold (const struct dmi_system_id *id) +{ +pr_debug ("Setting the EC GPE storm threshold to 20\n" ); + ec_storm_threshold =20 ; +return 0 ; +} +static struct dmi_system_id __initdata ec_dmi_table[] = { { ec_skip_dsdt_scan,"Compal JFL92" , {
@@ -955,10 +972,13 @@ static struct dmi_system_id __initdata ec_dmi_table[] = { { ec_validate_ecdt, "ASUS hardware", { DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc.") }, NULL}, + { + ec_enlarge_storm_threshold, "CLEVO hardware", { +DMI_MATCH (DMI_SYS_VENDOR ,"CLEVO Co." ), + DMI_MATCH(DMI_PRODUCT_NAME, "M720T/M730T"),}, NULL}, {}, }; -int __init acpi_ec_ecdt_probe (void ) {acpi_status status;
drivers/char/tpm/tpm.c +14 -7
@@ -1186,17 +1186,20 @@ ssize_t tpm_write(struct file *file, const char __user *buf, size_t size, loff_t *off) { struct tpm_chip *chip = file->private_data; -size_t in_size = size, out_size; +size_t in_size = size; +ssize_t out_size;/* cannot perform a write until the read has cleared -either via tpm_read or a user_read_timer timeout */ -while (atomic_read (&chip->data_pending) !=0 ) -msleep (TPM_TIMEOUT ); - -mutex_lock (&chip->buffer_mutex); +either via tpm_read or a user_read_timer timeout. +This also prevents splitted buffered writes from blocking here. +*/ +if (atomic_read (&chip->data_pending) !=0 ) +return -EBUSY ;if (in_size >TPM_BUFSIZE ) - in_size =TPM_BUFSIZE ; +return -E2BIG ; + +mutex_lock (&chip->buffer_mutex);if (copy_from_user (chip->data_buffer, (void __user *) buf, in_size)) {
@@ -1206,6 +1209,10 @@ ssize_t tpm_write(struct file *file, const char __user *buf,/* atomic tpm command send and result receive */ out_size =tpm_transmit (chip, chip->data_buffer,TPM_BUFSIZE ); +if (out_size <0 ) { +mutex_unlock (&chip->buffer_mutex); +return out_size; + }atomic_set (&chip->data_pending, out_size);mutex_unlock (&chip->buffer_mutex);
drivers/firewire/core-cdev.c +2 -2
@@ -471,8 +471,8 @@ static int ioctl_get_info(struct client *client, union ioctl_arg *arg) client->bus_reset_closure = a->bus_reset_closure;if (a->bus_reset !=0 ) {fill_bus_reset_event (&bus_reset, client); - ret =copy_to_user (u64_to_uptr (a->bus_reset), - &bus_reset,sizeof (bus_reset)); +/* unaligned size of bus_reset is 36 bytes */ + ret =copy_to_user (u64_to_uptr (a->bus_reset), &bus_reset,36 ); }if (ret ==0 &&list_empty (&client->link))list_add_tail (&client->link, &client->device->client_list);
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -5318,7 +5318,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,/* default to 8bpc */ pipeconf &= ~(PIPECONF_BPP_MASK |PIPECONF_DITHER_EN );if (is_dp) { -if (mode->private_flags &INTEL_MODE_DP_FORCE_6BPC ) { +if (adjusted_mode->private_flags &INTEL_MODE_DP_FORCE_6BPC ) { pipeconf |=PIPECONF_BPP_6 |PIPECONF_DITHER_EN |PIPECONF_DITHER_TYPE_SP ;
@@ -5782,7 +5782,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,/* determine panel color depth */ temp =I915_READ (PIPECONF (pipe)); temp &= ~PIPE_BPC_MASK ; - dither =intel_choose_pipe_bpp_dither (crtc, &pipe_bpp, mode); + dither =intel_choose_pipe_bpp_dither (crtc, &pipe_bpp, adjusted_mode);switch (pipe_bpp) {case 18 : temp |=PIPE_6BPC ;
drivers/gpu/drm/radeon/radeon_legacy_encoders.c +1 -5
@@ -973,11 +973,7 @@ static void radeon_legacy_tmds_ext_mode_set(struct drm_encoder *encoder,static void radeon_ext_tmds_enc_destroy (struct drm_encoder *encoder) {struct radeon_encoder *radeon_encoder =to_radeon_encoder (encoder); -struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; -if (tmds) { -if (tmds->i2c_bus) -radeon_i2c_destroy (tmds->i2c_bus); - } +/* don't destroy the i2c bus record here, this will be done in radeon_i2c_fini */ kfree (radeon_encoder->enc_priv);drm_encoder_cleanup (encoder);kfree (radeon_encoder);
drivers/md/raid10.c +1 -1
@@ -3019,7 +3019,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,else { bad_sectors -= (sector - first_bad);if (max_sync > bad_sectors) - max_sync = max_sync; + max_sync = bad_sectors;continue ; } }
drivers/net/ethernet/intel/e1000e/e1000.h +3 -3
@@ -175,13 +175,13 @@ struct e1000_info;/* * in the case of WTHRESH, it appears at least the 82571/2 hardware * writes back 4 descriptors when WTHRESH=5, and 3 descriptors when -* WTHRESH=4, and since we want 64 bytes at a time written back, set -* it to 5 +* WTHRESH=4, so a setting of 5 gives the most efficient bus +* utilization but to avoid possible Tx stalls, set it to 1 */ #define E1000_TXDCTL_DMA_BURST_ENABLE \ (E1000_TXDCTL_GRAN |/* set descriptor granularity */ \E1000_TXDCTL_COUNT_DESC | \ - (5 <<16 ) |/* wthresh must be +1 more than desired */ \ + (1 <<16 ) |/* wthresh must be +1 more than desired */ \ (1 <<8 ) |/* hthresh */ \ 0x1f) /* pthresh */
drivers/net/ethernet/intel/e1000e/netdev.c +1 -1
@@ -2806,7 +2806,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)* set up some performance related parameters to encourage the * hardware to use the bus more efficiently in bursts, depends * on the tx_int_delay to be enabled, -* wthresh = 5 ==> burst write a cacheline (64 bytes) at a time +* wthresh = 1 ==> burst write is disabled to avoid Tx stalls * hthresh = 1 ==> prefetch when one or more available * pthresh = 0x1f ==> prefetch if internal cache 31 or less * BEWARE: this seems to work but should be considered first if
drivers/net/wireless/ath/ath9k/beacon.c +1 -1
@@ -121,7 +121,7 @@ static void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)if (ath_tx_start (hw, skb, &txctl) !=0 ) {ath_dbg (common,XMIT ,"CABQ TX failed\n" ); -dev_kfree_skb_any (skb); +ieee80211_free_txskb (hw, skb); } }
drivers/net/wireless/ath/ath9k/main.c +1 -1
@@ -1147,7 +1147,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)return ; exit: -dev_kfree_skb_any (skb); +ieee80211_free_txskb (hw, skb); }static void ath9k_stop (struct ieee80211_hw *hw)
drivers/net/wireless/ath/ath9k/xmit.c +29 -24
116 lines not on this page · raw message
drivers/scsi/hpsa.c +34 -5
@@ -548,12 +548,42 @@ static void set_performant_mode(struct ctlr_info *h, struct CommandList *c) c->busaddr |=1 | (h->blockFetchTable[c->Header.SGList] <<1 ); } +static int is_firmware_flash_cmd (u8 *cdb) +{ +return cdb[0 ] ==BMIC_WRITE && cdb[6 ] ==BMIC_FLASH_FIRMWARE ; +} + +/* +* During firmware flash, the heartbeat register may not update as frequently +* as it should. So we dial down lockup detection during firmware flash. and +* dial it back up when firmware flash completes. +*/ +#define HEARTBEAT_SAMPLE_INTERVAL_DURING_FLASH (240 * HZ) +#define HEARTBEAT_SAMPLE_INTERVAL (30 * HZ) +static void dial_down_lockup_detection_during_fw_flash (struct ctlr_info *h, +struct CommandList *c) +{ +if (!is_firmware_flash_cmd (c->Request.CDB)) +return ; +atomic_inc (&h->firmware_flash_in_progress); + h->heartbeat_sample_interval =HEARTBEAT_SAMPLE_INTERVAL_DURING_FLASH ; +} + +static void dial_up_lockup_detection_on_fw_flash_complete (struct ctlr_info *h, +struct CommandList *c) +{ +if (is_firmware_flash_cmd (c->Request.CDB) && +atomic_dec_and_test (&h->firmware_flash_in_progress)) + h->heartbeat_sample_interval =HEARTBEAT_SAMPLE_INTERVAL ; +} +static void enqueue_cmd_and_start_io (struct ctlr_info *h,struct CommandList *c) {unsigned long flags;set_performant_mode (h, c); +dial_down_lockup_detection_during_fw_flash (h, c);spin_lock_irqsave (&h->lock, flags);addQ (&h->reqQ, c); h->Qdepth++;
@@ -3049,6 +3079,7 @@ static inline int bad_tag(struct ctlr_info *h, u32 tag_index,static inline void finish_cmd (struct CommandList *c,u32 raw_tag) {removeQ (c); +dial_up_lockup_detection_on_fw_flash_complete (c->h, c);if (likely (c->cmd_type ==CMD_SCSI ))complete_scsi_command (c);else if (c->cmd_type ==CMD_IOCTL_PEND )
@@ -4189,9 +4220,6 @@ static void controller_lockup_detected(struct ctlr_info *h)spin_unlock_irqrestore (&h->lock, flags); } -#define HEARTBEAT_SAMPLE_INTERVAL (10 * HZ) -#define HEARTBEAT_CHECK_MINIMUM_INTERVAL (HEARTBEAT_SAMPLE_INTERVAL / 2) -static void detect_controller_lockup (struct ctlr_info *h) {u64 now;
@@ -4202,7 +4230,7 @@ static void detect_controller_lockup(struct ctlr_info *h) now =get_jiffies_64 ();/* If we've received an interrupt recently, we're ok. */ if (time_after64 (h->last_intr_timestamp + - (HEARTBEAT_CHECK_MINIMUM_INTERVAL ), now)) + (h->heartbeat_sample_interval), now))return ;/*
@@ -4211,7 +4239,7 @@ static void detect_controller_lockup(struct ctlr_info *h)* otherwise don't care about signals in this thread. */ if (time_after64 (h->last_heartbeat_timestamp + - (HEARTBEAT_CHECK_MINIMUM_INTERVAL ), now)) + (h->heartbeat_sample_interval), now))return ;/* If heartbeat has not changed since we last looked, we're not ok. */
@@ -4253,6 +4281,7 @@ static void add_ctlr_to_lockup_detector_list(struct ctlr_info *h) {unsigned long flags; + h->heartbeat_sample_interval =HEARTBEAT_SAMPLE_INTERVAL ;spin_lock_irqsave (&lockup_detector_lock, flags);list_add_tail (&h->lockup_list, &hpsa_ctlr_list);spin_unlock_irqrestore (&lockup_detector_lock, flags);
drivers/scsi/hpsa.h +2 -0
@@ -123,6 +123,8 @@ struct ctlr_info {u64 last_intr_timestamp;u32 last_heartbeat;u64 last_heartbeat_timestamp; +u32 heartbeat_sample_interval; +atomic_t firmware_flash_in_progress;u32 lockup_detected;struct list_head lockup_list; };
drivers/scsi/hpsa_cmd.h +1 -0
@@ -162,6 +162,7 @@ struct SenseSubsystem_info {#define BMIC_WRITE 0x27#define BMIC_CACHE_FLUSH 0xc2#define HPSA_CACHE_FLUSH 0x01/* C2 was already being used by HPSA */ +#define BMIC_FLASH_FIRMWARE 0xF7/* Command List Structure */ union SCSI3Addr {
drivers/scsi/scsi_debug.c +1 -1
@@ -2054,7 +2054,7 @@ static void unmap_region(sector_t lba, unsigned int len) block = lba + alignment; rem =do_div (block, granularity); -if (rem ==0 && lba + granularity <= end && block < map_size) { +if (rem ==0 && lba + granularity < end && block < map_size) {clear_bit (block, map_storep);if (scsi_debug_lbprz) memset(fake_storep +
drivers/scsi/storvsc_drv.c +5 -0
@@ -1211,7 +1211,12 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)/* * At this point, all outstanding requests in the adapter * should have been flushed out and return to us +* There is a potential race here where the host may be in +* the process of responding when we return from here. +* Just wait for all in-transit packets to be accounted for +* before we return from here. */ +storvsc_wait_to_drain (stor_device);return SUCCESS ; }
drivers/target/iscsi/iscsi_target.c +1 -1
@@ -3196,7 +3196,6 @@ static int iscsit_build_sendtargets_response(struct iscsi_cmd *cmd) len +=1 ;if ((len + payload_len) > buffer_len) { -spin_unlock (&tiqn->tiqn_tpg_lock); end_of_buf =1 ; goto eob; }
@@ -3349,6 +3348,7 @@ static int iscsit_send_reject( hdr->opcode =ISCSI_OP_REJECT ; hdr->flags |=ISCSI_FLAG_CMD_FINAL ;hton24 (hdr->dlength,ISCSI_HDR_LEN ); + hdr->ffffffff =0xffffffff ; cmd->stat_sn = conn->stat_sn++; hdr->statsn =cpu_to_be32 (cmd->stat_sn); hdr->exp_cmdsn =cpu_to_be32 (conn->sess->exp_cmd_sn);
drivers/target/iscsi/iscsi_target_core.h +2 -2
@@ -25,10 +25,10 @@#define NA_DATAOUT_TIMEOUT_RETRIES 5#define NA_DATAOUT_TIMEOUT_RETRIES_MAX 15#define NA_DATAOUT_TIMEOUT_RETRIES_MIN 1 -#define NA_NOPIN_TIMEOUT 5 +#define NA_NOPIN_TIMEOUT 15#define NA_NOPIN_TIMEOUT_MAX 60#define NA_NOPIN_TIMEOUT_MIN 3 -#define NA_NOPIN_RESPONSE_TIMEOUT 5 +#define NA_NOPIN_RESPONSE_TIMEOUT 30#define NA_NOPIN_RESPONSE_TIMEOUT_MAX 60#define NA_NOPIN_RESPONSE_TIMEOUT_MIN 3#define NA_RANDOM_DATAIN_PDU_OFFSETS 0
drivers/target/iscsi/iscsi_target_tpg.c +12 -0
@@ -672,6 +672,12 @@ int iscsit_ta_generate_node_acls(pr_debug ("iSCSI_TPG[%hu] - Generate Initiator Portal Group ACLs: %s\n" , tpg->tpgt, (a->generate_node_acls) ?"Enabled" :"Disabled" ); +if (flag ==1 && a->cache_dynamic_acls ==0 ) { +pr_debug ("Explicitly setting cache_dynamic_acls=1 when " +"generate_node_acls=1\n" ); + a->cache_dynamic_acls =1 ; + } +return 0 ; }
@@ -711,6 +717,12 @@ int iscsit_ta_cache_dynamic_acls(return -EINVAL ; } +if (a->generate_node_acls ==1 && flag ==0 ) { +pr_debug ("Skipping cache_dynamic_acls=0 when" +" generate_node_acls=1\n" ); +return 0 ; + } + a->cache_dynamic_acls = flag; pr_debug("iSCSI_TPG[%hu] - Cache Dynamic Initiator Portal Group" " ACLs %s\n", tpg->tpgt, (a->cache_dynamic_acls) ?
drivers/target/target_core_configfs.c +7 -1
@@ -3115,6 +3115,7 @@ static int __init target_core_init_configfs(void) GFP_KERNEL);if (!target_cg->default_groups) {pr_err ("Unable to allocate target_cg->default_groups\n" ); + ret = -ENOMEM ; goto out_global; }
@@ -3130,6 +3131,7 @@ static int __init target_core_init_configfs(void) GFP_KERNEL);if (!hba_cg->default_groups) {pr_err ("Unable to allocate hba_cg->default_groups\n" ); + ret = -ENOMEM ; goto out_global; } config_group_init_type_name(&alua_group,
@@ -3145,6 +3147,7 @@ static int __init target_core_init_configfs(void) GFP_KERNEL);if (!alua_cg->default_groups) {pr_err ("Unable to allocate alua_cg->default_groups\n" ); + ret = -ENOMEM ; goto out_global; }
@@ -3156,14 +3159,17 @@ static int __init target_core_init_configfs(void)* Add core/alua/lu_gps/default_lu_gp */ lu_gp =core_alua_allocate_lu_gp ("default_lu_gp" ,1 ); -if (IS_ERR (lu_gp)) +if (IS_ERR (lu_gp)) { + ret = -ENOMEM ; goto out_global; + } lu_gp_cg = &alua_lu_gps_group; lu_gp_cg->default_groups =kzalloc (sizeof (struct config_group ) *2 ,GFP_KERNEL );if (!lu_gp_cg->default_groups) {pr_err ("Unable to allocate lu_gp_cg->default_groups\n" ); + ret = -ENOMEM ; goto out_global; }
drivers/tty/vt/vt.c +13 -0
@@ -3475,6 +3475,19 @@ int con_debug_enter(struct vc_data *vc) kdb_set(2, setargs); } } +if (vc->vc_cols <999 ) { +int colcount; +char cols[4 ]; +const char *setargs[3 ] = { +"set" , +"COLUMNS" , + cols, + }; +if (kdbgetintenv (setargs[0 ], &colcount)) { +snprintf (cols,4 ,"%i" , vc->vc_cols); +kdb_set (2 , setargs); + } + }#endif /* CONFIG_KGDB_KDB */ return ret; }
drivers/usb/class/cdc-acm.c +3 -0
@@ -1551,6 +1551,9 @@ static const struct usb_device_id acm_ids[] = {Maybe we should define a new quirk for this. */ }, + { USB_DEVICE(0x0572, 0x1340), /* Conexant CX93010-2x UCMxx */ + .driver_info =NO_UNION_NORMAL , + }, { USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */ .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ },
drivers/usb/gadget/at91_udc.c +1 -1
@@ -1735,7 +1735,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)int retval;struct resource *res; -if (!dev->platform_data) { +if (!dev->platform_data && !pdev->dev.of_node) {/* small (so we copy it) but critical! */ DBG ("missing platform_data\n" );return -ENODEV ;
drivers/video/udlfb.c +1 -1
@@ -647,7 +647,7 @@ static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf, result =fb_sys_write (info, buf, count, ppos);if (result >0 ) { -int start =max ((int )(offset / info->fix.line_length) -1 ,0 ); +int start =max ((int )(offset / info->fix.line_length),0 );int lines =min ((u32)((result / info->fix.line_length) +1 ), (u32 )info->var.yres);
drivers/video/via/via_clock.c +19 -0
@@ -25,6 +25,7 @@#include <linux/kernel.h> #include <linux/via-core.h> +#include <asm/olpc.h> #include "via_clock.h" #include "global.h" #include "debug.h"
@@ -289,6 +290,10 @@ static void dummy_set_pll(struct via_pll_config config)printk (KERN_INFO "Using undocumented set PLL.\n%s" , via_slap); } +static void noop_set_clock_state (u8 state) +{ +} +void via_clock_init (struct via_clock *clock,int gfx_chip) {switch (gfx_chip) {
@@ -346,4 +351,18 @@ void via_clock_init(struct via_clock *clock, int gfx_chip)break ; } + +if (machine_is_olpc ()) { +/* The OLPC XO-1.5 cannot suspend/resume reliably if the +* IGA1/IGA2 clocks are set as on or off (memory rot +* occasionally happens during suspend under such +* configurations). +* +* The only known stable scenario is to leave this bits as-is, +* which in their default states are documented to enable the +* clock only when it is needed. +*/ + clock->set_primary_clock_state = noop_set_clock_state; + clock->set_secondary_clock_state = noop_set_clock_state; + } }
fs/autofs4/root.c +4 -2
@@ -392,10 +392,12 @@ static struct vfsmount *autofs4_d_automount(struct path *path) ino->flags |=AUTOFS_INF_PENDING ;spin_unlock (&sbi->fs_lock); status =autofs4_mount_wait (dentry); -if (status) -return ERR_PTR (status);spin_lock (&sbi->fs_lock); ino->flags &= ~AUTOFS_INF_PENDING ; +if (status) { +spin_unlock (&sbi->fs_lock); +return ERR_PTR (status); + } } done:if (!(ino->flags &AUTOFS_INF_EXPIRING )) {
fs/ceph/export.c +14 -4
@@ -89,7 +89,7 @@ static int ceph_encode_fh(struct dentry *dentry, u32 *rawfh, int *max_len,* FIXME: we should try harder by querying the mds for the ino. */ static struct dentry *__fh_to_dentry (struct super_block *sb, -struct ceph_nfs_fh *fh) +struct ceph_nfs_fh *fh,int fh_len) {struct ceph_mds_client *mdsc =ceph_sb_to_client (sb)->mdsc;struct inode *inode;
@@ -97,6 +97,9 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,struct ceph_vino vino;int err; +if (fh_len <sizeof (*fh) /4 ) +return ERR_PTR (-ESTALE ); +dout ("__fh_to_dentry %llx\n" , fh->ino); vino.ino = fh->ino; vino.snap =CEPH_NOSNAP ;
@@ -140,7 +143,7 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,* convert connectable fh to dentry */ static struct dentry *__cfh_to_dentry (struct super_block *sb, -struct ceph_nfs_confh *cfh) +struct ceph_nfs_confh *cfh,int fh_len) {struct ceph_mds_client *mdsc =ceph_sb_to_client (sb)->mdsc;struct inode *inode;
@@ -148,6 +151,9 @@ static struct dentry *__cfh_to_dentry(struct super_block *sb,struct ceph_vino vino;int err; +if (fh_len <sizeof (*cfh) /4 ) +return ERR_PTR (-ESTALE ); +dout ("__cfh_to_dentry %llx (%llx/%x)\n" , cfh->ino, cfh->parent_ino, cfh->parent_name_hash);
@@ -197,9 +203,11 @@ static struct dentry *ceph_fh_to_dentry(struct super_block *sb, struct fid *fid, int fh_len, int fh_type) {if (fh_type ==1 ) -return __fh_to_dentry (sb, (struct ceph_nfs_fh *)fid->raw); +return __fh_to_dentry (sb, (struct ceph_nfs_fh *)fid->raw, + fh_len);else -return __cfh_to_dentry (sb, (struct ceph_nfs_confh *)fid->raw); +return __cfh_to_dentry (sb, (struct ceph_nfs_confh *)fid->raw, + fh_len); }/*
@@ -220,6 +228,8 @@ static struct dentry *ceph_fh_to_parent(struct super_block *sb,if (fh_type ==1 )return ERR_PTR (-ESTALE ); +if (fh_len <sizeof (*cfh) /4 ) +return ERR_PTR (-ESTALE );pr_debug ("fh_to_parent %llx/%d\n" , cfh->parent_ino, cfh->parent_name_hash);
fs/ecryptfs/ecryptfs_kernel.h +2 -0
@@ -568,6 +568,8 @@ struct ecryptfs_open_req {struct inode *ecryptfs_get_inode (struct inode *lower_inode,struct super_block *sb);void ecryptfs_i_size_init (const char *page_virt,struct inode *inode); +int ecryptfs_initialize_file (struct dentry *ecryptfs_dentry, +struct inode *ecryptfs_inode); int ecryptfs_decode_and_decrypt_filename(char **decrypted_name, size_t *decrypted_name_size, struct dentry *ecryptfs_dentry,
fs/ecryptfs/file.c +48 -52
139 lines not on this page · raw message
fs/ecryptfs/inode.c +34 -31
102 lines not on this page · raw message
fs/ecryptfs/main.c +1 -0
@@ -162,6 +162,7 @@ void ecryptfs_put_lower_file(struct inode *inode) inode_info =ecryptfs_inode_to_private (inode);if (atomic_dec_and_mutex_lock (&inode_info->lower_file_count, &inode_info->lower_file_mutex)) { +filemap_write_and_wait (inode->i_mapping);fput (inode_info->lower_file); inode_info->lower_file =NULL ;mutex_unlock (&inode_info->lower_file_mutex);
fs/ecryptfs/mmap.c +13 -26
@@ -66,18 +66,6 @@ static int ecryptfs_writepage(struct page *page, struct writeback_control *wbc) {int rc; -/* -* Refuse to write the page out if we are called from reclaim context -* since our writepage() path may potentially allocate memory when -* calling into the lower fs vfs_write() which may in turn invoke -* us again. -*/ -if (current->flags &PF_MEMALLOC ) { -redirty_page_for_writepage (wbc, page); - rc =0 ; - goto out; - } - rc =ecryptfs_encrypt_page (page);if (rc) { ecryptfs_printk(KERN_WARNING, "Error encrypting "
@@ -498,7 +486,6 @@ static int ecryptfs_write_end(struct file *file,struct ecryptfs_crypt_stat *crypt_stat = &ecryptfs_inode_to_private (ecryptfs_inode)->crypt_stat;int rc; -int need_unlock_page =1 ;ecryptfs_printk (KERN_DEBUG ,"Calling fill_zeros_to_end_of_page" "(page w/ index = [0x%.16lx], to = [%d])\n" , index, to);
@@ -519,26 +506,26 @@ static int ecryptfs_write_end(struct file *file, "zeros in page with index = [0x%.16lx]\n", index); goto out; } -set_page_dirty (page); -unlock_page (page); - need_unlock_page =0 ; + rc =ecryptfs_encrypt_page (page); +if (rc) { +ecryptfs_printk (KERN_WARNING ,"Error encrypting page (upper " +"index [0x%.16lx])\n" , index); + goto out; + }if (pos + copied >i_size_read (ecryptfs_inode)) {i_size_write (ecryptfs_inode, pos + copied);ecryptfs_printk (KERN_DEBUG ,"Expanded file size to " "[0x%.16llx]\n" , (unsigned long long )i_size_read (ecryptfs_inode)); -balance_dirty_pages_ratelimited (mapping); - rc =ecryptfs_write_inode_size_to_metadata (ecryptfs_inode); -if (rc) { -printk (KERN_ERR "Error writing inode size to metadata; " -"rc = [%d]\n" , rc); - goto out; - } } - rc = copied; + rc =ecryptfs_write_inode_size_to_metadata (ecryptfs_inode); +if (rc) +printk (KERN_ERR "Error writing inode size to metadata; " +"rc = [%d]\n" , rc); +else + rc = copied; out: -if (need_unlock_page) -unlock_page (page); +unlock_page (page);page_cache_release (page);return rc; }
fs/gfs2/export.c +4 -0
@@ -168,6 +168,8 @@ static struct dentry *gfs2_fh_to_dentry(struct super_block *sb, struct fid *fid,case GFS2_SMALL_FH_SIZE :case GFS2_LARGE_FH_SIZE :case GFS2_OLD_FH_SIZE : +if (fh_len <GFS2_SMALL_FH_SIZE ) +return NULL ; this.no_formal_ino = ((u64 )be32_to_cpu (fh[0 ])) <<32 ; this.no_formal_ino |=be32_to_cpu (fh[1 ]); this.no_addr = ((u64 )be32_to_cpu (fh[2 ])) <<32 ;
@@ -187,6 +189,8 @@ static struct dentry *gfs2_fh_to_parent(struct super_block *sb, struct fid *fid,switch (fh_type) {case GFS2_LARGE_FH_SIZE :case GFS2_OLD_FH_SIZE : +if (fh_len <GFS2_LARGE_FH_SIZE ) +return NULL ; parent.no_formal_ino = ((u64 )be32_to_cpu (fh[4 ])) <<32 ; parent.no_formal_ino |=be32_to_cpu (fh[5 ]); parent.no_addr = ((u64 )be32_to_cpu (fh[6 ])) <<32 ;
fs/isofs/export.c +1 -1
@@ -179,7 +179,7 @@ static struct dentry *isofs_fh_to_parent(struct super_block *sb, {struct isofs_fid *ifid = (struct isofs_fid *)fid; -if (fh_type !=2 ) +if (fh_len <2 || fh_type !=2 )return NULL ; return isofs_export_iget(sb,
fs/jbd/commit.c +34 -11
58 lines not on this page · raw message
fs/jbd/transaction.c +44 -20
118 lines not on this page · raw message
fs/lockd/mon.c +3 -1
@@ -40,6 +40,7 @@ struct nsm_args {u32 proc;char *mon_name; +char *nodename; };struct nsm_res {
@@ -94,6 +95,7 @@ static int nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res, .vers = 3, .proc = NLMPROC_NSM_NOTIFY, .mon_name = nsm->sm_mon_name, + .nodename = utsname()->nodename, };struct rpc_message msg = { .rpc_argp = &args,
@@ -430,7 +432,7 @@ static void encode_my_id(struct xdr_stream *xdr, const struct nsm_args *argp) {__be32 *p; -encode_nsm_string (xdr,utsname ()->nodename); +encode_nsm_string (xdr, argp->nodename); p =xdr_reserve_space (xdr,4 +4 +4 ); *p++ =cpu_to_be32 (argp->prog); *p++ =cpu_to_be32 (argp->vers);
fs/nfsd/nfs4idmap.c +1 -1
@@ -581,7 +581,7 @@ numeric_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namel/* Just to make sure it's null-terminated: */ memcpy (buf, name, namelen); buf[namelen] ='\0' ; - ret =kstrtouint (name,10 , id); + ret =kstrtouint (buf,10 , id);return ret ==0 ; }
fs/nfsd/nfs4state.c +1 -0
@@ -3783,6 +3783,7 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,memcpy (&close->cl_stateid, &stp->st_stid.sc_stateid,sizeof (stateid_t));nfsd4_close_open_stateid (stp); +release_last_closed_stateid (oo); oo->oo_last_closed_stid = stp;/* place unused nfs4_stateowners on so_close_lru list to be
fs/reiserfs/inode.c +5 -1
@@ -1573,8 +1573,10 @@ struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid,reiserfs_warning (sb,"reiserfs-13077" ,"nfsd/reiserfs, fhtype=%d, len=%d - odd" , fh_type, fh_len); - fh_type =5 ; + fh_type = fh_len; } +if (fh_len <2 ) +return NULL ;return reiserfs_get_dentry (sb, fid->raw[0 ], fid->raw[1 ], (fh_type ==3 || fh_type >=5 ) ? fid->raw[2 ] :0 );
@@ -1583,6 +1585,8 @@ struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid,struct dentry *reiserfs_fh_to_parent (struct super_block *sb,struct fid *fid,int fh_len,int fh_type) { +if (fh_type > fh_len) + fh_type = fh_len;if (fh_type <4 )return NULL ;
fs/xfs/xfs_export.c +3 -0
@@ -195,6 +195,9 @@ xfs_fs_fh_to_parent(struct super_block *sb, struct fid *fid,struct xfs_fid64 *fid64 = (struct xfs_fid64 *)fid;struct inode *inode =NULL ; +if (fh_len <xfs_fileid_length (fileid_type)) +return NULL ; +switch (fileid_type) {case FILEID_INO32_GEN_PARENT : inode = xfs_nfs_get_inode(sb, fid->i32.parent_ino,
include/linux/netfilter/ipset/ip_set_timeout.h +4 -0
@@ -30,6 +30,10 @@ ip_set_timeout_uget(struct nlattr *tb) {unsigned int timeout =ip_set_get_h32 (tb); +/* Normalize to fit into jiffies */ +if (timeout >UINT_MAX /MSEC_PER_SEC ) + timeout =UINT_MAX /MSEC_PER_SEC ; +/* Userspace supplied TIMEOUT parameter: adjust crazy size */ return timeout ==IPSET_NO_TIMEOUT ?IPSET_NO_TIMEOUT -1 : timeout; }
include/net/ip_vs.h +1 -1
@@ -1356,7 +1356,7 @@ static inline void ip_vs_notrack(struct sk_buff *skb)struct nf_conn *ct =nf_ct_get (skb, &ctinfo);if (!ct || !nf_ct_is_untracked (ct)) { -nf_reset (skb); +nf_conntrack_put (skb->nfct); skb->nfct = &nf_ct_untracked_get ()->ct_general; skb->nfctinfo =IP_CT_NEW ;nf_conntrack_get (skb->nfct);
include/net/netfilter/nf_conntrack_ecache.h +1 -0
@@ -18,6 +18,7 @@ struct nf_conntrack_ecache {u16 ctmask;/* bitmask of ct events to be delivered */ u16 expmask;/* bitmask of expect events to be delivered */ u32 pid;/* netlink pid of destroyer */ +struct timer_list timeout; }; static inline struct nf_conntrack_ecache *
kernel/debug/kdb/kdb_io.c +28 -5
@@ -552,6 +552,7 @@ int vkdb_printf(const char *fmt, va_list ap) {int diag;int linecount; +int colcount;int logging, saved_loglevel =0 ;int saved_trap_printk;int got_printf_lock =0 ;
@@ -584,6 +585,10 @@ int vkdb_printf(const char *fmt, va_list ap)if (diag || linecount <=1 ) linecount =24 ; + diag =kdbgetintenv ("COLUMNS" , &colcount); +if (diag || colcount <=1 ) + colcount =80 ; + diag =kdbgetintenv ("LOGGING" , &logging);if (diag) logging =0 ;
@@ -690,7 +695,7 @@ kdb_printit:gdbstub_msg_write (kdb_buffer, retlen); }else {if (dbg_io_ops && !dbg_io_ops->is_console) { - len =strlen (kdb_buffer); + len = retlen; cp = kdb_buffer;while (len--) { dbg_io_ops->write_char (*cp);
@@ -709,11 +714,29 @@ kdb_printit:printk (KERN_INFO "%s" , kdb_buffer); } -if (KDB_STATE (PAGER ) &&strchr (kdb_buffer,'\n' )) - kdb_nextline++; +if (KDB_STATE (PAGER )) { +/* +* Check printed string to decide how to bump the +* kdb_nextline to control when the more prompt should +* show up. +*/ +int got =0 ; + len = retlen; +while (len--) { +if (kdb_buffer[len] =='\n' ) { + kdb_nextline++; + got =0 ; + }else if (kdb_buffer[len] =='\r' ) { + got =0 ; + }else { + got++; + } + } + kdb_nextline += got / (colcount +1 ); + }/* check for having reached the LINES number of printed lines */ -if (kdb_nextline == linecount) { +if (kdb_nextline >= linecount) {char buf1[16 ] ="" ;#if defined(CONFIG_SMP )char buf2[32 ];
@@ -776,7 +799,7 @@ kdb_printit: kdb_grepping_flag =0 ;kdb_printf ("\n" ); }else if (buf1[0 ] ==' ' ) { -kdb_printf ("\n" ); +kdb_printf ("\r" ); suspend_grep =1 ;/* for this recursion */ }else if (buf1[0 ] =='\n' ) { kdb_nextline = linecount -1 ;
kernel/module.c +4 -0
@@ -2729,6 +2729,10 @@ static int check_module_license_and_versions(struct module *mod)if (strcmp (mod->name,"driverloader" ) ==0 )add_taint_module (mod,TAINT_PROPRIETARY_MODULE ); +/* lve claims to be GPL but upstream won't provide source */ +if (strcmp (mod->name,"lve" ) ==0 ) +add_taint_module (mod,TAINT_PROPRIETARY_MODULE ); +#ifdef CONFIG_MODVERSIONS if ((mod->num_syms && !mod->crcs) || (mod->num_gpl_syms && !mod->gpl_crcs)
kernel/timer.c +6 -4
@@ -63,6 +63,7 @@ EXPORT_SYMBOL(jiffies_64);#define TVR_SIZE (1 << TVR_BITS)#define TVN_MASK (TVN_SIZE - 1)#define TVR_MASK (TVR_SIZE - 1) +#define MAX_TVAL ((unsigned long)((1ULL << (TVR_BITS + 4*TVN_BITS)) - 1))struct tvec {struct list_head vec[TVN_SIZE ];
@@ -356,11 +357,12 @@ static void internal_add_timer(struct tvec_base *base, struct timer_list *timer) vec = base->tv1.vec + (base->timer_jiffies &TVR_MASK ); }else {int i; -/* If the timeout is larger than 0xffffffff on 64-bit -* architectures then we use the maximum timeout: +/* If the timeout is larger than MAX_TVAL (on 64-bit +* architectures or with CONFIG_BASE_SMALL=1) then we +* use the maximum timeout. */ -if (idx >0xffffffffUL ) { - idx =0xffffffffUL ; +if (idx >MAX_TVAL ) { + idx =MAX_TVAL ; expires = idx + base->timer_jiffies; } i = (expires >> (TVR_BITS +3 *TVN_BITS )) &TVN_MASK ;
mm/shmem.c +4 -2
@@ -2018,12 +2018,14 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb, {struct inode *inode;struct dentry *dentry =NULL ; -u64 inum = fid->raw[2 ]; - inum = (inum <<32 ) | fid->raw[1 ]; +u64 inum;if (fh_len <3 )return NULL ; + inum = fid->raw[2 ]; + inum = (inum <<32 ) | fid->raw[1 ]; + inode =ilookup5 (sb, (unsigned long )(inum + fid->raw[0 ]), shmem_match, fid->raw);if (inode) {
net/core/pktgen.c +1 -1
@@ -2932,7 +2932,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,sizeof (struct ipv6hdr ) -sizeof (struct udphdr ) - pkt_dev->pkt_overhead; -if (datalen <sizeof (struct pktgen_hdr )) { +if (datalen <0 || datalen <sizeof (struct pktgen_hdr )) { datalen =sizeof (struct pktgen_hdr );if (net_ratelimit ())pr_info ("increased datalen to %d\n" , datalen);
net/ipv4/netfilter/nf_nat_sip.c +7 -3
@@ -148,7 +148,7 @@ static unsigned int ip_nat_sip(struct sk_buff *skb, unsigned int dataoff,if (ct_sip_parse_header_uri (ct, *dptr,NULL , *datalen, hdr,NULL , &matchoff, &matchlen, &addr, &port) >0 ) { -unsigned int matchend, poff, plen, buflen, n; +unsigned int olen, matchend, poff, plen, buflen, n;char buffer[sizeof ("nnn.nnn.nnn.nnn:nnnnn" )];/* We're only interested in headers related to this
@@ -163,11 +163,12 @@ static unsigned int ip_nat_sip(struct sk_buff *skb, unsigned int dataoff, goto next; } + olen = *datalen;if (!map_addr (skb, dataoff, dptr, datalen, matchoff, matchlen, &addr, port))return NF_DROP ; - matchend = matchoff + matchlen; + matchend = matchoff + matchlen + *datalen - olen;/* The maddr= parameter (RFC 2361) specifies where to send * the reply. */
@@ -501,7 +502,10 @@ static unsigned int ip_nat_sdp_media(struct sk_buff *skb, unsigned int dataoff, ret =nf_ct_expect_related (rtcp_exp);if (ret ==0 )break ; -else if (ret != -EBUSY ) { +else if (ret == -EBUSY ) { +nf_ct_unexpect_related (rtp_exp); +continue ; + }else if (ret <0 ) {nf_ct_unexpect_related (rtp_exp); port =0 ;break ;
net/netfilter/ipvs/ip_vs_ctl.c +3 -2
@@ -1521,11 +1521,12 @@ static int ip_vs_dst_event(struct notifier_block *this, unsigned long event, {struct net_device *dev = ptr;struct net *net =dev_net (dev); +struct netns_ipvs *ipvs =net_ipvs (net);struct ip_vs_service *svc;struct ip_vs_dest *dest;unsigned int idx; -if (event !=NETDEV_UNREGISTER ) +if (event !=NETDEV_UNREGISTER || !ipvs)return NOTIFY_DONE ;IP_VS_DBG (3 ,"%s() dev=%s\n" , __func__, dev->name);EnterFunction (2 );
@@ -1551,7 +1552,7 @@ static int ip_vs_dst_event(struct notifier_block *this, unsigned long event, } } -list_for_each_entry (dest, &net_ipvs (net)->dest_trash, n_list) { +list_for_each_entry (dest, &ipvs->dest_trash, n_list) {__ip_vs_dev_reset (dest, dev); }mutex_unlock (&__ip_vs_mutex);
net/netfilter/nf_conntrack_core.c +11 -5
@@ -249,12 +249,15 @@ static void death_by_event(unsigned long ul_conntrack) {struct nf_conn *ct = (void *)ul_conntrack;struct net *net =nf_ct_net (ct); +struct nf_conntrack_ecache *ecache =nf_ct_ecache_find (ct); + +BUG_ON (ecache ==NULL );if (nf_conntrack_event (IPCT_DESTROY , ct) <0 ) {/* bad luck, let's retry again */ - ct->timeout.expires = jiffies + + ecache->timeout.expires = jiffies + (random32 () % net->ct.sysctl_events_retry_timeout); -add_timer (&ct->timeout); +add_timer (&ecache->timeout);return ; }/* we've got the event delivered, now it's dying */
@@ -268,6 +271,9 @@ static void death_by_event(unsigned long ul_conntrack)void nf_ct_insert_dying_list (struct nf_conn *ct) {struct net *net =nf_ct_net (ct); +struct nf_conntrack_ecache *ecache =nf_ct_ecache_find (ct); + +BUG_ON (ecache ==NULL );/* add this conntrack to the dying list */ spin_lock_bh (&nf_conntrack_lock);
@@ -275,10 +281,10 @@ void nf_ct_insert_dying_list(struct nf_conn *ct) &net->ct.dying);spin_unlock_bh (&nf_conntrack_lock);/* set a new timer to retry event delivery */ -setup_timer (&ct->timeout, death_by_event, (unsigned long )ct); - ct->timeout.expires = jiffies + +setup_timer (&ecache->timeout, death_by_event, (unsigned long )ct); + ecache->timeout.expires = jiffies + (random32 () % net->ct.sysctl_events_retry_timeout); -add_timer (&ct->timeout); +add_timer (&ecache->timeout); }EXPORT_SYMBOL_GPL (nf_ct_insert_dying_list);
net/netfilter/nf_conntrack_expect.c +6 -23
@@ -361,23 +361,6 @@ static void evict_oldest_expect(struct nf_conn *master, } } -static inline int refresh_timer (struct nf_conntrack_expect *i) -{ -struct nf_conn_help *master_help =nfct_help (i->master); -const struct nf_conntrack_expect_policy *p; - -if (!del_timer (&i->timeout)) -return 0 ; - - p = &rcu_dereference_protected ( - master_help->helper, -lockdep_is_held (&nf_conntrack_lock) - )->expect_policy[i->class]; - i->timeout.expires = jiffies + p->timeout *HZ ; -add_timer (&i->timeout); -return 1 ; -} -static inline int __nf_ct_expect_check (struct nf_conntrack_expect *expect) {const struct nf_conntrack_expect_policy *p;
@@ -386,7 +369,7 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect)struct nf_conn_help *master_help =nfct_help (master);struct nf_conntrack_helper *helper;struct net *net =nf_ct_exp_net (expect); -struct hlist_node *n; +struct hlist_node *n, *next;unsigned int h;int ret =1 ;
@@ -395,12 +378,12 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect) goto out; } h =nf_ct_expect_dst_hash (&expect->tuple); -hlist_for_each_entry (i, n, &net->ct.expect_hash[h], hnode) { +hlist_for_each_entry_safe (i, n, next, &net->ct.expect_hash[h], hnode) {if (expect_matches (i, expect)) { -/* Refresh timer: if it's dying, ignore.. */ -if (refresh_timer (i)) { - ret =0 ; - goto out; +if (del_timer (&i->timeout)) { +nf_ct_unlink_expect (i); +nf_ct_expect_put (i); +break ; } }else if (expect_clash (i, expect)) { ret = -EBUSY ;
net/netfilter/xt_hashlimit.c +3 -5
@@ -389,8 +389,7 @@ static void htable_put(struct xt_hashlimit_htable *hinfo)#define CREDITS_PER_JIFFY POW2_BELOW32(MAX_CPJ)/* Precision saver. */ -static inline u_int32_t -user2credits (u_int32_t user) +static u32 user2credits (u32 user) {/* If multiplying would overflow... */ if (user >0xFFFFFFFF / (HZ *CREDITS_PER_JIFFY ))
@@ -400,7 +399,7 @@ user2credits(u_int32_t user)return (user *HZ *CREDITS_PER_JIFFY ) /XT_HASHLIMIT_SCALE ; } -static inline void rateinfo_recalc (struct dsthash_ent *dh,unsigned long now) +static void rateinfo_recalc (struct dsthash_ent *dh,unsigned long now) { dh->rateinfo.credit += (now - dh->rateinfo.prev) *CREDITS_PER_JIFFY ;if (dh->rateinfo.credit > dh->rateinfo.credit_cap)
@@ -535,8 +534,7 @@ hashlimit_mt(const struct sk_buff *skb, struct xt_action_param *par) dh->rateinfo.prev = jiffies; dh->rateinfo.credit =user2credits (hinfo->cfg.avg * hinfo->cfg.burst); - dh->rateinfo.credit_cap =user2credits (hinfo->cfg.avg * - hinfo->cfg.burst); + dh->rateinfo.credit_cap = dh->rateinfo.credit; dh->rateinfo.cost =user2credits (hinfo->cfg.avg); }else {/* update expiration timeout */
net/netfilter/xt_limit.c +6 -7
@@ -88,8 +88,7 @@ limit_mt(const struct sk_buff *skb, struct xt_action_param *par) }/* Precision saver. */ -static u_int32_t -user2credits (u_int32_t user) +static u32 user2credits (u32 user) {/* If multiplying would overflow... */ if (user >0xFFFFFFFF / (HZ *CREDITS_PER_JIFFY ))
@@ -118,12 +117,12 @@ static int limit_mt_check(const struct xt_mtchk_param *par)/* For SMP, we only want to use one set of state. */ r->master = priv; +/* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies * +128. */ + priv->prev = jiffies; + priv->credit =user2credits (r->avg * r->burst);/* Credits full. */ if (r->cost ==0 ) { -/* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies * -128. */ - priv->prev = jiffies; - priv->credit =user2credits (r->avg * r->burst);/* Credits full. */ - r->credit_cap =user2credits (r->avg * r->burst);/* Credits full. */ + r->credit_cap = priv->credit;/* Credits full. */ r->cost =user2credits (r->avg); }return 0 ;
net/netfilter/xt_set.c +15 -2
@@ -16,6 +16,7 @@#include <linux/netfilter/x_tables.h> #include <linux/netfilter/xt_set.h> +#include <linux/netfilter/ipset/ip_set_timeout.h> MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -44,6 +45,14 @@ const struct ip_set_adt_opt n = { \ .cmdflags = cfs, \ .timeout = t, \ } +#define ADT_MOPT (n, f, d, fs, cfs, t) \ +struct ip_set_adt_opt n = { \ + .family = f, \ + .dim = d, \ + .flags = fs, \ + .cmdflags = cfs, \ + .timeout = t, \ +}/* Revision 0 interface: backward compatible with netfilter/iptables */
@@ -296,11 +305,15 @@ static unsigned int set_target_v2(struct sk_buff *skb, const struct xt_action_param *par) { const struct xt_set_info_target_v2 *info = par->targinfo; -ADT_OPT (add_opt, par->family, info->add_set.dim, - info->add_set.flags, info->flags, info->timeout); +ADT_MOPT (add_opt, par->family, info->add_set.dim, + info->add_set.flags, info->flags, info->timeout);ADT_OPT (del_opt, par->family, info->del_set.dim, info->del_set.flags,0 ,UINT_MAX ); +/* Normalize to fit into jiffies */ +if (add_opt.timeout !=IPSET_NO_TIMEOUT && + add_opt.timeout >UINT_MAX /MSEC_PER_SEC ) + add_opt.timeout =UINT_MAX /MSEC_PER_SEC ;if (info->add_set.index !=IPSET_INVALID_ID )ip_set_add (info->add_set.index, skb, par, &add_opt);if (info->del_set.index !=IPSET_INVALID_ID )
net/sunrpc/xprtsock.c +16 -5
@@ -1028,6 +1028,16 @@ static void xs_udp_data_ready(struct sock *sk, int len)read_unlock_bh (&sk->sk_callback_lock); } +/* +* Helper function to force a TCP close if the server is sending +* junk and/or it has put us in CLOSE_WAIT +*/ +static void xs_tcp_force_close (struct rpc_xprt *xprt) +{ +set_bit (XPRT_CONNECTION_CLOSE , &xprt->state); +xprt_force_disconnect (xprt); +} +static inline void xs_tcp_read_fraghdr (struct rpc_xprt *xprt,struct xdr_skb_reader *desc) { struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
@@ -1054,7 +1064,7 @@ static inline void xs_tcp_read_fraghdr(struct rpc_xprt *xprt, struct xdr_skb_rea/* Sanity check of the record length */ if (unlikely (transport->tcp_reclen <8 )) {dprintk ("RPC: invalid TCP record fragment length\n" ); -xprt_force_disconnect (xprt); +xs_tcp_force_close (xprt);return ; } dprintk("RPC: reading TCP record fragment of length %d\n",
@@ -1135,7 +1145,7 @@ static inline void xs_tcp_read_calldir(struct sock_xprt *transport,break ;default :dprintk ("RPC: invalid request message type\n" ); -xprt_force_disconnect (&transport->xprt); +xs_tcp_force_close (&transport->xprt); }xs_tcp_check_fraghdr (transport); }
@@ -1458,6 +1468,8 @@ static void xs_tcp_cancel_linger_timeout(struct rpc_xprt *xprt)static void xs_sock_mark_closed (struct rpc_xprt *xprt) {smp_mb__before_clear_bit (); +clear_bit (XPRT_CONNECTION_ABORT , &xprt->state); +clear_bit (XPRT_CONNECTION_CLOSE , &xprt->state);clear_bit (XPRT_CLOSE_WAIT , &xprt->state);clear_bit (XPRT_CLOSING , &xprt->state);smp_mb__after_clear_bit ();
@@ -1515,8 +1527,8 @@ static void xs_tcp_state_change(struct sock *sk)break ;case TCP_CLOSE_WAIT :/* The server initiated a shutdown of the socket */ -xprt_force_disconnect (xprt); xprt->connect_cookie++; +xs_tcp_force_close (xprt);case TCP_CLOSING :/* * If the server closed down the connection, make sure that
@@ -2159,8 +2171,7 @@ static void xs_tcp_setup_socket(struct work_struct *work)/* We're probably in TIME_WAIT. Get rid of existing socket, * and retry */ -set_bit (XPRT_CONNECTION_CLOSE , &xprt->state); -xprt_force_disconnect (xprt); +xs_tcp_force_close (xprt);break ;case -ECONNREFUSED :case -ECONNRESET :
sound/pci/ac97/ac97_codec.c +2 -0
@@ -1271,6 +1271,8 @@ static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigne tmp.index = ac97->num; kctl =snd_ctl_new1 (&tmp, ac97); } +if (!kctl) +return -ENOMEM ;if (reg >=AC97_PHONE && reg <=AC97_PCM )set_tlv_db_scale (kctl, db_scale_5bit_12db_max);else
sound/pci/emu10k1/emu10k1_main.c +9 -0
@@ -1416,6 +1416,15 @@ static struct snd_emu_chip_details emu_chip_details[] = { .ca0108_chip = 1, .spk71 = 1, .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */ +/* Tested by Maxim Kachur <[email protected]> 17th Oct 2012. */ +/* This is MAEM8986, 0202 is MAEM8980 */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40071102, + .driver = "Audigy2", .name = "E-mu 1010 PCIe [MAEM8986]", + .id = "EMU1010", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 PCIe */ /* Tested by [email protected] 8th July 2005. */ /* This is MAEM8810, 0202 is MAEM8820 */ {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102,
sound/pci/hda/patch_cirrus.c +3 -3
@@ -1427,7 +1427,7 @@ static int patch_cs420x(struct hda_codec *codec)return 0 ; error: -kfree (codec->spec); +cs_free (codec); codec->spec =NULL ;return err; }
@@ -1984,7 +1984,7 @@ static int patch_cs4210(struct hda_codec *codec)return 0 ; error: -kfree (codec->spec); +cs_free (codec); codec->spec =NULL ;return err; }
@@ -2009,7 +2009,7 @@ static int patch_cs4213(struct hda_codec *codec)return 0 ; error: -kfree (codec->spec); +cs_free (codec); codec->spec =NULL ;return err; }
sound/pci/hda/patch_realtek.c +5 -1
@@ -602,6 +602,8 @@ static void alc_line_automute(struct hda_codec *codec) {struct alc_spec *spec = codec->spec; +if (spec->autocfg.line_out_type ==AUTO_PIN_SPEAKER_OUT ) +return ;/* check LO jack only when it's different from HP */ if (spec->autocfg.line_out_pins[0 ] == spec->autocfg.hp_pins[0 ])return ;
@@ -2663,8 +2665,10 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch,return "PCM" ;break ; } -if (snd_BUG_ON (ch >=ARRAY_SIZE (channel_name))) +if (ch >=ARRAY_SIZE (channel_name)) { +snd_BUG ();return "PCM" ; + }return channel_name[ch]; }
sound/soc/codecs/wm2200.c +2 -1
@@ -1028,7 +1028,7 @@ SOC_DOUBLE_R_TLV("OUT2 Digital Volume", WM2200_DAC_DIGITAL_VOLUME_2L, WM2200_DAC_DIGITAL_VOLUME_2R, WM2200_OUT2L_VOL_SHIFT, 0x9f, 0, digital_tlv), SOC_DOUBLE("OUT2 Switch", WM2200_PDM_1, WM2200_SPK1L_MUTE_SHIFT, - WM2200_SPK1R_MUTE_SHIFT, 1, 0), + WM2200_SPK1R_MUTE_SHIFT, 1, 1), };WM2200_MIXER_ENUMS (OUT1L ,WM2200_OUT1LMIX_INPUT_1_SOURCE );
@@ -2091,6 +2091,7 @@ static __devinit int wm2200_i2c_probe(struct i2c_client *i2c,switch (wm2200->rev) {case 0 : +case 1 : ret =regmap_register_patch (wm2200->regmap, wm2200_reva_patch,ARRAY_SIZE (wm2200_reva_patch));if (ret !=0 ) {
sound/soc/omap/omap-abe-twl6040.c +1 -1
@@ -181,7 +181,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)twl6040_disconnect_pin (dapm, pdata->has_hf,"Ext Spk" );twl6040_disconnect_pin (dapm, pdata->has_ep,"Earphone Spk" );twl6040_disconnect_pin (dapm, pdata->has_aux,"Line Out" ); -twl6040_disconnect_pin (dapm, pdata->has_vibra,"Vinrator" ); +twl6040_disconnect_pin (dapm, pdata->has_vibra,"Vibrator" );twl6040_disconnect_pin (dapm, pdata->has_hsmic,"Headset Mic" );twl6040_disconnect_pin (dapm, pdata->has_mainmic,"Main Handset Mic" );twl6040_disconnect_pin (dapm, pdata->has_submic,"Sub Handset Mic" );
sound/soc/sh/fsi.c +8 -7
@@ -20,6 +20,7 @@#include <linux/sh_dma.h> #include <linux/slab.h> #include <linux/module.h> +#include <linux/workqueue.h> #include <sound/soc.h> #include <sound/sh_fsi.h>
@@ -199,7 +200,7 @@ struct fsi_stream {*/ struct dma_chan *chan;struct sh_dmae_slave slave;/* see fsi_handler_init() */ -struct tasklet_struct tasklet; +struct work_struct work;dma_addr_t dma; };
@@ -968,9 +969,9 @@ static dma_addr_t fsi_dma_get_area(struct fsi_stream *io)return io->dma +samples_to_bytes (runtime, io->buff_sample_pos); } -static void fsi_dma_do_tasklet (unsigned long data) +static void fsi_dma_do_work (struct work_struct *work) { -struct fsi_stream *io = (struct fsi_stream *)data; + struct fsi_stream *io = container_of(work, struct fsi_stream, work);struct fsi_priv *fsi =fsi_stream_to_priv (io);struct dma_chan *chan;struct snd_soc_dai *dai;
@@ -1023,7 +1024,7 @@ static void fsi_dma_do_tasklet(unsigned long data)* FIXME * * In DMAEngine case, codec and FSI cannot be started simultaneously -* since FSI is using tasklet. +* since FSI is using the scheduler work queue. * Therefore, in capture case, probably FSI FIFO will have got * overflow error in this point. * in that case, DMA cannot start transfer until error was cleared.
@@ -1047,7 +1048,7 @@ static bool fsi_dma_filter(struct dma_chan *chan, void *param)static int fsi_dma_transfer (struct fsi_priv *fsi,struct fsi_stream *io) { -tasklet_schedule (&io->tasklet); +schedule_work (&io->work);return 0 ; }
@@ -1087,14 +1088,14 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io)if (!io->chan)return -EIO ; -tasklet_init (&io->tasklet, fsi_dma_do_tasklet, (unsigned long )io); +INIT_WORK (&io->work, fsi_dma_do_work);return 0 ; }static int fsi_dma_remove (struct fsi_priv *fsi,struct fsi_stream *io) { -tasklet_kill (&io->tasklet); +cancel_work_sync (&io->work);fsi_stream_stop (fsi, io);