13 Apr, 2012
10 commits
-
RTC stores time and date in several registers. Due to the fact that
these registers can't be read instantaneously, there is a chance that
reading from counting registers gives an error of one minute, one hour,
one day, etc.To address this issue, the RTC has hardware support to copy the RTC
counting registers to static shadowed registers. The current
implementation does not use this feature, and in a stress test, we can
reproduce this error at a rate of around two times per 300000 readings.Fix the implementation to ensure that the right snapshot of time is
captured.Signed-off-by: Konstantin Shlyakhovoy
Signed-off-by: Nishanth Menon
Cc: Alessandro Zummo
Cc: Benoit Cousson
Cc: linux-omap
Acked-by: Mykola Oleksiienko
Acked-by: Oleksandr Dmytryshyn
Acked-by: Graeme Gregory
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Driver data field is a pointer, hence assigning that to an integer results
in compilation warnings.Fixes following compilation warnings:
drivers/rtc/rtc-s3c.c: In function `s3c_rtc_get_driver_data':
drivers/rtc/rtc-s3c.c:452:3: warning: return makes integer from pointer without a cast [enabled by default]
drivers/rtc/rtc-s3c.c: At top level:
drivers/rtc/rtc-s3c.c:674:3: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/rtc/rtc-s3c.c:674:3: warning: (near initialization for `s3c_rtc_dt_match[1].data') [enabled by default]
drivers/rtc/rtc-s3c.c:677:3: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/rtc/rtc-s3c.c:677:3: warning: (near initialization for `s3c_rtc_dt_match[2].data') [enabled by default]
drivers/rtc/rtc-s3c.c:680:3: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/rtc/rtc-s3c.c:680:3: warning: (near initialization for `s3c_rtc_dt_match[3].data') [enabled by default]Signed-off-by: Tushar Behera
Cc: Heiko Stuebner
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix this error:
drivers/rtc/rtc-s3c.c: At top level:
drivers/rtc/rtc-s3c.c:671:3: error: request for member `data' in something not a structure or union
drivers/rtc/rtc-s3c.c:674:3: error: request for member `data' in something not a structure or union
drivers/rtc/rtc-s3c.c:677:3: error: request for member `data' in something not a structure or union
drivers/rtc/rtc-s3c.c:680:3: error: request for member `data' in something not a structure or unionSigned-off-by: Tushar Behera
Cc: Heiko Stuebner
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add missing maintainer info for PCDP console code.
Signed-off-by: Khalid Aziz
Cc: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We should use the accessor res_counter_read_u64 for that.
Although a purely cosmetic change is sometimes better delayed, to avoid
conflicting with other people's work, we are starting to have people
touching this code as well, and reproducing the open code behavior
because that's the standard =)Time to fix it, then.
Signed-off-by: Glauber Costa
Cc: Johannes Weiner
Acked-by: Michal Hocko
Cc: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
efi_rtc_init() uses platform_driver_probe(), so there's no need to also
set efi_rtc_driver's probe member (as it won't be used anyway). This
fixes a modpost section mismatch warning (as efi_rtc_probe() validly is
__init).Signed-off-by: Jan Beulich
Cc: Matthew Garrett
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
hwclock refuses to set date/time if RTC registers contain invalid
values. Check the date/time register values at probe time and
initialize them to make hwclock happy.Signed-off-by: Andreas Dumberger
Signed-off-by: Anatolij Gustschin
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
/proc/sys/kernel/random/boot_id can be read concurrently by userspace
processes. If two (or more) user-space processes concurrently read
boot_id when sysctl_bootid is not yet assigned, a race can occur making
boot_id differ between the reads. Because the whole point of the boot id
is to be unique across a kernel execution, fix this by protecting this
operation with a spinlock.Given that this operation is not frequently used, hitting the spinlock
on each call should not be an issue.Signed-off-by: Mathieu Desnoyers
Cc: "Theodore Ts'o"
Cc: Matt Mackall
Signed-off-by: Eric Dumazet
Cc: Greg Kroah-Hartman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
action != CPU_DEAD || action != CPU_DEAD_FROZEN is always true.
Signed-off-by: Kirill A. Shutemov
Acked-by: KAMEZAWA Hiroyuki
Acked-by: Michal Hocko
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In v3.3-rc1, the global LRU was removed in commit 925b7673cce3 ("mm:
make per-memcg LRU lists exclusive"). The patch fixes up the memcg
docs.I left the swap session to someone who has better understanding of
'memory+swap'.Signed-off-by: Ying Han
Acked-by: Michal Hocko
Acked-by: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Apr, 2012
8 commits
-
Pull powerpc fixes from Benjamin Herrenschmidt:
"Fixes for two nasty regression affecting powerpc in 3.4."* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: Fix typo in runlatch code
powerpc: Fix page fault with lockdep regression -
Pull infiniband fixes from Roland Dreier:
"Fix a regression in the /sys/class/infiniband/.../rate attribute --
old kernels used to just return something, even if the underlying
value was out-of-bounds, while 3.4-rc1 returned EINVAL to userspace.
This breaks some applications that check for the error, so go back to
the old behavior."* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/core: Don't return EINVAL from sysfs rate attribute for invalid speeds
IB/mlx4: Don't return an invalid speed when a port is down -
Pull arch/tile fixes from Chris Metcalf:
"This is one important change from Srivatsa Bhat that got dropped when
I put together my pull request for -rc2, plus a trivial change to
remove a compiler warning."* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/tile: avoid unused variable warning in proc.c for tilegx
tile/CPU hotplug: Add missing call to notify_cpu_starting() -
Pull sound fixes from Takashi Iwai:
- A series of fixes for Conexant 20549 HD-audio codec chip
- A workaround for HDMI hotplug debug prints that annoyed people
- A fix for the new support of platform DAPM contexts
- Many driver-specific minor fixes* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - hide HDMI/ELD printks unless snd.debug=2
ALSA: sound/isa/sscape.c: add missing resource-release code
sound: sound/oss/msnd_pinnacle.c: add vfrees
ALSA: hda - clean up CX20549 test mixer setup
ALSA: hda - CX20549 doesn't need pin_amp_workaround.
ALSA: hda - Remove CD control from model=benq for CX20549
ALSA: hda - fix record volume controls of CX20459 ("Venice")
ALSA: hda - Rename capture sources of CX20549 to match common conventions
ALSA: hda - Fix proc output for ADC amp values of CX20549
ASoC: tegra: fix i2s compilation when !CONFIG_DEBUG_FS
ASoC: set idle_bias_off=1 for all platform DAPM contexts
ASoC: imx-audmux: Check for NULL pointer
ASoC: imx-audmux: Fix ssi port numbers in sysfs
ASoC: ak4642: fixup: mute needs +1 step
MAINTAINERS: Don't list everyone working on Wolfson drivers
MAINTAINERS: Add missing ASoC OMAP co-maintainer
ASoC: pxa: pxa2xx-i2s: add io.h for IOMEM macro
ASoC: tegra: ensure clocks are enabled when touching registers
ASoC: sgtl5000: Enable VAG when DAC/ADC up
ALSA: asihpi - fix return value of hpios_locked_mem_alloc() -
Pull media fixes from Mauro Carvalho Chehab:
- dvb core: there is a regression found when used with xine. For
whatever unknown reason, xine (and xine-lib clients) wants that the
frontend to tell what frequency he is using even before the PLL lock
(or at least, it expects a non-zero frequency).On DVB, the frequency is only actually known after a frequency
zig-zag seek, done by the DVB core. Anyway, the fix was trivial.
That solves Fedora BZ#808871.- ivtv: fix a regression when selecting the language channel
- uvc: fix a race-related crash
- it913x: fixes firmware loading
- two trivial patches (a dependency issue at a radio driver at sound
Kconfig, and a warning fix on dvb).* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] uvcvideo: Fix race-related crash in uvc_video_clock_update()
[media] Drivers/media/radio: Fix build error
[media] dvb_frontend: fix compiler warning
[media] it913x: fix firmware loading errors
[media] ivtv: Fix AUDIO_(BILINGUAL_)CHANNEL_SELECT regression
[media] dvb_frontend: regression fix: userspace ABI broken for xine -
Pull GFS2 fixes from Steven Whitehouse
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
GFS2: Allow caching of rindex glock
GFS2: Make sure rindex is uptodate before starting transactions
GFS2: use depends instead of select in kconfig
GFS2: put glock reference in error patch of read_rindex_entry -
Until we push the unaligned access support for tilegx, it's silly
to have arch/tile/kernel/proc.c generate a warning about an unused
variable. Extend the #ifdef to cover all the code and data for now.Signed-off-by: Chris Metcalf
-
This merges the 32- and 64-bit versions of the x86 strncpy_from_user()
by just rewriting it in C rather than the ancient inline asm versions
that used lodsb/stosb and had been duplicated for (trivial) differences
between the 32-bit and 64-bit versions.While doing that, it also speeds them up by doing the accesses a word at
a time. Finally, the new routines also properly handle the case of
hitting the end of the address space, which we have never done correctly
before (fs/namei.c has a hack around it for that reason).Despite all these improvements, it actually removes more lines than it
adds, due to the de-duplication. Also, we no longer export (or define)
the legacy __strncpy_from_user() function (that was defined to not do
the user permission checks), since it's not actually used anywhere, and
the user address space checks are built in to the new code.Other architecture maintainers have been notified that the old hack in
fs/namei.c will be going away in the 3.5 merge window, in case they
copied the x86 approach of being a bit cavalier about the end of the
address space.Cc: linux-arch@vger.kernel.org
Cc: Ingo Molnar
Cc: Peter Anvin"
Signed-off-by: Linus Torvalds
11 Apr, 2012
6 commits
-
keyctl_session_to_parent(task) sets ->replacement_session_keyring,
it should be processed and cleared by key_replace_session_keyring().However, this task can fork before it notices TIF_NOTIFY_RESUME and
the new child gets the bogus ->replacement_session_keyring copied by
dup_task_struct(). This is obviously wrong and, if nothing else, this
leads to put_cred(already_freed_cred).change copy_creds() to clear this member. If copy_process() fails
before this point the wrong ->replacement_session_keyring doesn't
matter, exit_creds() won't be called.Cc:
Signed-off-by: Oleg Nesterov
Acked-by: David Howells
Signed-off-by: Linus Torvalds -
Commit fe1952fc0afb9a2e4c79f103c08aef5d13db1873
"powerpc: Rework runlatch code" has a nasty typo
where it uses "TLF_RUNLATCH" instead of "_TLF_RUNLATCH"
(bit number instead of bit mask), causing some flags to
be potentially lost such as _TLF_RESTORE_SIGMASK(Brown paper bag for me ! We should be able to make
that break at compile time with a bit of magic, any
volunteer ?)Signed-off-by: Benjamin Herrenschmidt
-
This fixes builds where CONFIG_AUDIT is not defined and
CONFIG_SECURITY_SMACK=y.This got introduced by the stack-usage reducation commit 48c62af68a40
("LSM: shrink the common_audit_data data union").Signed-off-by: Kees Cook
Acked-by: Eric Paris
Signed-off-by: Linus Torvalds -
Pull dmaengine fixes from Dan Williams:
1/ regression fix for Xen as it now trips over a broken assumption
about the dma address size on 32-bit builds2/ new quirk for netdma to ignore dma channels that cannot meet
netdma alignment requirements3/ fixes for two long standing issues in ioatdma (ring size overflow)
and iop-adma (potential stack corruption)* tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
netdma: adding alignment check for NETDMA ops
ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata
ioat: ring size variables need to be 32bit to avoid overflow
iop-adma: Corrected array overflow in RAID6 Xscale(R) test.
ioat: fix size of 'completion' for Xen -
Pull sparc fixes from David Miller:
1) Build fix for LEON, from Sam Ravnborg.
2) Make the sparc side changes that go along with the infrastructure to
retry faults when blocking on a disk transfer. From Kautuk Consul.* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc32,leon: fix leon build
sparc/mm/fault_32.c: Port OOM changes to do_sparc_fault
sparc/mm/fault_64.c: Port OOM changes to do_sparc64_fault -
Pull a regulator build fix from Mark Brown:
"Fix a build warning in the anatop driver for 3.4This is a trivial rename to stop the build system complaining that
we're referencing things we shouldn't be."* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: anatop: fix 'anatop_regulator' name collision
10 Apr, 2012
16 commits
-
Pull UML fixes from Richard Weinberger.
* 'for-3.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
um: uml_setup_stubs': warning: unused variable 'pages'
um: Use asm-generic/switch_to.h
um: Disintegrate asm/system.h
um: switch cow_user.h to htobe{32,64}/betoh{32,64}
um: several x86 hw-dependent crypto modules won't build on uml
um: fix linker script generation -
Don't call i2c_enable on resume because it causes a spurious
interrupt.Signed-off-by: Kristen Carlson Accardi
Signed-off-by: Kirill A. Shutemov
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Also remove two warnings when CONFIG_SND_DEBUG is not set:
sound/pci/hda/patch_hdmi.c: In function ‘hdmi_intrinsic_event’:
sound/pci/hda/patch_hdmi.c:761:6: warning: unused variable ‘eldv’ [-Wunused-variable]
sound/pci/hda/patch_hdmi.c:760:6: warning: unused variable ‘pd’ [-Wunused-variable]Signed-off-by: Wu Fengguang
Signed-off-by: Takashi Iwai -
This patch allows caching of the rindex glock. We were previously
setting the GL_NOCACHE bit when the glock was released. That forced
the rindex inode to be invalidated, which caused us to re-read
rindex at the next access. However, it caused the glock to be
unnecessarily bounced around the cluster. This patch allows
the glock to remain cached, but it still causes the rindex to be
re-read once it has been written to by gfs2_grow.Ben and I have tested single-node gfs2_grow cases and I've tested
clustered gfs2_grow cases on my four-node cluster.Signed-off-by: Bob Peterson
Signed-off-by: Steven Whitehouse -
commit a546498f3bf9aac311c66f965186373aee2ca0b0
introduced a regression on 32-bit when irq tracing
is enabled by exposing an old bug in our irq tracing
code for exception entry.The code would save and restore some GPRs around the
calls to the C lockdep code, however, it tries to be
too smart for its own good and restores some of the
GPRs from the exception frame (as saved there on
exception entry).However, for page faults, we do replace those GPRs with
arguments to do_page_fault before we call transfer_to_handler
and so restoring from the exception frame is plain wrong in
this case.This was fine as long as we didn't touch the interrupt state
when taking page fault, but when I started doing it, it would
trigger the lockdep calls and the bug.This fixes it by cleaning up that code a bit. It did create
a small stack frame for the sake of backtraces, so let's
make it a bit bigger and use it to save and restore the
stuff we care about.Signed-off-by: Benjamin Herrenschmidt
-
At the point of this error-handling code, both regions and the dma have
been allocated, so free it as done in previous and subsequent
error-handling code.Signed-off-by: Julia Lawall
Signed-off-by: Takashi Iwai -
At the point of this error-handling code, HAVE_DSPCODEH may be undefined,
so free INITCODE and PERMCODE as done elsewhere. A jump and label are
introduced to avoid code duplication.Signed-off-by: Julia Lawall
Signed-off-by: Takashi Iwai -
Commit f02e8a6596b7 ("module: Sort exported symbols") sorts symbols
placing each of them in its own elf section. This sorting and merging
into the canonical sections are done by the linker.Unfortunately modpost to generate Module.symvers file parses vmlinux.o
(which is not linked yet) and all modules object files (which aren't
linked yet). These aren't sanitized by the linker yet. That breaks
modpost that can't detect license properly for modules.This patch makes modpost aware of the new exported symbols structure.
[ This above is a slightly corrected version of the explanation of the
problem, copied from commit 62a2635610db ("modpost: Fix modpost's
license checking V3"). That commit fixed the problem for module
object files, but not for vmlinux.o. This patch fixes modpost for
vmlinux.o. ]Signed-off-by: Frank Rowand
Signed-off-by: Alessio Igor Bogani
Signed-off-by: Linus Torvalds -
The task handoff notifier leaks task_struct since it never gets freed
after the callback returns NOTIFY_OK, which means it is responsible for
doing so.It turns out the lowmemorykiller actually doesn't need this notifier at
all. It's used to prevent unnecessary killing by waiting for a thread
to exit as a result of lowmem_shrink(), however, it's possible to do
this in the same way the kernel oom killer works by setting TIF_MEMDIE
and avoid killing if we're still waiting for it to exit.The kernel oom killer will already automatically set TIF_MEMDIE for
threads that are attempting to allocate memory that have a fatal signal.
The thread selected by lowmem_shrink() will have such a signal after the
lowmemorykiller sends it a SIGKILL, so this won't result in an
unnecessary use of memory reserves for the thread to exit.This has the added benefit that we don't have to rely on
CONFIG_PROFILING to prevent needlessly killing tasks.Reported-by: Werner Landgraf
Cc: stable@vger.kernel.org
Signed-off-by: David Rientjes
Acked-by: Colin Cross
Signed-off-by: Linus Torvalds -
Fix the following gcc complain
arch/um/kernel/skas/mmu.c: In function 'uml_setup_stubs':
arch/um/kernel/skas/mmu.c:106:16: warning: unused variable 'pages' [-Wunused-variable]Signed-Signed-off-by: Boaz Harrosh
Signed-off-by: Richard Weinberger -
Signed-off-by: Richard Weinberger
-
Signed-off-by: Richard Weinberger
Reported-by: Toralf Förster
CC: dhowells@redhat.com -
... rather than open-coding the 64bit versions. endian.h has those guys.
Signed-off-by: Al Viro
Signed-off-by: Richard Weinberger -
The scheduler depends on receiving the CPU_STARTING notification, without
which we end up into a lot of trouble. So add the missing call to
notify_cpu_starting() in the bringup code.Signed-off-by: Srivatsa S. Bhat
Signed-off-by: Chris Metcalf -
Signed-off-by: Al Viro
-
while we can't just use -U$(SUBARCH), we still need to kill idiotic define
(implicit -Di386=1), both for SUBARCH=i386 and SUBARCH=x86/CONFIG_64BIT=n
builds.Signed-off-by: Al Viro