aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2008-06-05[IPV6] TUNNEL6: Fix incoming packet length check for inter-protocol tunnel.Colin1-1/+1
I discover a strange behavior in [ipv4 in ipv6] tunnel. When IPv6 tunnel payload is less than 40(0x28), packet can be sent to network, received in physical interface, but not seen in IP tunnel interface. No counter increase in tunnel interface. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-06-05[IPV6] ADDRCONF: Check range of prefix lengthThomas Graf1-2/+8
As of now, the prefix length is not vaildated when adding or deleting addresses. The value is passed directly into the inet6_ifaddr structure and later passed on to memcmp() as length indicator which relies on the value never to exceed 128 (bits). Due to the missing check, the currently code allows for any 8 bit value to be passed on as prefix length while using the netlink interface, and any 32 bit value while using the ioctl interface. [Use unsigned int instead to generate better code - yoshfuji] Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-06-05[IPV6] UDP: Possible dst leak in udpv6_sendmsg.YOSHIFUJI Hideaki1-0/+2
ip6_sk_dst_lookup returns held dst entry. It should be released on all paths beyond this point. Add missed release when up->pending is set. Bug report and initial patch by Denis V. Lunev <den@openvz.org>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Denis V. Lunev <den@openvz.org>
2008-06-05[SCTP]: Fix NULL dereference of asoc.YOSHIFUJI Hideaki4-5/+8
Commit 7cbca67c073263c179f605bdbbdc565ab29d801d ("[IPV6]: Support Source Address Selection API (RFC5014)") introduced NULL dereference of asoc to sctp_v6_get_saddr in net/sctp/ipv6.c. Pointed out by Johann Felix Soden <johfel@users.sourceforge.net>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-06-03ax25: Fix NULL pointer dereference and lockup.Jarek Poplawski1-8/+3
From: Jarek Poplawski <jarkao2@gmail.com> There is only one function in AX25 calling skb_append(), and it really looks suspicious: appends skb after previously enqueued one, but in the meantime this previous skb could be removed from the queue. This patch Fixes it the simple way, so this is not fully compatible with the current method, but testing hasn't shown any problems. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-03bluetooth: rfcomm_dev_state_change deadlock fixDave Young1-1/+12
There's logic in __rfcomm_dlc_close: rfcomm_dlc_lock(d); d->state = BT_CLOSED; d->state_changed(d, err); rfcomm_dlc_unlock(d); In rfcomm_dev_state_change, it's possible that rfcomm_dev_put try to take the dlc lock, then we will deadlock. Here fixed it by unlock dlc before rfcomm_dev_get in rfcomm_dev_state_change. why not unlock just before rfcomm_dev_put? it's because there's another problem. rfcomm_dev_get/rfcomm_dev_del will take rfcomm_dev_lock, but in rfcomm_dev_add the lock order is : rfcomm_dev_lock --> dlc lock so I unlock dlc before the taken of rfcomm_dev_lock. Actually it's a regression caused by commit 1905f6c736cb618e07eca0c96e60e3c024023428 ("bluetooth : __rfcomm_dlc_close lock fix"), the dlc state_change could be two callbacks : rfcomm_sk_state_change and rfcomm_dev_state_change. I missed the rfcomm_sk_state_change that time. Thanks Arjan van de Ven <arjan@linux.intel.com> for the effort in commit 4c8411f8c115def968820a4df6658ccfd55d7f1a ("bluetooth: fix locking bug in the rfcomm socket cleanup handling") but he missed the rfcomm_dev_state_change lock issue. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-02mmc_spi: mmc_spi.h should include linux/interrupts.hAnton Vorontsov1-0/+2
Since mmc_spi.h uses irqreturn_t type, it should include appropriate header, otherwise build will break if users didn't include it (some of them do not use interrupts). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-02[CRYPTO] cts: Init SG tablesAlexey Dobriyan1-0/+6
Steps to reproduce: modprobe tcrypt # with CONFIG_DEBUG_SG=y testing cts(cbc(aes)) encryption test 1 (128 bit key): ------------[ cut here ]------------ kernel BUG at include/linux/scatterlist.h:65! invalid opcode: 0000 [1] PREEMPT SMP DEBUG_PAGEALLOC CPU 0 Modules linked in: tea xts twofish twofish_common tcrypt(+) [maaaany] Pid: 16151, comm: modprobe Not tainted 2.6.26-rc4-fat #7 RIP: 0010:[<ffffffffa0bf032e>] [<ffffffffa0bf032e>] :cts:cts_cbc_encrypt+0x151/0x355 RSP: 0018:ffff81016f497a88 EFLAGS: 00010286 RAX: ffffe20009535d58 RBX: ffff81016f497af0 RCX: 0000000087654321 RDX: ffff8100010d4f28 RSI: ffff81016f497ee8 RDI: ffff81016f497ac0 RBP: ffff81016f497c38 R08: 0000000000000000 R09: 0000000000000011 R10: ffffffff00000008 R11: ffff8100010d4f28 R12: ffff81016f497ac0 R13: ffff81016f497b30 R14: 0000000000000010 R15: 0000000000000010 FS: 00007fac6fa276f0(0000) GS:ffffffff8060e000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f12ca7cc000 CR3: 000000016f441000 CR4: 00000000000026e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000400 Process modprobe (pid: 16151, threadinfo ffff81016f496000, task ffff8101755b4ae0) Stack: 0000000000000001 ffff81016f496000 ffffffff80719f78 0000000000000001 0000000000000001 ffffffff8020c87c ffff81016f99c918 20646c756f772049 65687420656b696c 0000000000000020 0000000000000000 0000000033341102 Call Trace: [<ffffffff8020c87c>] ? restore_args+0x0/0x30 [<ffffffffa04aa311>] ? :aes_generic:crypto_aes_expand_key+0x311/0x369 [<ffffffff802ab453>] ? check_object+0x15a/0x213 [<ffffffff802aad22>] ? init_object+0x6e/0x76 [<ffffffff802ac3ae>] ? __slab_free+0xfc/0x371 [<ffffffffa0bf05ed>] :cts:crypto_cts_encrypt+0xbb/0xca [<ffffffffa07108de>] ? :crypto_blkcipher:setkey+0xc7/0xec [<ffffffffa07110b8>] :crypto_blkcipher:async_encrypt+0x38/0x3a [<ffffffffa2ce9341>] :tcrypt:test_cipher+0x261/0x7c6 [<ffffffffa2cfd9df>] :tcrypt:tcrypt_mod_init+0x9df/0x1b30 [<ffffffff80261e35>] sys_init_module+0x9e/0x1b2 [<ffffffff8020c15a>] system_call_after_swapgs+0x8a/0x8f Code: 45 c0 e8 aa 24 63 df 48 c1 e8 0c 48 b9 00 00 00 00 00 e2 ff ff 48 8b 55 88 48 6b c0 68 48 01 c8 b9 21 43 65 87 48 39 4d 80 74 04 <0f> 0b eb fe f6 c2 01 74 04 0f 0b eb fe 83 e2 03 4c 89 ef 44 89 RIP [<ffffffffa0bf032e>] :cts:cts_cbc_encrypt+0x151/0x355 RSP <ffff81016f497a88> ---[ end trace e8bahiarjand37fd ]--- Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-05-31kbuild: fix $(src) assignmnet with external modulesSam Ravnborg1-0/+6
When we introduced support for KBUILD_EXTRA_SYMBOLS we started to include the externam module's kbuild file when doing the final modpost step. As external modules often do: ccflags-y := -I$(src) We had problems because $(src) was unassinged and gcc then used the next parameter for -I resulting in strange build failures. Fix is to assign $(src) and $(obj) when building external modules. This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10798 Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Tvrtko <tvrtko.ursulin@sophos.com> Cc: Andrea Arcangeli <andrea@qumranet.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
2008-05-318250 Serial Driver: revert extra IRQ flag definition patchBryan Wu2-8/+1
As Russell pointed out, original patch will break some serial configurations because of the dependency of the <asm/serial.h> header file. Revert it first and try to find out other solution later Cc: Javier Herrero <jherrero@hvsistemas.es> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Russell King <rmk+lkml@arm.linux.org.uk> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-31Blackfin arch: update anomaly headers from toolchain trunkMike Frysinger5-23/+27
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-31Blackfin arch: Remove bad and usless codeMichael Hennerich5-364/+2
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-31Blackfin arch: Fix bug - set corret SSEL and IRQ to enable AD7877 on BF527Bryan Wu1-2/+2
AD7877 use SSEL_2 (P9.9) and IRQ_PF8 (P9.14) on BF527 - populating JP3 to enable STAMP - disable SW11.2 to disconnect SSEL_2/PF12 from Rotary NAND - disable SW18.1 to disconnect SSEL_2 from MAX1233 touchscreen chip Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-05-31[POWERPC] Fix DMA nodes in the MPC8610 HPCD device treeTimur Tabi1-5/+5
The node for DMA2 in the MPC8610 HPCD device tree has the wrong compatible properties. This breaks the DMA driver and the sound driver. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-31[POWERPC] Export empty_zero_page and copy_page in arch/ppcTony Breeds1-0/+2
Currently ext4 and fuse fail to link if modular: ERROR: "copy_page" [fs/fuse/fuse.ko] undefined! ERROR: "empty_zero_page" [fs/ext4/ext4dev.ko] undefined! make[3]: *** [__modpost] Error 1 make[2]: *** [modules] Error 2 make[1]: *** [sub-make] Error 2 While arch ppc exists it may as well compile, so this exports those symbols (which are already exported in arch/powerpc). Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-31[POWERPC] Add "memory" clobber to MMIO accessorsBenjamin Herrenschmidt1-5/+7
Gcc might re-order MMIO accessors vs. surrounding consistent memory accesses, which is a "bad thing", and could break drivers. This fixes it by adding a "memory" clobber to the MMIO accessors, which should prevent gcc from doing that reordering. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-30[PATCH 3/3] ocfs2/net: Silence build warningsSunil Mushran2-19/+41
This patch silences the build warnings concerning o2net_init_nst() and friends when building without CONFIG_DEBUG_FS enabled. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-05-30[PATCH 2/3] ocfs2/dlm: Silence build warningsSunil Mushran1-6/+6
This patch silences the build warnings concerning dlm_debug_init() and friends when building without CONFIG_DEBUG_FS enabled. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-05-30[PATCH 1/3] ocfs2/net: Silence build warningsSunil Mushran1-6/+6
This patch silences the build warnings concerning o2net_debugfs_init() and friends when building without CONFIG_DEBUG_FS enabled. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-05-30ocfs2: Rename 'user_stack' plugin structure to 'ocfs2_user_plugin'Joel Becker1-17/+17
The static structure describing the userspace cluster plugin for ocfs2 was named 'user_stack', which is a real pain when people are grep(1)ing the tree for the program stack object 'user_stack'. Change the name to something distinct and namespaced. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-05-30Mark 'scripts/decodecode' executableLinus Torvalds1-0/+0
.. because it is. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-30drivers/watchdog/geodewdt.c: build fixIngo Molnar1-2/+1
* Wim Van Sebroeck <wim@iguana.be> wrote: > Author: Jordan Crouse <jordan.crouse@amd.com> > Date: Mon Jan 21 10:07:00 2008 -0700 > > [WATCHDOG] Add a watchdog driver based on the CS5535/CS5536 MFGPT timers -tip testing found the following build failure on latest -git: drivers/watchdog/geodewdt.c: In function 'geodewdt_probe': drivers/watchdog/geodewdt.c:225: error: too many arguments to function 'geode_mfgpt_alloc_timer' make[1]: *** [drivers/watchdog/geodewdt.o] Error 1 make: *** [drivers/watchdog/geodewdt.o] Error 2 with this config: http://redhat.com/~mingo/misc/config-Fri_May_30_15_19_52_CEST_2008.bad find the fix below. Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-30PCI: fix rpadlpar pci hotplug driver sysfs usageBenjamin Herrenschmidt1-2/+6
When Greg "fixed" the sysfs usage of that driver a while back, he seem to have introduced a bug where the quotes are added around the name of our specific sysfs files, thus breaking the user space tool. This fixes it. Tested DLPAR operations on a POWER6 machine successfully. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-05-30ahci: change the Device IDs of nvidia MCP7B AHCI controller in ahci.cpeerchen1-4/+4
Change the partial Device IDs of nvidia MCP7B AHCI controller in ahci.c, as the actual PCI IDs deployed in the field differed from the forecasted ones preemptively placed in the driver. Signed-off-by: Peer Chen <peerchen@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30[libata] sata_fsl: Fix broken driver, add port multiplier (PMP) supportAshish Kalra1-61/+163
The following commit (4c9bf4e799ce06a7378f1196587084802a414c03): libata: replace tf_read with qc_fill_rtf for non-SFF drivers Broke the sata_fsl.c driver in 2.6.26-rc. I know the following patch fixes the issue, it clearly also adds port multipler support. The current 2.6.26-rc driver is broken. On boot with debug enabled we get something like (w/o this patch): spurious interrupt!!, CC = 0x1 interrupt status 0x1 xx_scr_read, reg_in = 1 spurious interrupt!!, CC = 0x1 interrupt status 0x1 xx_scr_read, reg_in = 1 spurious interrupt!!, CC = 0x1 interrupt status 0x1 xx_scr_read, reg_in = 1 .. continues for ever. This change fixes this as a side effect of adding port multiplier support. Signed-off-by: Ashish Kalra <ashish.kalra@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30libata: SRST can't be trusted on PMP sil3726Tejun Heo1-2/+5
As in sil4726, SRST can't be trusted on sil3726 causing detection problems under certain configuraitons. I thought it was from the Config Disk device but apparently not. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30libata: fix libata-scsi kernel-doc notationRandy Dunlap1-1/+2
Fix libata-scsi kernel-doc notation: Warning(linux-2.6.25-git15//drivers/ata/libata-scsi.c:1659): No description found for parameter 'cmd' Warning(linux-2.6.25-git15//drivers/ata/libata-scsi.c:1971): No description found for parameter 'buf' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30ata: Convert to static DEFINE_SPINLOCK(lock)Pradeep Singh Rautela1-1/+1
Replace deprecated static spinlock_t instance to static DEFINE_SPINLOCK(lock). Signed-off-by: Pradeep Singh <rautelap@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30ata_piix: fix macbook ich8m problemsTejun Heo1-3/+4
ICH8M on macbooks are peculiar in that some of them lock up when the second port is enabled, some return bogus values on SIDPR access while yet others hang on SIDPR access. Also, the ich8m_apple_sata entry was wrongly added below generic ich8m entry making it virtually useless. This patch works around macbook ich8m problems by * moving ich8m_apple_sata entry above generic ich8m entry * dropping PIIX_FLAG_SIDPR from ich8m_apple_sata * adding subsystem 106b:00a1 as ich8m_apple_sata Reported and tested by MATSUBAYASHI. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30sata_mv: implement SoC guideline SATA_S11Mark Lord1-1/+5
The 5182 System-On-Chip (SOC) variant wants certain lower bits to be cleared on any write to the PHY_MODE3 register. If/when support is added for other SOC variants, we'll need some way to uniquely identify the 5182, and not perform this workaround for the others. But for now, it is the only SOC variant we support here. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30sata_mv: workaround for 60x1 errata sata13Mark Lord1-2/+7
The "B2" variant of the 6041/6081 (genII) chips requires that the PHY_MODE3 register be rewritten after any write to PHY_MODE4. This fixes a regression introduced by an earlier patch. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30sata_mv: nuke unreleased GenIIe revisionsMark Lord1-19/+4
The only public release of the 6042/7042 chips was/is revision "B0". Remove code that attempted to deal with earlier, non-released revs. This matches the logic of the current Marvell "proprietary" driver. Also, bump up the sata_mv version number, to reflect this batch of erratas. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30sata_mv: PHY_MODEx errata fixesMark Lord1-12/+12
Fix and update the errata handling for the PHY_MODEx registers. This improves receiver noise tolerance, among other things. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30sata_mv: move SOC_FLAG to hprivMark Lord1-14/+13
Convert the System-on-Chip flag from a host flag to an hpriv flag, for better consistency with other chip-rev flags, and for easier use in errata fixes etc. Also change the related "HAS_PCI()" into "!IS_SOC()" for better consistency of naming/use (everything else SOC-related already uses "SOC"). There are no functionality changes in this patch. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-30acpi: fix sparse const errorsHarvey Harrison1-5/+5
In this case we want a constant pointer to constant chars: drivers/misc/thinkpad_acpi.c:3824:19: error: Just how const do you want this type to be? Like the error says. drivers/misc/thinkpad_acpi.c:3863:19: error: Just how const do you want this type to be? drivers/misc/thinkpad_acpi.c:3864:19: error: Just how const do you want this type to be? drivers/misc/thinkpad_acpi.c:3865:19: error: Just how const do you want this type to be? drivers/misc/thinkpad_acpi.c:3866:19: error: Just how const do you want this type to be? Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-30Input: rename SW_RADIO to SW_RFKILL_ALLHenrique de Moraes Holschuh1-1/+3
The SW_RADIO code for EV_SW events has a name that is not descriptive enough of its intended function, and could induce someone to think KEY_RADIO is its EV_KEY counterpart, which is false. Rename it to SW_RFKILL_ALL, and document what this event is for. Keep the old name around, to avoid userspace ABI breaks. The SW_RFKILL_ALL event is meant to be used by rfkill master switches. It is not bound to a particular radio switch type, and usually applies to all types. It is semantically tied to master rfkill switches that enable or disable every radio in a system. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-30Input: gtco - fix double kfree in error handling pathDmitry Torokhov1-10/+7
The code would try to free 'report' twice upon input_register_device() failure. Reported-by: Julia Lawall <julia@diku.dk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-30llc: Fix double accounting of received packetsArnaldo Carvalho de Melo1-5/+5
llc_sap_rcv was being preceded by skb_set_owner_r, then calling llc_state_process that calls sock_queue_rcv_skb, that in turn calls skb_set_owner_r again making the space allowed to be used by the socket to be leaked, making the socket to get stuck. Fix it by setting skb->sk at llc_sap_rcv and leave the accounting to be done only at sock_queue_rcv_skb. Reported-by: Dmitry Petukhov <dmgenp@gmail.com> Tested-by: Dmitry Petukhov <dmgenp@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-05-30[S390] Update default configuration.Martin Schwidefsky1-3/+8
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] disassembler: fix idte instruction format.Martin Schwidefsky1-1/+1
The correct instruction format of idte is "idte r1,r3,r2" with r1 at bit 24, r3 at bit 16 and r2 at bit 28. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] tape: fix race with stack local wait_queue_head_t.Martin Schwidefsky2-9/+10
A wait_event call with a stack local wait_queue_head_t structure that is used to do the wake up for the wait_event is inherently racy. After the wait_event finished the wake_up call might not have completed yet. Replace the stack local wait_queue_head_t in tape_do_io and tape_do_io_interruptible with a per device wait queue. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] 3270: fix race with stack local wait_queue_head_t.Martin Schwidefsky1-5/+4
A wait_event call with a stack local wait_queue_head_t structure that is used to do the wake up for the wait_event is inherently racy. After the wait_event finished the wake_up call might not have completed yet. Remove the stack local wait_queue_head_t from raw3270_start_init and use the global raw3270_wait_queue instead. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] dasd: use a generic wait_queue for sleep_onStefan Haberland1-14/+14
Use a generic wait_queue to prevent the wait_queue in dasd_sleep_on_ functions from being referenced by callback_data while it does not exist any more. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] sclp_vt220: fix scheduling while atomic bug.Heiko Carstens1-20/+7
The driver incorrectly assumed that putchar will only be called from schedulable process context and therefore blocked and waited if no free output buffers where available. Since putchar may also be called from BH context this may lead to deadlocks. To fix this just return the number of characters accepted and let the upper layer handle the rest. The console write function will busy wait (sclp_sync_wait) until a buffer is available again. Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] showmem: Only walk spanned pages.Heiko Carstens1-26/+23
Convert show_mem() so its nearly the same as on x86/powerpc. Gives us proper locking and we get also rid of the only use of max_mapnr. Also the number of pages was contained in an int which might not be sufficient not too far in the future. Cc: Johannes Weiner <hannes@saeurebad.de> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] appldata: prevent cpu hotplug when walking cpu_online_map.Gerald Schaefer1-0/+8
Use get_online_cpus() to prevent cpu hotplug in situations where for_each_online_cpu() is called. Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] Fix section mismatch warnings.Heiko Carstens3-7/+15
This fixes the last remaining section mismatch warnings in s390 architecture code. It reveals also a real bug introduced by... me with git commit 2069e978d5a6e7b45d58027e3de7f879b8c5e488 ("[S390] sparsemem vmemmap: initialize memmap.") Calling the generic vmemmap_alloc_block() function to get initialized memory is a nice idea, however that function is __meminit annotated and therefore the function might be gone if we try to call it later. This can happen if a DCSS segment gets added. So basically revert the patch and clear the memmap explicitly to fix the original bug. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] s390 types: make dma_addr_t 64 bit capableChristian Borntraeger1-0/+6
virtio tests with guests larger than 4 GB revealed that the dma_addr_t definition for s390 did not make it into the 64bit world. This patch changes the definition on s390 to have an u64 on 64bit and u32 on 32bit systems. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] tape: Fix race condition in tape block device driverMichael Holzheu1-2/+2
Due to incorrect function call sequence it can happen that a tape block request is finished before the request is taken from the block request queue. The following sequence leads to that condition: * tapeblock_start_request() -> start CCW program * Request finishes -> IO interrupt * tapeblock_end_request() * end_that_request_last() If blkdev_dequeue_request() has not been called before end_that_request_last(), a kernel bug is triggered in end_that_request_last() because the request is still queued. To solve that problem blkdev_dequeue_request() has to be called before starting the CCW program. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-05-30[S390] fix sparsemem related compile error with allnoconfig on s390Hans-Joachim Picht1-0/+3
On s390 make allnoconfig fails with the following build error: arch/s390/mm/init.c: In function 'show_mem': arch/s390/mm/init.c:55: error: implicit declaration of function 'pfn_valid' make[1]: *** [arch/s390/mm/init.o] Error 1 make: *** [arch/s390/mm] Error 2 This problem can by fixed ensuring that ARCH_SELECT_MEMORY_MODEL is always turned on. Signed-off-by: Hans-Joachim Picht <hans@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>