]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoposix-timers: correctly get dying task time sample in posix_cpu_timer_schedule()
Frederic Weisbecker [Thu, 27 Jun 2013 23:50:58 +0000 (09:50 +1000)]
posix-timers: correctly get dying task time sample in posix_cpu_timer_schedule()

In order to re-arm a timer after it fired, we take a sample of the current
process or thread cputime.

If the task is dying though, we don't arm anything but we cache the
remaining timer expiration delta for further reads.

Something similar is performed in posix_cpu_timer_get() but here we forget
to take the process wide cputime sample before caching it.

As a result we are storing random stack content, leading every further
reads of that timer to return junk values.

Fix this by taking the appropriate sample in the case of process wide
timers.

This probably doesn't matter much in practice because, at this stage, the
thread is the last one in the group and we reached exit_notify().  This
implies that we called exit_itimers() and there should be no more timers
to handle for that task.

So this is likely dead code anyway but let's fix the current logic
and the warning that came along:

    kernel/posix-cpu-timers.c: In function 'posix_cpu_timer_schedule':
    kernel/posix-cpu-timers.c:1127: warning: 'now' may be used uninitialized in this function

Then we can start to think further about cleaning up that code.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoselftests: add basic posix timers selftests
Frederic Weisbecker [Thu, 27 Jun 2013 23:50:58 +0000 (09:50 +1000)]
selftests: add basic posix timers selftests

Add some initial basic tests on a few posix timers interface such as
setitimer() and timer_settime().

These simply check that expiration happens in a reasonable timeframe after
expected elapsed clock time (user time, user + system time, real time,
...).

This is helpful for finding basic breakages while hacking
on this subsystem.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoposix_cpu_timers: consolidate expired timers check
Frederic Weisbecker [Thu, 27 Jun 2013 23:50:58 +0000 (09:50 +1000)]
posix_cpu_timers: consolidate expired timers check

Consolidate the common code amongst per thread and per process timers list
on tick time.

List traversal, expiry check and subsequent updates can be shared in a
common helper.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoposix_cpu_timers: consolidate timer list cleanups
Frederic Weisbecker [Thu, 27 Jun 2013 23:50:57 +0000 (09:50 +1000)]
posix_cpu_timers: consolidate timer list cleanups

Cleaning up the posix cpu timers on task exit shares some common code
among timer list types, most notably the list traversal and expiry time
update.

Unify this in a common helper.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoposix_cpu_timer: consolidate expiry time type
Frederic Weisbecker [Thu, 27 Jun 2013 23:50:57 +0000 (09:50 +1000)]
posix_cpu_timer: consolidate expiry time type

The posix cpu timer expiry time is stored in a union of two types: a 64
bits field if we rely on scheduler precise accounting, or a cputime_t if
we rely on jiffies.

This results in quite some duplicate code and special cases to handle the
two types.

Just unify this into a single 64 bits field.  cputime_t can always fit
into it.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers-iommu-msm_iommu_devc-fix-leak-and-clean-up-error-paths-fix
Andrew Morton [Thu, 27 Jun 2013 23:50:57 +0000 (09:50 +1000)]
drivers-iommu-msm_iommu_devc-fix-leak-and-clean-up-error-paths-fix

remove now-unneeded initialization of ctx_drvdata, remove unneeded braces

Cc: David Brown <davidb@codeaurora.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Libo Chen <clbchenlibo.chen@huawei.com>
Cc: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/iommu/msm_iommu_dev.c: fix leak and clean up error paths
Libo Chen [Thu, 27 Jun 2013 23:50:56 +0000 (09:50 +1000)]
drivers/iommu/msm_iommu_dev.c: fix leak and clean up error paths

Fix two obvious problems:

1. We have registered msm_iommu_driver first, and need unregister it
   when registered msm_iommu_ctx_driver fail

