Richard Purdie [Mon, 31 Dec 2007 23:09:44 +0000 (23:09 +0000)]
leds: Fix leds_list_lock locking issues
Covert leds_list_lock to a rw_sempahore to match previous LED trigger
locking fixes, fixing lock ordering.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Linus Torvalds [Sun, 30 Dec 2007 09:23:58 +0000 (01:23 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SERIAL]: Fix section mismatches in Sun serial console drivers.
Dave Young [Sun, 30 Dec 2007 03:17:47 +0000 (19:17 -0800)]
[BLUETOOTH]: put_device before device_del fix
Because of workqueue delay, the put_device could be called before
device_del, so move it to del_conn.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gavin McCullagh [Sun, 30 Dec 2007 03:11:21 +0000 (19:11 -0800)]
[TCP]: use non-delayed ACK for congestion control RTT
When a delayed ACK representing two packets arrives, there are two RTT
samples available, one for each packet. The first (in order of seq
number) will be artificially long due to the delay waiting for the
second packet, the second will trigger the ACK and so will not itself
be delayed.
According to rfc1323, the SRTT used for RTO calculation should use the
first rtt, so receivers echo the timestamp from the first packet in
the delayed ack. For congestion control however, it seems measuring
delayed ack delay is not desirable as it varies independently of
congestion.
The patch below causes seq_rtt and last_ackt to be updated with any
available later packet rtts which should have less (and hopefully
zero) delack delay. The rtt value then gets passed to
ca_ops->pkts_acked().
Where TCP_CONG_RTT_STAMP was set, effort was made to supress RTTs from
within a TSO chunk (!fully_acked), using only the final ACK (which
includes any TSO delay) to generate RTTs. This patch removes these
checks so RTTs are passed for each ACK to ca_ops->pkts_acked().
For non-delay based congestion control (cubic, h-tcp), rtt is
sometimes used for rtt-scaling. In shortening the RTT, this may make
them a little less aggressive. Delay-based schemes (eg vegas, veno,
illinois) should get a cleaner, more accurate congestion signal,
particularly for small cwnds. The congestion control module can
potentially also filter out bad RTTs due to the delayed ack alarm by
looking at the associated cnt which (where delayed acking is in use)
should probably be 1 if the alarm went off or greater if the ACK was
triggered by a packet.
Signed-off-by: Gavin McCullagh <gavin.mccullagh@nuim.ie>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 29 Dec 2007 09:19:49 +0000 (01:19 -0800)]
[SERIAL]: Fix section mismatches in Sun serial console drivers.
We're exporting an __init function, oops :-)
The core issue here is that add_preferred_console() is marked
as __init, this makes it impossible to invoke this thing from
a driver probe routine which is what the Sparc serial drivers
need to do.
There is no harm in dropping the __init marker. This code will
actually work properly when invoked from a modular driver,
except that init will probably not pick up the console change
without some other support code.
Then we can drop the __init from sunserial_console_match()
and we're no longer exporting an __init function to modules.
Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Horman [Fri, 28 Dec 2007 05:19:10 +0000 (21:19 -0800)]
[IPV4] Fix ip=dhcp regression
David Brownell pointed out a regression in my recent "Fix ip command
line processing" patch. It turns out to be a fairly blatant oversight on
my part whereby ic_enable is never set, and thus autoconfiguration is
never enabled. Clearly my testing was broken :-(
The solution that I have is to set ic_enable to 1 if we hit
ip_auto_config_setup(), which basically means that autoconfiguration is
activated unless told otherwise. I then flip ic_enable to 0 if ip=off,
ip=none, ip=::::::off or ip=::::::none using ic_proto_name();
The incremental patch is below, let me know if a non-incremental version
is prepared, as I did as for the original patch to be reverted pending a
fix.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Fri, 28 Dec 2007 18:37:46 +0000 (10:37 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] PS3: Fix printing of os-area magic numbers
[POWERPC] Oprofile: Remove dependency on spufs module
Linus Torvalds [Fri, 28 Dec 2007 05:45:01 +0000 (21:45 -0800)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] padlock: Fix spurious ECB page fault
Linus Torvalds [Fri, 28 Dec 2007 05:21:36 +0000 (21:21 -0800)]
[PCI] Do not enable CRS Software Visibility by default
It appears that some PCI-E bridges do the wrong thing in the presense of
CRS Software Visibility and MMCONFIG. In particular, it looks like an
ATI bridge (device ID 7936) will return 0001 in the vendor ID field of
any bridged devices indefinitely.
Not enabling CRS SV avoids the problem, and as we currently do not
really make good use of the feature anyway (we just time out rather than
do any threaded discovery as suggested by the CRS specs), we're better
off just not enabling it.
This should fix a slew of problem reports with random devices (generally
graphics adapters or fairly high-performance networking cards, since it
only affected PCI-E) not getting properly recognized on these AMD systems.
If we really want to use CRS-SV, we may end up eventually needing a
whitelist of systems where this should be enabled, along with some kind
of "pcibios_enable_crs()" query to call the system-specific code.
Suggested-by: Loic Prylli <loic@myri.com>
Tested-by: Kai Ruhnau <kai@tragetaschen.dyndns.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Geoff Levand [Sun, 23 Dec 2007 17:41:01 +0000 (04:41 +1100)]
[POWERPC] PS3: Fix printing of os-area magic numbers
Fix a bug in the printing of the os-area magic numbers which assumed
that magic numbers were zero terminated strings. The magic numbers
are represented in memory as integers. If the os-area sections are
not initialized correctly they could contained random data that would
be printed to the display. Also unify the handling of header and db
magic numbers and make both of type array of u8.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Bob Nelson [Fri, 14 Dec 2007 14:27:30 +0000 (01:27 +1100)]
[POWERPC] Oprofile: Remove dependency on spufs module
This removes an OProfile dependency on the spufs module. This
dependency was causing a problem for multiplatform systems that are
built with support for Oprofile on Cell but try to load the oprofile
module on a non-Cell system.
Signed-off-by: Bob Nelson <rrnelson@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Herbert Xu [Fri, 28 Dec 2007 00:05:46 +0000 (11:05 +1100)]
[CRYPTO] padlock: Fix spurious ECB page fault
The xcryptecb instruction always processes an even number of blocks so
we need to ensure th existence of an extra block if we have to process
an odd number of blocks.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Linus Torvalds [Thu, 27 Dec 2007 06:04:46 +0000 (22:04 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
[IPV4]: Fix ip command line processing.
[VETH]: move veth.h to include/linux
[NET] tc_nat: header install
[TUNTAP]: Fix wrong debug message.
[NETFILTER]: nf_conntrack_ipv4: fix module parameter compatibility
mac80211: warn when receiving frames with unaligned data
mac80211: round station cleanup timer
Linus Torvalds [Thu, 27 Dec 2007 06:04:34 +0000 (22:04 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Implement pci_resource_to_user()
Christoph Lameter [Wed, 26 Dec 2007 20:43:01 +0000 (12:43 -0800)]
Revert quicklist need->flush fix
Did not fix the reported issue. Apart from other weirdness this causes a
bad link between the TLB flushing logic and the quicklists. If there is
indeed an issue that an arch needs a tlb flush before free then the arch
code needs to set tlb->need_flush before calling quicklist_free.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Simon Horman [Wed, 26 Dec 2007 04:54:42 +0000 (20:54 -0800)]
[IPV4]: Fix ip command line processing.
Recently the documentation in Documentation/nfsroot.txt was
update to note that in fact ip=off and ip=::::::off as the
latter is ignored and the default (on) is used.
This was certainly a step in the direction of reducing confusion.
But it seems to me that the code ought to be fixed up so that
ip=::::::off actually turns off ip autoconfiguration.
This patch also notes more specifically that ip=on (aka ip=::::::on)
is the default.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Wed, 26 Dec 2007 01:23:59 +0000 (17:23 -0800)]
[VETH]: move veth.h to include/linux
Move veth.h from net/ to linux/ since it is a user api, and add it to
user header processing Kbuild.
[ Use header-y as suggested by Sam Ravnborg. -DaveM ]
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Tue, 25 Dec 2007 05:59:24 +0000 (21:59 -0800)]
[NET] tc_nat: header install
iproute2 build needs tc_nat.h header from kernel make install_headers.
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Toyo Abe [Tue, 25 Dec 2007 05:29:35 +0000 (21:29 -0800)]
[TUNTAP]: Fix wrong debug message.
This is a trivial fix of debug message.
When a persist flag is set, the message should say "enabled".
Signed-off-by: Toyo Abe <tabe@miraclelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Tue, 25 Dec 2007 05:09:10 +0000 (21:09 -0800)]
[NETFILTER]: nf_conntrack_ipv4: fix module parameter compatibility
Some users do "modprobe ip_conntrack hashsize=...". Since we have the
module aliases this loads nf_conntrack_ipv4 and nf_conntrack, the
hashsize parameter is unknown for nf_conntrack_ipv4 however and makes
it fail.
Allow to specify hashsize= for both nf_conntrack and nf_conntrack_ipv4.
Note: the nf_conntrack message in the ringbuffer will display an
incorrect hashsize since nf_conntrack is first pulled in as a
dependency and calculates the size itself, then it gets changed
through a call to nf_conntrack_set_hashsize().
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Tue, 18 Dec 2007 14:11:35 +0000 (15:11 +0100)]
mac80211: warn when receiving frames with unaligned data
This patch makes mac80211 warn (once) when the driver passes up a
frame in which the payload data is not aligned on a four-byte
boundary, with a long comment for people who run into the condition
and need to know what to do.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 17 Dec 2007 14:07:43 +0000 (15:07 +0100)]
mac80211: round station cleanup timer
The station cleanup timer runs every ten seconds, the exact
timing is not relevant at all so it can well run together with
other things to save power.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David S. Miller [Tue, 25 Dec 2007 10:20:33 +0000 (02:20 -0800)]
[SPARC64]: Implement pci_resource_to_user()
This makes libpciaccess able to mmap() resources of the
device properly.
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Wed, 26 Dec 2007 04:21:57 +0000 (20:21 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
cmd64x: fix hwif->chipset setup
MAINTAINERS: update ide-cd entry
ide-cd: fix 'ireason' reporting in cdrom_pc_intr()
ide-cd: fix error message in cdrom_pc_intr()
ide-cd: add error message for DMA error to cdrom_read_intr()
ide-cd: fix error messages in cdrom_write_intr()
ide-cd: add missing 'ireason' masking to cdrom_write_intr()
ide-cd: fix error messages in cdrom_{read,write}_check_ireason()
ide-cd: use ide_cd_release() in ide_cd_probe()
ide-cd: fix ACER/AOpen 24X CDROM speed reporting on big-endian machines
ide-cd: fix SAMSUNG CD-ROM SCR-3231 quirk
drivers/ide/: Spelling fixes
Linus Torvalds [Wed, 26 Dec 2007 04:18:25 +0000 (20:18 -0800)]
Merge git://git./linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (6876): ivtv: mspx4xx needs a longer i2c udelay
V4L/DVB (6871): Kconfig: VIDEO_CX23885 must select DVB_LGDT330X
Linus Torvalds [Wed, 26 Dec 2007 04:16:16 +0000 (20:16 -0800)]
Revert "x86: fix show cpuinfo cpu number always zero"
This reverts commit
fbdcf18df73758b2e187ab94678b30cd5f6ff9f9.
As pointed out by Yanmin Zhang, the problem was already fixed
differently (and correctly), and rather than fix anything, it actually
causes us to create a sub-optimal sched-domains hierarchy (not setting
up the domain belonging to the core) when CONFIG_X86_HT=y.
Requested-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:44 +0000 (15:23 +0100)]
cmd64x: fix hwif->chipset setup
commit
528a572daea90aa41db92683e5a8756acef514c4 ("ide: add ->chipset field
to ide_pci_device_t") broke hwif->chipset setup (it is now set to ide_cmd646
for CMD648 instead of CMD646). It seems that the breakage happend while
I was moving patches around (cmd64x_chipsets[] entries for CMD646 and CMD648
are identical except for 'name' field). Fix it and bump driver version.
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Borislav Petkov [Mon, 24 Dec 2007 14:23:44 +0000 (15:23 +0100)]
MAINTAINERS: update ide-cd entry
Reopen ide-cd for maintainership.
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:44 +0000 (15:23 +0100)]
ide-cd: fix 'ireason' reporting in cdrom_pc_intr()
Mask 'ireason' variable so only the valid interrupt reason bits
will be reported on "drive appears confused" error.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:44 +0000 (15:23 +0100)]
ide-cd: fix error message in cdrom_pc_intr()
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:43 +0000 (15:23 +0100)]
ide-cd: add error message for DMA error to cdrom_read_intr()
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:43 +0000 (15:23 +0100)]
ide-cd: fix error messages in cdrom_write_intr()
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:43 +0000 (15:23 +0100)]
ide-cd: add missing 'ireason' masking to cdrom_write_intr()
Mask 'ireason' variable with 0x3 so the valid interrupt reason value
is passed to cdrom_write_check_ireason() for checking.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:43 +0000 (15:23 +0100)]
ide-cd: fix error messages in cdrom_{read,write}_check_ireason()
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:43 +0000 (15:23 +0100)]
ide-cd: use ide_cd_release() in ide_cd_probe()
Use ide_cd_release() to do the cleanup if ide_cdrom_setup() fails.
It fixes:
- the default drive->dsc_overlap value not being restored
- the default drive->queue's prep_rq_fn not being restored
- struct gendisk 'g' not being freed
- wrong function name being reported on unregister_cdrom() error
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:43 +0000 (15:23 +0100)]
ide-cd: fix ACER/AOpen 24X CDROM speed reporting on big-endian machines
* Fix ACER/AOpen 24X CDROM speed reporting on big-endian machines
by adding missing le16_to_cpu() calls.
While at it:
* Replace ntohs() by be16_to_cpu().
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 24 Dec 2007 14:23:43 +0000 (15:23 +0100)]
ide-cd: fix SAMSUNG CD-ROM SCR-3231 quirk
cdi->mask is cleared by ide_cdrom_register() which is called after the quirk.
Fix it by adding new ->no_speed_select flag to struct ide_cd_config_flags
and using it in ide_cdrom_register() to set CDC_SELECT_SPEED flag.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Joe Perches [Mon, 24 Dec 2007 14:23:42 +0000 (15:23 +0100)]
drivers/ide/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Hans Verkuil [Fri, 21 Dec 2007 09:35:55 +0000 (06:35 -0300)]
V4L/DVB (6876): ivtv: mspx4xx needs a longer i2c udelay
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Michael Krufky [Wed, 19 Dec 2007 05:14:44 +0000 (02:14 -0300)]
V4L/DVB (6871): Kconfig: VIDEO_CX23885 must select DVB_LGDT330X
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Linus Torvalds [Sun, 23 Dec 2007 21:06:49 +0000 (13:06 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
Modules: fix memory leak of module names
UIO: Add a MAINTAINERS entry for Userspace I/O
Linus Torvalds [Sun, 23 Dec 2007 21:06:32 +0000 (13:06 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: New device ID for the CP2101 driver
USB: VID/PID update for sierra
USB: Unbreak fsl_usb2_udc
Linus Torvalds [Sun, 23 Dec 2007 21:05:46 +0000 (13:05 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
MACB: clear transmit buffers properly on transmit underrun
3c359 endianness annotations and fixes
fec_mpc52xx: write in C...
3c574 and 3c589 endianness fixes (.24?)
rrunner: use offsetof() instead of homegrown insanity
r8169 endianness
dl2k endianness fixes (.24 fodder?)
yellowfin: annotations and fixes (.24 fodder?)
asix fixes
cycx: annotations and fixes (.24 fodder?)
typhoon: trivial endianness annotations
typhoon: memory corruptor on big-endian if TSO is enabled
typhoon: missed rx overruns on big-endian
typhoon: set_settings broken on big-endian
typhoon: missing le32_to_cpu() in get_drvinfo
typhoon: endianness bug in tx/rx byte counters
ipw2200: prevent alloc of unspecified size on stack
iwlwifi: fix possible priv->mutex deadlock during suspend
p54: add Kconfig description
rtl8187: Add USB ID for Sitecom WL-168 v1 001
Al Viro [Sun, 23 Dec 2007 20:01:04 +0000 (20:01 +0000)]
uml: user of helper_wait() got missed when it got extra arguments
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cory T. Tusar [Sun, 23 Dec 2007 20:34:51 +0000 (12:34 -0800)]
tty: fix logic change introduced by wait_event_interruptible_timeout()
Commit
5a52bd4a2dcb570333ce6fe2e16cd311650dbdc8 introduced a subtle logic
change in tty_wait_until_sent(). The original version would only error out
of the 'do { ... } while (timeout)' loop if signal_pending() evaluated to
true; a timeout or break due to an empty buffer would fall out of the loop
and into the tty->driver->wait_until_sent handling. The current
implementation will error out on either a pending signal or an empty
buffer, falling through to the tty->driver->wait_until_sent handling only
on a timeout.
The ->wait_until_sent() will not be reached if the buffer empties before
timeout jiffies have elapsed. This behavior differs from that prior to commit
5a52bd4a2dcb570333ce6fe2e16cd311650dbdc8.
I turned this up while using a little serial download utility to bootstrap an
ARM-based eval board. The util worked fine on 2.6.22.x, but consistently
failed on 2.6.23.x. Once I'd determined that, I narrowed things down with git
bisect, and found the above difference in logic in tty_wait_until_sent() by
inspection.
This change reverts the logic flow in tty_wait_until_sent() to match that
prior to the aforementioned commit.
Signed-off-by: Cory T. Tusar <ctusar@videon-central.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Mundt [Sat, 22 Dec 2007 22:03:30 +0000 (14:03 -0800)]
kconfig: obey KCONFIG_ALLCONFIG choices with randconfig.
Currently when using KCONFIG_ALLCONFIG with randconfig the choice options
are clobbered. As recommended by Roman, this adds an is_new test to see
whether to select a new option or obey the existing one.
This is a resend of the earlier patch a couple of weeks ago, since there
was no reply. Original thread is at http://lkml.org/lkml/2007/11/28/94
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Sat, 22 Dec 2007 22:03:29 +0000 (14:03 -0800)]
pcmcia: remove pxa2xx_lubbock build warning
Init section confusion. There will likely be some other similar
issues, introduced by I'm-not-sure-what-patch.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Peter Zijlstra [Sat, 22 Dec 2007 22:03:29 +0000 (14:03 -0800)]
lib: proportion: fix underflow in prop_norm_percpu()
Zhe Jiang noticed that its possible to underflow pl->events in
prop_norm_percpu() when the value returned by percpu_counter_read() is less
than the error on that read and the period delay > 1. In that case half might
not trigger the batch increment and the value will be identical on the next
iteration, causing the same half to be subtracted again and again.
Fix this by rewriting the division as a single subtraction instead of a
subtraction loop and using percpu_counter_sum() when the value returned by
percpu_counter_read() is smaller than the error.
The latter is still needed if we want pl->events to shrink properly in the
error region.
[akpm@linux-foundation.org: cleanups]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Jiang Zhe <zhe.jiang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel Walker [Sat, 22 Dec 2007 22:03:28 +0000 (14:03 -0800)]
ps3: vuart: fix error path locking
This stray down would cause a permanent sleep which doesn't seem correct.
The other uses of this semaphore appear fairly mutex like it's even
initialized with init_MUTEX() .. So here a patch for removing this one
down().
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Sat, 22 Dec 2007 22:03:27 +0000 (14:03 -0800)]
MAINTAINERS: mailing list archives are web links
L: entries should be email addresses
Change L:http entries to W:http
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 22 Dec 2007 22:03:26 +0000 (14:03 -0800)]
ecryptfs: redo dget,mntget on dentry_open failure
Thanks to Jeff Moyer for pointing this out.
If the RDWR dentry_open() in ecryptfs_init_persistent_file fails,
it will do a dput/mntput. Need to re-take references if we
retry as RDONLY.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Acked-by: Mike Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 22 Dec 2007 22:03:26 +0000 (14:03 -0800)]
ecryptfs: fix unlocking in error paths
Thanks to Josef Bacik for finding these.
A couple of ecryptfs error paths don't properly unlock things they locked.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Cc: Josef Bacik <jbacik@redhat.com>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara [Sat, 22 Dec 2007 22:03:25 +0000 (14:03 -0800)]
Don't send quota messages repeatedly when hardlimit reached
We should send quota message to netlink only once when hardlimit is
reached. Otherwise user could easily make the system busy by trying to
exceed the hardlimit (and also the messages could be anoying if you cannot
stop writing just now).
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara [Sat, 22 Dec 2007 22:03:25 +0000 (14:03 -0800)]
Fix computation of SKB size for quota messages
Fix computation of size of skb needed for quota message. We should use
netlink provided functions and not just an ad-hoc number. Also don't print
the return value from nla_put_foo() as it is always -1.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 22 Dec 2007 22:03:24 +0000 (14:03 -0800)]
ecryptfs: fix string overflow on long cipher names
Passing a cipher name > 32 chars on mount results in an overflow when the
cipher name is printed, because the last character in the struct
ecryptfs_key_tfm's cipher_name string was never zeroed.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Acked-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Christoph Lameter [Sat, 22 Dec 2007 22:03:23 +0000 (14:03 -0800)]
quicklists: do not release off node pages early
quicklists must keep even off node pages on the quicklists until the TLB
flush has been completed.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Martin Kusserow [Fri, 21 Dec 2007 11:02:17 +0000 (12:02 +0100)]
USB: New device ID for the CP2101 driver
attached please find a new device ID for CP2101 driver. This device is a
usb stick from Dynastream to communicate with ANT wireless devices which
I suppose is fairly similar to the ANT dev board having product id 0x1003.
From: Martin Kusserow <kusserow@ife.ee.ethz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin R Page [Thu, 13 Dec 2007 01:10:48 +0000 (01:10 +0000)]
USB: VID/PID update for sierra
Adds VID/PID for the MC8775 found internally in the Thinkpad X61s laptop
(and likely others). For commercial reasons the driver maintainer cannot
add VID/PIDs for laptop OEM devices himself.
Signed-off-by: Kevin R Page <linux-kernel@krp.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Korsgaard [Fri, 21 Dec 2007 16:33:46 +0000 (08:33 -0800)]
USB: Unbreak fsl_usb2_udc
Commit a4e3ef5... (USB: gadget: gadget_is_{dualspeed,otg} predicates
and cleanup) broke fsl_usb2_udc; the build test didn't cover peripheral
drivers, just gadget drivers.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Sun, 23 Dec 2007 05:18:25 +0000 (21:18 -0800)]
Modules: fix memory leak of module names
Due to the change in kobject name handling, the module kobject needs to
have a null release function to ensure that the name it previously set
will be properly cleaned up.
All of this wierdness goes away in 2.6.25 with the rework of the kobject
name and cleanup logic, but this is required for 2.6.24.
Thanks to Alexey Dobriyan for finding the problem, and to Kay Sievers
for pointing out the simple way to fix it after I tried many complex
ways.
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Hans-Jürgen Koch [Wed, 5 Dec 2007 14:08:07 +0000 (15:08 +0100)]
UIO: Add a MAINTAINERS entry for Userspace I/O
This patch adds an entry for the Userspace I/O framework to MAINTAINERS.
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Gregory CLEMENT [Wed, 19 Dec 2007 17:23:44 +0000 (18:23 +0100)]
MACB: clear transmit buffers properly on transmit underrun
Initially transmit buffer pointers were only reset. But buffer
descriptors were possibly still set as ready, and buffer in upper
layer was not freed. This caused driver hang under big load. Now
reset clean properly the buffer descriptor and freed upper layer.
Signed-off-by: Gregory CLEMENT <gclement00@gmail.com>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jeff Garzik [Sun, 23 Dec 2007 04:25:16 +0000 (23:25 -0500)]
Merge branch 'fixes-jgarzik' of git://git./linux/kernel/git/linville/wireless-2.6 into upstream-fixes
Al Viro [Sat, 22 Dec 2007 19:44:10 +0000 (19:44 +0000)]
3c359 endianness annotations and fixes
Same story as with olympic - htons(readw()) when swab16(readw()) is needed,
missing conversions to le32 when dealing with shared descriptors, etc.
Olympic got those fixes in 2.4.0-test2, 3c359 didn't.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sat, 22 Dec 2007 18:56:53 +0000 (18:56 +0000)]
fec_mpc52xx: write in C...
If you need to find a difference between addresses of two
struct members, subtract offsetof() or cast addresses to
char * and subtract those if you prefer it that way. Doing
that same with s/char */u32/, OTOH...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sat, 22 Dec 2007 18:56:13 +0000 (18:56 +0000)]
3c574 and 3c589 endianness fixes (.24?)
Both store MAC address in CIS; there's no decoder for that
type (0x88) so the drivers work with raw data. It is
byteswapped, so ntohs() works for little-endian, but for
big-endian it's wrong. ntohs(le16_to_cpu()) does the
right thing on both (and always expands to swab16()).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sat, 22 Dec 2007 18:55:29 +0000 (18:55 +0000)]
rrunner: use offsetof() instead of homegrown insanity
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sat, 22 Dec 2007 18:55:39 +0000 (18:55 +0000)]
r8169 endianness
missing conversions in a couple of places
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sat, 22 Dec 2007 18:11:18 +0000 (18:11 +0000)]
dl2k endianness fixes (.24 fodder?)
* shift before cpu_to_le64(), not after it
* writel() converts to l-e itself
* misc missing conversions
* in set_multicast() hash_table[] is host-endian; we feed it to card
via writel() and populate it as host-endian, so we'd better put the
first element into it also in host-endian
* pci_unmap_single() et.al. expect host-endian, not little-endian
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sat, 22 Dec 2007 17:53:02 +0000 (17:53 +0000)]
yellowfin: annotations and fixes (.24 fodder?)
pci_unmap_single() and friends getting a little-endian address...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sat, 22 Dec 2007 17:42:36 +0000 (17:42 +0000)]
asix fixes
* usb_control_message() to/from stack (breaks on e.g. arm); some
places did kmalloc() for buffer, some just worked from stack.
Added kmalloc()/memcpy()/kfree() in asix_read_cmd()/asix_write_cmd(),
removed that crap from callers.
* Fixed a leak in ax88172_bind() - on success it forgot to kfree() the
buffer.
* Endianness bug in ax88178_bind() - we read a word from eeprom and work with
it without converting to host-endian
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sat, 22 Dec 2007 17:27:24 +0000 (17:27 +0000)]
cycx: annotations and fixes (.24 fodder?)
skb->protocol is net-endian, TYVM...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Fri, 21 Dec 2007 06:21:14 +0000 (06:21 +0000)]
typhoon: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Fri, 21 Dec 2007 06:21:03 +0000 (06:21 +0000)]
typhoon: memory corruptor on big-endian if TSO is enabled
txlo_dma_addr should be host-endian; we pass it to typhoon_tso_fill(),
which does arithmetics on it, converts to l-e and passes it to card.
Unfortunately, we forgot le32_to_cpu() when initializing it from
face->txLoAddr, which sits in shared memory and is little-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Fri, 21 Dec 2007 06:20:53 +0000 (06:20 +0000)]
typhoon: missed rx overruns on big-endian
rxBuffCleared is little-endian; we miss le32_to_cpu() in checks for
rx ring overruns.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Fri, 21 Dec 2007 06:20:43 +0000 (06:20 +0000)]
typhoon: set_settings broken on big-endian
One cpu_to_le16() too many when passing argument for TYPHOON_CMD_XCVR_SELECT;
we end up passing host-endian while the hardware expects little-endian. The
other place doing that (typhoon_start_runtime()) does the right thing, so the
card will recover at the next ifconfig up/tx timeout/resume, which limits the
amount of mess, but still, WTF?
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Fri, 21 Dec 2007 06:20:33 +0000 (06:20 +0000)]
typhoon: missing le32_to_cpu() in get_drvinfo
in typhoon_get_drvinfo() .parm2 is little-endian; not critical
since we just get the firmware id flipped in get_drvinfo output
on big-endian boxen, but...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Fri, 21 Dec 2007 06:20:23 +0000 (06:20 +0000)]
typhoon: endianness bug in tx/rx byte counters
txBytes and rxBytesGood are both 64bit; using le32_to_cpu() won't work
on big-endian for obvious reasons.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Linus Torvalds [Fri, 21 Dec 2007 23:52:24 +0000 (15:52 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (23 commits)
[IPV4]: OOPS with NETLINK_FIB_LOOKUP netlink socket
[NET]: Fix function put_cmsg() which may cause usr application memory overflow
[ATM]: Spelling fixes
[NETFILTER] ipv4: Spelling fixes
[NETFILTER]: Spelling fixes
[SCTP]: Spelling fixes
[NETLABEL]: Spelling fixes
[PKT_SCHED]: Spelling fixes
[NET] net/core/: Spelling fixes
[IPV6]: Spelling fixes
[IRDA]: Spelling fixes
[DCCP]: Spelling fixes
[NET] include/net/: Spelling fixes
[NET]: Correct two mistaken skb_reset_mac_header() conversions.
[IPV4] ip_gre: set mac_header correctly in receive path
[XFRM]: Audit function arguments misordered
[IPSEC]: Avoid undefined shift operation when testing algorithm ID
[IPV4] ARP: Remove not used code
[TG3]: Endianness bugfix.
[TG3]: Endianness annotations.
...
Linus Torvalds [Fri, 21 Dec 2007 23:52:01 +0000 (15:52 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC32]: Spelling fixes
[SPARC64]: Spelling fixes
[SPARC64]: Fix OOPS in dma_sync_*_for_device()
Christoph Lameter [Fri, 21 Dec 2007 22:37:37 +0000 (14:37 -0800)]
SLUB: Improve hackbench speed
Increase the mininum number of partial slabs to keep around and put
partial slabs to the end of the partial queue so that they can add
more objects.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Denis V. Lunev [Fri, 21 Dec 2007 10:01:53 +0000 (02:01 -0800)]
[IPV4]: OOPS with NETLINK_FIB_LOOKUP netlink socket
[ Regression added by changeset:
cd40b7d3983c708aabe3d3008ec64ffce56d33b0
[NET]: make netlink user -> kernel interface synchronious
-DaveM ]
nl_fib_input re-reuses incoming skb to send the reply. This means that this
packet will be freed twice, namely in:
- netlink_unicast_kernel
- on receive path
Use clone to send as a cure, the caller is responsible for kfree_skb on error.
Thanks to Alexey Dobryan, who originally found the problem.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Fri, 21 Dec 2007 01:25:48 +0000 (17:25 -0800)]
Linux 2.6.24-rc6
Linus Torvalds [Fri, 21 Dec 2007 01:02:37 +0000 (17:02 -0800)]
Merge git://git./linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
x86: intel_cacheinfo.c: cpu cache info entry for Intel Tolapai
x86: fix die() to not be preemptible
Linus Torvalds [Fri, 21 Dec 2007 01:02:22 +0000 (17:02 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
[XFS] Initialise current offset in xfs_file_readdir correctly
[XFS] Fix mknod regression
Lachlan McIlroy [Fri, 21 Dec 2007 00:00:23 +0000 (11:00 +1100)]
[XFS] Initialise current offset in xfs_file_readdir correctly
After reading the directory contents into the temporary buffer, we grab
each dirent and pass it to filldir witht eh current offset of the dirent.
The current offset was not being set for the first dirent in the temporary
buffer, which coul dresult in bad offsets being set in the f_pos field
result in looping and duplicate entries being returned from readdir.
SGI-PV: 974905
SGI-Modid: xfs-linux-melb:xfs-kern:30282a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Christoph Hellwig [Thu, 20 Dec 2007 23:58:56 +0000 (10:58 +1100)]
[XFS] Fix mknod regression
This was broken by my '[XFS] simplify xfs_create/mknod/symlink prototype',
which assigned the re-shuffled ondisk dev_t back to the rdev variable in
xfs_vn_mknod. Because of that i_rdev is set to the ondisk dev_t instead of
the linux dev_t later down the function.
Fortunately the fix for it is trivial: we can just remove the assignment
because xfs_revalidate_inode has done the proper job before unlocking the
inode.
SGI-PV: 974873
SGI-Modid: xfs-linux-melb:xfs-kern:30273a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Jason Gaston [Fri, 21 Dec 2007 00:27:19 +0000 (01:27 +0100)]
x86: intel_cacheinfo.c: cpu cache info entry for Intel Tolapai
This patch adds a cpu cache info entry for the Intel Tolapai cpu.
Signed-off-by: Jason Gaston <jason.d.gaston@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Ingo Molnar [Fri, 21 Dec 2007 00:27:19 +0000 (01:27 +0100)]
x86: fix die() to not be preemptible
Andrew "Eagle Eye" Morton noticed that we use raw_local_save_flags()
instead of raw_local_irq_save(flags) in die(). This allows the
preemption of oopsing contexts - which is highly undesirable. It also
causes CONFIG_DEBUG_PREEMPT to complain, as reported by Miles Lane.
this bug was introduced via:
commit
39743c9ef717fd4f2b5583f010115c5f2482b8ae
Author: Andi Kleen <ak@suse.de>
Date: Fri Oct 19 20:35:03 2007 +0200
x86: use raw locks during oopses
- spin_lock_irqsave(&die.lock, flags);
+ __raw_spin_lock(&die.lock);
+ raw_local_save_flags(flags);
that is not a correct open-coding of spin_lock_irqsave(): both the
ordering is wrong (irqs should be disabled _first_), and the wrong
flags-saving API was used.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Wei Yongjun [Thu, 20 Dec 2007 22:36:44 +0000 (14:36 -0800)]
[NET]: Fix function put_cmsg() which may cause usr application memory overflow
When used function put_cmsg() to copy kernel information to user
application memory, if the memory length given by user application is
not enough, by the bad length calculate of msg.msg_controllen,
put_cmsg() function may cause the msg.msg_controllen to be a large
value, such as 0xFFFFFFF0, so the following put_cmsg() can also write
data to usr application memory even usr has no valid memory to store
this. This may cause usr application memory overflow.
int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
{
struct cmsghdr __user *cm
= (__force struct cmsghdr __user *)msg->msg_control;
struct cmsghdr cmhdr;
int cmlen = CMSG_LEN(len);
~~~~~~~~~~~~~~~~~~~~~
int err;
if (MSG_CMSG_COMPAT & msg->msg_flags)
return put_cmsg_compat(msg, level, type, len, data);
if (cm==NULL || msg->msg_controllen < sizeof(*cm)) {
msg->msg_flags |= MSG_CTRUNC;
return 0; /* XXX: return error? check spec. */
}
if (msg->msg_controllen < cmlen) {
~~~~~~~~~~~~~~~~~~~~~~~~
msg->msg_flags |= MSG_CTRUNC;
cmlen = msg->msg_controllen;
}
cmhdr.cmsg_level = level;
cmhdr.cmsg_type = type;
cmhdr.cmsg_len = cmlen;
err = -EFAULT;
if (copy_to_user(cm, &cmhdr, sizeof cmhdr))
goto out;
if (copy_to_user(CMSG_DATA(cm), data, cmlen - sizeof(struct cmsghdr)))
goto out;
cmlen = CMSG_SPACE(len);
~~~~~~~~~~~~~~~~~~~~~~~~~~~
If MSG_CTRUNC flags is set, msg->msg_controllen is less than
CMSG_SPACE(len), "msg->msg_controllen -= cmlen" will cause unsinged int
type msg->msg_controllen to be a large value.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
msg->msg_control += cmlen;
msg->msg_controllen -= cmlen;
~~~~~~~~~~~~~~~~~~~~~
err = 0;
out:
return err;
}
The same promble exists in put_cmsg_compat(). This patch can fix this
problem.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:05:37 +0000 (14:05 -0800)]
[ATM]: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:05:03 +0000 (14:05 -0800)]
[NETFILTER] ipv4: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:04:24 +0000 (14:04 -0800)]
[NETFILTER]: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:03:52 +0000 (14:03 -0800)]
[SCTP]: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:03:11 +0000 (14:03 -0800)]
[NETLABEL]: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:02:40 +0000 (14:02 -0800)]
[PKT_SCHED]: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:02:06 +0000 (14:02 -0800)]
[NET] net/core/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:01:35 +0000 (14:01 -0800)]
[IPV6]: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 22:00:51 +0000 (14:00 -0800)]
[IRDA]: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Thu, 20 Dec 2007 21:59:39 +0000 (13:59 -0800)]
[DCCP]: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>