2. We don`t need to kfree drvdata before kzalloc successful.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: David Brown <davidb@codeaurora.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofsnotify: update comments concerning locking scheme
Lino Sanfilippo [Thu, 27 Jun 2013 23:50:56 +0000 (09:50 +1000)]
fsnotify: update comments concerning locking scheme

There have been changes in the locking scheme of fsnotify but the comments
in the source code have not been updated yet.  This patch corrects this.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoinotify: fix race when adding a new watch
Lino Sanfilippo [Thu, 27 Jun 2013 23:50:56 +0000 (09:50 +1000)]
inotify: fix race when adding a new watch

In inotify_new_watch() the number of watches for a group is compared
against the max number of allowed watches and increased afterwards.  The
check and incrementation is not done atomically, so it is possible for
multiple concurrent threads to pass the check and increment the number of
marks above the allowed max.

This patch uses an inotify groups mark_lock to ensure that both check and
incrementation are done atomic.  Furthermore we dont have to worry about
the race that allows a concurrent thread to add a watch just after
inotify_update_existing_watch() returned with -ENOENT anymore, since this
is also synchronized by the groups mark mutex now.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodnotify: replace dnotify_mark_mutex with mark mutex of dnotify_group
Lino Sanfilippo [Thu, 27 Jun 2013 23:50:56 +0000 (09:50 +1000)]
dnotify: replace dnotify_mark_mutex with mark mutex of dnotify_group

There is no need to use a special mutex to protect against the fcntl/close
race (see dnotify.c for a description of this race).  Instead the
dnotify_groups mark mutex can be used.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofanotify: put duplicate code for adding vfsmount/inode marks into an own function
Lino Sanfilippo [Thu, 27 Jun 2013 23:50:55 +0000 (09:50 +1000)]
fanotify: put duplicate code for adding vfsmount/inode marks into an own function

The code under the groups mark_mutex in fanotify_add_inode_mark() and
fanotify_add_vfsmount_mark() is almost identical.  So put it into a
seperate function.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofanotify: fix races when adding/removing marks
Lino Sanfilippo [Thu, 27 Jun 2013 23:50:55 +0000 (09:50 +1000)]
fanotify: fix races when adding/removing marks

For both adding an event to an existing mark and destroying a mark we
first have to find it via fsnotify_find_[inode|vfsmount]_mark().  But
getting the mark and adding an event (or destroying it) is not done
atomically.  This opens a race where a thread is about to destroy a mark
while another thread still finds the same mark and adds an event to its
mask although it will be destroyed.

Another race exists concerning the excess of a groups number of marks
limit: When a mark is added the number of group marks is checked against
the max number of marks per group and increased afterwards.  Since check
and increment is also not done atomically, this may result in 2 or more
processes passing the check at the same time and increasing the number of
group marks above the allowed limit.

With this patch both races are avoided by doing the concerning operations
with the groups mark mutex locked.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofanotify: info leak in copy_event_to_user()
Dan Carpenter [Thu, 27 Jun 2013 23:50:55 +0000 (09:50 +1000)]
fanotify: info leak in copy_event_to_user()

The ->reserverd field isn't cleared so we leak one byte of stack
information to userspace.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocyber2000fb: avoid palette corruption at higher clocks
Ondrej Zary [Thu, 27 Jun 2013 23:50:54 +0000 (09:50 +1000)]
cyber2000fb: avoid palette corruption at higher clocks

When 1280x1024@75Hz mode is set, console palette is not set properly -
sometimes the background is white, sometimes yellow and text colors are
also messed up.  This does not happen at 1280x1024@60Hz and below.

It seems that the HW needs some time before setting the palette - maybe
the PLL needs more time to lock at higher speeds.  This patch fixes the
problem but without knowing what register to check for PLL lock(?), the
delay might be excessive.

On Fri, 28 Jan 2011 18:15:37 +0000
Russell King <rmk@arm.linux.org.uk> wrote:

> On Tue, Jan 18, 2011 at 01:14:24PM -0800, Andrew Morton wrote:
> > Russell, I have an (old) note here that this is awaiting an ack from
> > yourself?
>
> Well, I can reproduce this problem on the Netwinders here.  I'm not sure
> that we should delay all mode switches by one second - and any attempt
> to reduce this value does result in the palette not being set correctly.
>
> For 1280x1024-75, the dotclock is 135MHz, which gives a PLL values of
> 0x41 and 0x06.  That's: M=0x41+1, N=0x06+1, P=0x00 (top 2 bits of 0x06)
> -> Q=1
>
>  Fpll = 14.31818MHz * M / N
>  Fout = Fpll / Q
>
> The PLL itself is formed by dividing the 14-ish MHz frequency by N and
> phase comparing the output of the VCO, divided by M, and adjusting the
> VCO until the two correlate.  As VCOs typically tend to have a limited
> range, it's normal to divide the output frequency to produce a greater
> range - and in this case that's done by Q.
>
> For the 800x600-100 copied from /etc/fb.modes, this has a dotclock of
> 67.5MHz, which is exactly half this rate.  The PLL values for this are:
> M=0x41+1, N=0x06+1, P=0x01, giving PLL values of 0x41 and 0x46.
>
> Booting with 800x600-100 does not suffer the problem.  So it's not
> related to PLL lock time.  There's something else going on.
>
> Another experiment I tried was forcing the PLL values to produce 108MHz
> instead of 135MHz.  108MHz is the dotclock for 1280x1024-60.  This too
> doesn't suffer the problem.
>
> I've also tried chosing other delay values.  100ms is too short and
> produces the problem, but 1s works.  1s for a PLL to lock is a hell of
> a time, especially for a PLL operating in the MHz range.
>
> I've tried setting the PLL to a known good freqency, and then switching
> to 135MHz - the problem persists.  It's not like 135MHz is reaching the
> limits - it'll go up to 206MHz.
>
> So, I don't think this has anything to do with PLL locking.  I think
> there's something else going on which isn't immediately obvious - maybe
> bandwidth starvation preventing us from writing properly to the palette?
> As it's a horrible VGA, where you write the same register multiple times
> I wouldn't be surprised if some writes were going missing.
>
> I'll see if I can play around with it some more this evening, but I've
> spent an awful long time on just this issue already this afternoon...
>
> I think further investigation needs to happen on this patch before it's
> acceptable.  Or maybe we should prevent the cyberpro coming up in

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/acornfb.c: remove dead code
Paul Bolle [Thu, 27 Jun 2013 23:50:54 +0000 (09:50 +1000)]
drivers/video/acornfb.c: remove dead code

acornfb checks for HAS_VIDC while support for that macro was removed in
v2.6.23 (when the arm26 port was removed).  So we can remove a bit of dead
code.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/imxfb.c: make local symbols static
Sachin Kamat [Thu, 27 Jun 2013 23:50:54 +0000 (09:50 +1000)]
drivers/video/imxfb.c: make local symbols static

These symbols are used only in this file.  Make them static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/udlfb.c: make local symbol static
Sachin Kamat [Thu, 27 Jun 2013 23:50:53 +0000 (09:50 +1000)]
drivers/video/udlfb.c: make local symbol static

'dlfb_handle_damage' is used only in this file. Make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/udlfb.c: use NULL instead of 0
Sachin Kamat [Thu, 27 Jun 2013 23:50:53 +0000 (09:50 +1000)]
drivers/video/udlfb.c: use NULL instead of 0

Pointer variables should be initialized with NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/smscufx.c: use NULL instead of 0
Sachin Kamat [Thu, 27 Jun 2013 23:50:53 +0000 (09:50 +1000)]
drivers/video/smscufx.c: use NULL instead of 0

'info' is a pointer. Use NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrm/nouveau: make vga_switcheroo code depend on VGA_SWITCHEROO
Jeff Mahoney [Thu, 27 Jun 2013 23:50:52 +0000 (09:50 +1000)]
drm/nouveau: make vga_switcheroo code depend on VGA_SWITCHEROO

Commit 8116188fdef594 ("nouveau/acpi: hook up to the MXM method for mux
switching.") broke the build on non-x86 architectures due to the new
dependency on MXM and MXM being an x86 platform driver.

It built previously since the vga switcheroo registration routines were
zereod out on !X86.  The code was built in but unused.

This patch makes all of the DSM code depend on CONFIG_VGA_SWITCHEROO,
allowing it to build on non-x86 and shrinking the module size as well.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrm/cirrus: correct register values for 16bpp
Takashi Iwai [Thu, 27 Jun 2013 23:50:52 +0000 (09:50 +1000)]
drm/cirrus: correct register values for 16bpp

When the mode is set with 16bpp on QEMU, the output gets totally broken.
The culprit is the bogus register values set for 16bpp, which was likely
copied from from a wrong place.

Addresses https://bugzilla.novell.com/show_bug.cgi?id=799216

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: David Airlie <airlied@linux.ie>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrm/fb-helper: don't sleep for screen unblank when an oops is in progress
Daniel Vetter [Thu, 27 Jun 2013 23:50:52 +0000 (09:50 +1000)]
drm/fb-helper: don't sleep for screen unblank when an oops is in progress

Otherwise the system will burn even brighter and worse, leave the user
wondering what's going on exactly.

Since we already have a panic handler which will (try) to restore the
entire fbdev console mode, we can just bail out.  Inspired by a patch from
Konstantin Khlebnikov.  The callchain leading to this, cut&pasted from
Konstantin's original patch:

callstack:
panic()
bust_spinlocks(1)
unblank_screen()
vc->vc_sw->con_blank()
fbcon_blank()
fb_blank()
info->fbops->fb_blank()
drm_fb_helper_blank()
drm_fb_helper_dpms()
drm_modeset_lock_all()
mutex_lock(&dev->mode_config.mutex)

Note that the entire locking in the fb helper around panic/sysrq and kdbg
is ...  non-existant.  So we have a decent change of blowing up
everything.  But since reworking this ties in with funny concepts like the
fbdev notifier chain or the impressive things which happen around
console_lock while oopsing, I'll leave that as an exercise for braver
souls than me.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Dave Airlie <airlied@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/pcmcia/yenta_socket.c: convert to module_pci_driver
Libo Chen [Thu, 27 Jun 2013 23:50:51 +0000 (09:50 +1000)]
drivers/pcmcia/yenta_socket.c: convert to module_pci_driver

Use module_pci_driver instead of init/exit, make code clean.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/pcmcia/pd6729.c: convert to module_pci_driver
Libo Chen [Thu, 27 Jun 2013 23:50:51 +0000 (09:50 +1000)]
drivers/pcmcia/pd6729.c: convert to module_pci_driver

Use module_pci_driver instead of init/exit, make code clean.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Eric Miao <eric.y.miao.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoaudit: Fix decimal constant description
Michal Simek [Thu, 27 Jun 2013 23:50:50 +0000 (09:50 +1000)]
audit: Fix decimal constant description

Use proper decimal type for comparison with u32.

Compilation warning was introduced by 780a7654 ("audit: Make testing for a
valid loginuid explicit.")

kernel/auditfilter.c: In function 'audit_data_to_entry':
kernel/auditfilter.c:426:3: warning: this decimal constant
is unsigned only in ISO C90 [enabled by default]
   if ((f->type == AUDIT_LOGINUID) && (f->val == 4294967295)) {

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agokernel/auditfilter.c: fix leak in audit_add_rule() error path
Chen Gang [Thu, 27 Jun 2013 23:50:50 +0000 (09:50 +1000)]
kernel/auditfilter.c: fix leak in audit_add_rule() error path

If both 'tree' and 'watch' are valid we must call audit_put_tree(), just
like the preceding code within audit_add_rule().

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agokernel/auditfilter.c: fixing build warning
Raphael S. Carvalho [Thu, 27 Jun 2013 23:50:50 +0000 (09:50 +1000)]
kernel/auditfilter.c: fixing build warning

kernel/auditfilter.c:426: warning: this decimal constant is unsigned only in ISO C90

Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoaudit: fix mq_open and mq_unlink to add the MQ root as a hidden parent audit_names...
Jeff Layton [Thu, 27 Jun 2013 23:50:49 +0000 (09:50 +1000)]
audit: fix mq_open and mq_unlink to add the MQ root as a hidden parent audit_names record

The old audit PATH records for mq_open looked like this:

type=PATH msg=audit(1366282323.982:869): item=1 name=(null) inode=6777
dev=00:0c mode=041777 ouid=0 ogid=0 rdev=00:00
obj=system_u:object_r:tmpfs_t:s15:c0.c1023
type=PATH msg=audit(1366282323.982:869): item=0 name="test_mq" inode=26732
dev=00:0c mode=0100700 ouid=0 ogid=0 rdev=00:00
obj=staff_u:object_r:user_tmpfs_t:s15:c0.c1023

...with the audit related changes that went into 3.7, they now look like this:

type=PATH msg=audit(1366282236.776:3606): item=2 name=(null) inode=66655
dev=00:0c mode=0100700 ouid=0 ogid=0 rdev=00:00
obj=staff_u:object_r:user_tmpfs_t:s15:c0.c1023
type=PATH msg=audit(1366282236.776:3606): item=1 name=(null) inode=6926
dev=00:0c mode=041777 ouid=0 ogid=0 rdev=00:00
obj=system_u:object_r:tmpfs_t:s15:c0.c1023
type=PATH msg=audit(1366282236.776:3606): item=0 name="test_mq"

Both of these look wrong to me.  As Steve Grubb pointed out:

"What we need is 1 PATH record that identifies the MQ. The other PATH
 records probably should not be there."

Fix it to record the mq root as a parent, and flag it such that it should
be hidden from view when the names are logged, since the root of the mq
filesystem isn't terribly interesting.  With this change, we get a single
PATH record that looks more like this:

type=PATH msg=audit(1368021604.836:484): item=0 name="test_mq" inode=16914
dev=00:0c mode=0100644 ouid=0 ogid=0 rdev=00:00
obj=unconfined_u:object_r:user_tmpfs_t:s0

In order to do this, a new audit_inode_parent_hidden() function is added.
If we do it this way, then we avoid having the existing callers of
audit_inode needing to do any sort of flag conversion if auditing is
inactive.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reported-by: Jiri Jaburek <jjaburek@redhat.com>
Cc: Steve Grubb <sgrubb@redhat.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agox86: make 'mem=' option to work for efi platform
Wen Congyang [Thu, 27 Jun 2013 23:50:49 +0000 (09:50 +1000)]
x86: make 'mem=' option to work for efi platform

Current mem boot option only can work for non efi environment.  If the
user specifies add_efi_memmap, it cannot work for efi environment.  In the
efi environment, we call e820_add_region() to add the memory map.  So we
can modify __e820_add_region() and the mem boot option can work for efi
environment.

Note: Only E820_RAM is limited, and BOOT_SERVICES_{CODE,DATA} are always
mapped(If its address >= mem_limit, the memory won't be freed in
efi_free_boot_services()).

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Rob Landley <rob@landley.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosound/soc/codecs/si476x.c: don't use 0bNNN
Andrew Morton [Thu, 27 Jun 2013 23:50:49 +0000 (09:50 +1000)]
sound/soc/codecs/si476x.c: don't use 0bNNN

spacr64 gcc-3.4.5 (at least) spits this back.

Cc: Andrey Smirnov <andrey.smirnov@convergeddevices.net>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/platform/x86/intel_ips.c: convert to module_pci_driver
Libo Chen [Thu, 27 Jun 2013 23:50:48 +0000 (09:50 +1000)]
drivers/platform/x86/intel_ips.c: convert to module_pci_driver

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoMerge branch 'akpm-current/current'
Stephen Rothwell [Fri, 28 Jun 2013 06:27:23 +0000 (16:27 +1000)]
Merge branch 'akpm-current/current'

11 years agoMerge remote-tracking branch 'arm64-hugepages/for-next/hugepages'
Stephen Rothwell [Fri, 28 Jun 2013 06:17:57 +0000 (16:17 +1000)]
Merge remote-tracking branch 'arm64-hugepages/for-next/hugepages'

Conflicts:
arch/arm64/Kconfig
arch/arm64/include/asm/pgtable-hwdef.h
arch/arm64/include/asm/pgtable.h

11 years agoMerge remote-tracking branch 'lzo-update/lzo-update'
Stephen Rothwell [Fri, 28 Jun 2013 06:16:16 +0000 (16:16 +1000)]
Merge remote-tracking branch 'lzo-update/lzo-update'

11 years agoMerge remote-tracking branch 'clk/clk-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:14:37 +0000 (16:14 +1000)]
Merge remote-tracking branch 'clk/clk-next'

Conflicts:
drivers/clk/tegra/clk-tegra114.c

11 years agoMerge remote-tracking branch 'userns/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:12:52 +0000 (16:12 +1000)]
Merge remote-tracking branch 'userns/for-next'

11 years agoMerge remote-tracking branch 'pwm/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:11:10 +0000 (16:11 +1000)]
Merge remote-tracking branch 'pwm/for-next'

11 years agoMerge remote-tracking branch 'dma-mapping/dma-mapping-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:09:32 +0000 (16:09 +1000)]
Merge remote-tracking branch 'dma-mapping/dma-mapping-next'

11 years agoMerge remote-tracking branch 'samsung/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:09:28 +0000 (16:09 +1000)]
Merge remote-tracking branch 'samsung/for-next'

Conflicts:
arch/arm/Kconfig

11 years agoMerge remote-tracking branch 'renesas/next'
Stephen Rothwell [Fri, 28 Jun 2013 06:07:39 +0000 (16:07 +1000)]
Merge remote-tracking branch 'renesas/next'

Conflicts:
arch/arm/mach-shmobile/board-bockw.c
arch/arm/mach-shmobile/clock-r8a7778.c
arch/arm/mach-shmobile/include/mach/r8a7778.h

11 years agoMerge remote-tracking branch 'mvebu/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:07:23 +0000 (16:07 +1000)]
Merge remote-tracking branch 'mvebu/for-next'

Conflicts:
arch/arm/boot/dts/kirkwood-6281.dtsi

11 years agoMerge remote-tracking branch 'msm/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:07:00 +0000 (16:07 +1000)]
Merge remote-tracking branch 'msm/for-next'

11 years agoMerge remote-tracking branch 'imx-mxs/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:05:18 +0000 (16:05 +1000)]
Merge remote-tracking branch 'imx-mxs/for-next'

11 years agoMerge remote-tracking branch 'ep93xx/ep93xx-for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:05:16 +0000 (16:05 +1000)]
Merge remote-tracking branch 'ep93xx/ep93xx-for-next'

11 years agoMerge remote-tracking branch 'cortex/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:03:37 +0000 (16:03 +1000)]
Merge remote-tracking branch 'cortex/for-next'

11 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 06:01:21 +0000 (16:01 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
arch/arm/boot/dts/am335x-evmsk.dts
arch/arm/boot/dts/am33xx.dtsi
arch/arm/boot/dts/sun4i-a10.dtsi
arch/arm/mach-exynos/mach-universal_c210.c
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-mxs/Kconfig
arch/arm/mach-shmobile/clock-r8a7740.c
arch/arm/mach-shmobile/clock-r8a7778.c
arch/arm/mach-u300/timer.c
drivers/clocksource/dw_apb_timer_of.c
drivers/tty/serial/xilinx_uartps.c
drivers/usb/Kconfig
drivers/usb/phy/phy-rcar-usb.c
include/linux/mfd/davinci_voicecodec.h
include/linux/serial_sci.h
include/uapi/linux/serial_core.h

11 years agoMerge remote-tracking branch 'gpio-lw/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:54:41 +0000 (15:54 +1000)]
Merge remote-tracking branch 'gpio-lw/for-next'

11 years agoMerge remote-tracking branch 'gpio/gpio/next'
Stephen Rothwell [Fri, 28 Jun 2013 05:53:03 +0000 (15:53 +1000)]
Merge remote-tracking branch 'gpio/gpio/next'

11 years agoMerge remote-tracking branch 'irqdomain/irqdomain/next'
Stephen Rothwell [Fri, 28 Jun 2013 05:50:17 +0000 (15:50 +1000)]
Merge remote-tracking branch 'irqdomain/irqdomain/next'

Conflicts:
kernel/irq/irqdomain.c

11 years agoMerge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:42:29 +0000 (15:42 +1000)]
Merge remote-tracking branch 'pinctrl/for-next'

Conflicts:
drivers/net/ethernet/ti/davinci_mdio.c
drivers/pinctrl/Makefile

11 years agoMerge remote-tracking branch 'bcon/master'
Stephen Rothwell [Fri, 28 Jun 2013 05:40:12 +0000 (15:40 +1000)]
Merge remote-tracking branch 'bcon/master'

Conflicts:
drivers/block/Kconfig

11 years agoMerge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:31:46 +0000 (15:31 +1000)]
Merge remote-tracking branch 'char-misc/char-misc-next'

11 years agoMerge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:29:57 +0000 (15:29 +1000)]
Merge remote-tracking branch 'staging/staging-next'

Conflicts:
Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
drivers/staging/serqt_usb2/serqt_usb2.c
drivers/staging/silicom/bpctl_mod.c
drivers/thermal/ti-soc-thermal/ti-thermal-common.c

11 years agoMerge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:27:44 +0000 (15:27 +1000)]
Merge remote-tracking branch 'usb/usb-next'

Conflicts:
drivers/usb/chipidea/Makefile

11 years agoMerge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:25:38 +0000 (15:25 +1000)]
Merge remote-tracking branch 'tty/tty-next'

11 years agoMerge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:17:58 +0000 (15:17 +1000)]
Merge remote-tracking branch 'driver-core/driver-core-next'

Conflicts:
drivers/base/cpu.c
drivers/base/memory.c
include/linux/device.h
include/linux/platform_device.h

11 years agoMerge remote-tracking branch 'leds/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:16:19 +0000 (15:16 +1000)]
Merge remote-tracking branch 'leds/for-next'

11 years agoMerge remote-tracking branch 'regmap/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:14:33 +0000 (15:14 +1000)]
Merge remote-tracking branch 'regmap/for-next'

11 years agoMerge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:06:05 +0000 (15:06 +1000)]
Merge remote-tracking branch 'workqueues/for-next'

11 years agoMerge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 05:01:30 +0000 (15:01 +1000)]
Merge remote-tracking branch 'percpu/for-next'

11 years agoMerge remote-tracking branch 'xen-two/linux-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:54:26 +0000 (14:54 +1000)]
Merge remote-tracking branch 'xen-two/linux-next'

11 years agoMerge remote-tracking branch 'kvm/linux-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:52:39 +0000 (14:52 +1000)]
Merge remote-tracking branch 'kvm/linux-next'

Conflicts:
arch/s390/include/asm/pgtable.h

11 years agoMerge remote-tracking branch 'ftrace/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:50:33 +0000 (14:50 +1000)]
Merge remote-tracking branch 'ftrace/for-next'

11 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Fri, 28 Jun 2013 04:42:11 +0000 (14:42 +1000)]
Merge remote-tracking branch 'tip/auto-latest'

Conflicts:
arch/arm/kernel/Makefile
kernel/futex.c

11 years agoMerge remote-tracking branch 'spi-mb/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:40:09 +0000 (14:40 +1000)]
Merge remote-tracking branch 'spi-mb/for-next'

11 years agoMerge remote-tracking branch 'devicetree/devicetree/next'
Stephen Rothwell [Fri, 28 Jun 2013 04:37:22 +0000 (14:37 +1000)]
Merge remote-tracking branch 'devicetree/devicetree/next'

11 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:35:45 +0000 (14:35 +1000)]
Merge remote-tracking branch 'edac-amd/for-next'

11 years agoMerge remote-tracking branch 'trivial/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:27:22 +0000 (14:27 +1000)]
Merge remote-tracking branch 'trivial/for-next'

Conflicts:
Documentation/networking/netlink_mmap.txt

11 years agoMerge remote-tracking branch 'vfio/next'
Stephen Rothwell [Fri, 28 Jun 2013 04:25:36 +0000 (14:25 +1000)]
Merge remote-tracking branch 'vfio/next'

11 years agoMerge remote-tracking branch 'iommu/next'
Stephen Rothwell [Fri, 28 Jun 2013 04:24:00 +0000 (14:24 +1000)]
Merge remote-tracking branch 'iommu/next'

Conflicts:
drivers/iommu/Kconfig

11 years agoMerge remote-tracking branch 'watchdog/master'
Stephen Rothwell [Fri, 28 Jun 2013 04:22:22 +0000 (14:22 +1000)]
Merge remote-tracking branch 'watchdog/master'

11 years agoMerge remote-tracking branch 'lblnet/master'
Stephen Rothwell [Fri, 28 Jun 2013 04:17:58 +0000 (14:17 +1000)]
Merge remote-tracking branch 'lblnet/master'

11 years agoMerge remote-tracking branch 'selinux/master'
Stephen Rothwell [Fri, 28 Jun 2013 04:17:56 +0000 (14:17 +1000)]
Merge remote-tracking branch 'selinux/master'

11 years agoMerge remote-tracking branch 'security/next'
Stephen Rothwell [Fri, 28 Jun 2013 04:13:33 +0000 (14:13 +1000)]
Merge remote-tracking branch 'security/next'

Conflicts:
Documentation/kernel-parameters.txt

11 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:11:50 +0000 (14:11 +1000)]
Merge remote-tracking branch 'regulator/for-next'

11 years agoMerge remote-tracking branch 'omap_dss2/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:11:47 +0000 (14:11 +1000)]
Merge remote-tracking branch 'omap_dss2/for-next'

11 years agoMerge remote-tracking branch 'fbdev/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:09:43 +0000 (14:09 +1000)]
Merge remote-tracking branch 'fbdev/for-next'

Conflicts:
drivers/video/of_display_timing.c

11 years agoMerge remote-tracking branch 'battery/master'
Stephen Rothwell [Fri, 28 Jun 2013 04:08:05 +0000 (14:08 +1000)]
Merge remote-tracking branch 'battery/master'

11 years agoMerge remote-tracking branch 'mfd/master'
Stephen Rothwell [Fri, 28 Jun 2013 04:06:26 +0000 (14:06 +1000)]
Merge remote-tracking branch 'mfd/master'

11 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 04:04:46 +0000 (14:04 +1000)]
Merge remote-tracking branch 'md/for-next'

11 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:56:51 +0000 (13:56 +1000)]
Merge remote-tracking branch 'slab/for-next'

11 years agoMerge remote-tracking branch 'kgdb/kgdb-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:56:47 +0000 (13:56 +1000)]
Merge remote-tracking branch 'kgdb/kgdb-next'

11 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:55:06 +0000 (13:55 +1000)]
Merge remote-tracking branch 'mmc/mmc-next'

11 years agoMerge branch 'device-mapper/master'
Stephen Rothwell [Fri, 28 Jun 2013 03:53:10 +0000 (13:53 +1000)]
Merge branch 'device-mapper/master'

11 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:48:37 +0000 (13:48 +1000)]
Merge remote-tracking branch 'block/for-next'

Conflicts:
include/linux/cgroup.h

11 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:44:02 +0000 (13:44 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

11 years agoMerge remote-tracking branch 'input-mt/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:42:26 +0000 (13:42 +1000)]
Merge remote-tracking branch 'input-mt/for-next'

11 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Fri, 28 Jun 2013 03:40:47 +0000 (13:40 +1000)]
Merge remote-tracking branch 'input/next'

11 years agoMerge remote-tracking branch 'virtio/virtio-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:39:06 +0000 (13:39 +1000)]
Merge remote-tracking branch 'virtio/virtio-next'

11 years agoMerge remote-tracking branch 'modules/modules-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:37:30 +0000 (13:37 +1000)]
Merge remote-tracking branch 'modules/modules-next'

11 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:35:44 +0000 (13:35 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

11 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:33:42 +0000 (13:33 +1000)]
Merge remote-tracking branch 'sound/for-next'

11 years agoMerge remote-tracking branch 'drm-tegra/drm/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:32:06 +0000 (13:32 +1000)]
Merge remote-tracking branch 'drm-tegra/drm/for-next'

11 years agoMerge remote-tracking branch 'drm-intel/for-linux-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:30:27 +0000 (13:30 +1000)]
Merge remote-tracking branch 'drm-intel/for-linux-next'

Conflicts:
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/i915/intel_sdvo.c

11 years agoMerge remote-tracking branch 'drm/drm-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:22:09 +0000 (13:22 +1000)]
Merge remote-tracking branch 'drm/drm-next'

Conflicts:
drivers/gpu/drm/drm_vm.c

11 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Fri, 28 Jun 2013 03:20:29 +0000 (13:20 +1000)]
Merge remote-tracking branch 'crypto/master'

11 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Fri, 28 Jun 2013 03:18:52 +0000 (13:18 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

11 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Fri, 28 Jun 2013 03:13:55 +0000 (13:13 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

11 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Fri, 28 Jun 2013 03:12:19 +0000 (13:12 +1000)]
Merge remote-tracking branch 'bluetooth/master'

11 years agoMerge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Fri, 28 Jun 2013 03:10:15 +0000 (13:10 +1000)]
Merge remote-tracking branch 'wireless-next/master'

Conflicts:
net/wireless/nl80211.c