Seung-Woo Kim [Fri, 22 Dec 2017 06:37:02 +0000 (15:37 +0900)]
mmc: core: remove build warning caused by sprd bsp
During sprd bsp, not used function is added and it causes unused
function build warning. Remove the build warning by removing the
function.
Change-Id: Id3cea904edca1c41413c28f0c831617b5385af25
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Fri, 22 Dec 2017 06:35:33 +0000 (15:35 +0900)]
mmc: sprd : remove build warnings
Remove build warnings including unused-variable, unused-label and
int-conversion.
Change-Id: I171d21f8fada70b27291730444ae82a5883fff0c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Fri, 22 Dec 2017 04:37:18 +0000 (13:37 +0900)]
misc: mdbg: remove build warnings
Remove build warnings in sprd mdbg misc driver.
Change-Id: Ic2a06079da18f04252eeea8005e2ec6088de5c6a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Fri, 22 Dec 2017 04:36:40 +0000 (13:36 +0900)]
misc: sprd: remove build warnings
Remove build warnings in sprd misc drivers.
Change-Id: I6d307506a956cbae56841f50a39f8fc59bc9c21e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Fri, 22 Dec 2017 04:34:47 +0000 (13:34 +0900)]
regulator: core: remove build warning caused by sprd bsp
From sprd bsp, regulator_init_complete() is fixed not to be called
and it causes unused function build waring. Remove the build warning.
Change-Id: I63d26fbe9b22d4bb4467f859d2ad762998be0931
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Fri, 22 Dec 2017 04:33:50 +0000 (13:33 +0900)]
ion/sprd: remove build warning
Remove unused variable build warning.
Change-Id: Id630226984ac3eb379a973be5a42448f2da90cf8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Jonathan Hamilton [Fri, 8 Feb 2013 21:05:38 +0000 (13:05 -0800)]
base: sync: Include seq_file.h in sync.h
sync.h uses struct seq_file in some function table prototypes. This
causes compile failures when including the header in files that do not
otherwise include seq_file.h
Signed-off-by: Jonathan Hamilton <jonathan.hamilton@imgtec.com>
[sw0312.kim: cherry-pick the commit
d37806bb7617 from https://android.googlesource.com/kernel/common to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I42183b09a64e26d57c5f176757f691378ffd578e
Seung-Woo Kim [Thu, 21 Dec 2017 06:32:41 +0000 (15:32 +0900)]
thermal: sprd: remove build warnings
Remove build warnings including unused-function, unused-variable,
incompatible-pointer-types and int-conversion.
Change-Id: Iae52665eb828e1b958c0a34970a2b3152b0699eb
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Thu, 21 Dec 2017 05:10:25 +0000 (14:10 +0900)]
serial: sprd: remove build warning
Remove build warnings including unused variable, unused function
and implicit pointer use from integer.
Change-Id: I9d2326cedfaeadd4de23d6fcd7a4d6d133ffdaac
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Thu, 21 Dec 2017 04:53:17 +0000 (13:53 +0900)]
backlight: ktd3102: remove build warnings
Remove build warnings caused from unused variable and non declared
struct.
Change-Id: I28b7cbd9cf166122583ce98f27769851bb85c12b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 20 Dec 2017 10:30:40 +0000 (19:30 +0900)]
media: sprd_isp: remove build warnings
Remove build warnings including wrong print format, unused function,
and unused variable.
Change-Id: I21b97f3b98c9039126038c075ddb36ceaea09200
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 20 Dec 2017 09:55:13 +0000 (18:55 +0900)]
platform/sprd: remove build warnings
Remove build warnings from sprd platform drivers.
Change-Id: Ifd838abc5d012a908e94fdeec0ec320667a7e9d5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 20 Dec 2017 09:54:13 +0000 (18:54 +0900)]
media: sprd_dcam: remove build warnings
Remove build warnings.
Change-Id: Iecca7b0767d47abb01e444b9a34d861917e5e149
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 20 Dec 2017 05:03:49 +0000 (14:03 +0900)]
fbdev: sprd: fix wrong sscanf() parameters
There were several wrong sscanf() parameter usages. Fix the wrong
parameters.
Note: "%s" format for sscanf() of kernel is required char * but it
was assigned char **, but strangely, both cases are fine on runtime.
Change-Id: I9c77a71f7c26fe25935c2633a5806291c537d181
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 20 Dec 2017 05:02:46 +0000 (14:02 +0900)]
fbdev: sprd: remove build warnings
Remove build warnings.
Change-Id: I6755843fe76058c42811fbbbf86d38e8dae9aaf3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 20 Dec 2017 01:23:03 +0000 (10:23 +0900)]
media: sprd_sensor: fix wrong parameter on device_destroy()
There are wrong parameter usages for device_destroy() in error path. Fix
the wrong parameter with proper dev->devt element.
Change-Id: I4df6a5a1fefe9cd6884b9b1ef220648e1176587e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 20 Dec 2017 01:21:55 +0000 (10:21 +0900)]
media: sprd_sensor: remove build warnings
Remoev build warnings.
Change-Id: I7ed9a94c98f99a82349cad38263c56375fbc1b44
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 19 Dec 2017 09:25:04 +0000 (18:25 +0900)]
iommu: sprd: remove build warnings
Remove build warnings including wrong casting, shift warning and
unused variable.
Change-Id: I8c9517725db3c59e0a3f5380543ae0aca93fda57
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 19 Dec 2017 04:04:47 +0000 (13:04 +0900)]
gpio/sprd-eic: remove build warning
Remove build warning because of no return check.
Change-Id: Idd46626118be4c76a22ecdd3cdb69e40cb549242
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 19 Dec 2017 01:54:18 +0000 (10:54 +0900)]
sprd/sipc: fix wrong double pointer usage
There is wrong converting double pointer to pointer. Fix the wrong
double pointer usage.
NOTE: sipc is built-in module, so the remove callback is not really
called and this does not really change operation flow.
Change-Id: I5f035c9e12003fdd1d0799f712fd6b450e101124
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 19 Dec 2017 01:51:39 +0000 (10:51 +0900)]
sprd/sipc: remove build warnings
Remove build warnings including wrong printing format and wrong cast.
Change-Id: If3ba9d58eab7bfa6a269934aedf1ba700692aafd
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Mon, 18 Dec 2017 09:27:44 +0000 (18:27 +0900)]
sprd/iq: remove build warning
Remove unused variable build warning.
Change-Id: I29c0b76b872c3f075c0493231aa6ad03920126cc
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Mon, 18 Dec 2017 09:26:18 +0000 (18:26 +0900)]
power: fuel_gauge: sprd2713: remove build warning
Remove wrong print format build warning.
Change-Id: I88964cebce54476dfc2baaa4f41085ae4fc90a6f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Mon, 18 Dec 2017 09:24:04 +0000 (18:24 +0900)]
ARM: mach-sc: remove cast to pointer from integer of different size
Remove build warnings from cast to pointer from integer of different size.
Change-Id: I8ac8ec85f07df647b850a12e0bf54e81e6fe66ec
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Mon, 18 Dec 2017 09:22:19 +0000 (18:22 +0900)]
hwspinlock/sprd: remove build warnings
Remove unused functions build warnings.
Change-Id: I9181643757dc7a562c81a3ea7c204e5c06df8202
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Mon, 18 Dec 2017 09:19:41 +0000 (18:19 +0900)]
drm/sprd: remove build warnings
Remove build warnings including unsed variables, unused functions,
and wrong print formats.
Change-Id: I8483b364d26e959b0736c0723849df078c06c7a5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Paul Gortmaker [Mon, 23 Mar 2015 18:03:17 +0000 (14:03 -0400)]
smack: Fix gcc warning from unused smack_syslog_lock mutex in smackfs.c
In commit
00f84f3f2e9d088f06722f4351d67f5f577abe22 ("Smack: Make the
syslog control configurable") this mutex was added, but the rest of
the final commit never actually made use of it, resulting in:
In file included from include/linux/mutex.h:29:0,
from include/linux/notifier.h:13,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:821,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from include/linux/security.h:27,
from security/smack/smackfs.c:21:
security/smack/smackfs.c:63:21: warning: ‘smack_syslog_lock’ defined but not used [-Wunused-variable]
static DEFINE_MUTEX(smack_syslog_lock);
^
A git grep shows no other instances/references to smack_syslog_lock.
Delete it, assuming that the mutex addition was just a leftover from
an earlier work in progress version of the change.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
[sw0312.kim: backport from mainline commit
f43b65bad6d5 to remove build warning cuased by backported commit]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id1a38438a4f11f0cf4dff7cbf94e567a90de88fe
Casey Schaufler [Mon, 23 Dec 2013 19:07:10 +0000 (11:07 -0800)]
Smack: Make the syslog control configurable
The syslog control requires that the calling proccess
have the floor ("_") Smack label. Tizen does not run any
processes except for kernel helpers with the floor label.
This changes allows the admin to configure a specific
label for syslog. The default value is the star ("*")
label, effectively removing the restriction. The value
can be set using smackfs/syslog for anyone who wants
a more restrictive behavior.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[sw0312.kim: backport from mainline commit
00f84f3f2e9d to support non-root user dlog]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I030b6a271020c1ff9aa79538afb753fed3d7289e
Jaechul Lee [Tue, 21 Nov 2017 04:48:05 +0000 (13:48 +0900)]
input: headset-sprd: Fixed build warnings
Fix build warnings unused-variable, declaration-after-statement
Change-Id: I2fd8b90ea483fbbe39d568d03b38b9fc7f1b349d
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Peter Zijlstra [Wed, 30 Oct 2013 20:16:22 +0000 (21:16 +0100)]
perf: Fix arch_perf_out_copy_user default
The arch_perf_output_copy_user() default of
__copy_from_user_inatomic() returns bytes not copied, while all other
argument functions given DEFINE_OUTPUT_COPY() return bytes copied.
Since copy_from_user_nmi() is the odd duck out by returning bytes
copied where all other *copy_{to,from}* functions return bytes not
copied, change it over and ammend DEFINE_OUTPUT_COPY() to expect bytes
not copied.
Oddly enough DEFINE_OUTPUT_COPY() already returned bytes not copied
while expecting its worker functions to return bytes copied.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: will.deacon@arm.com
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/20131030201622.GR16117@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit
0a196848ca36 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: Icde4bc44cb0dc6c3ddd88398a33163e5689ed82a
Peter Zijlstra [Wed, 24 Sep 2014 11:48:42 +0000 (13:48 +0200)]
perf: Improve the perf_sample_data struct layout
This patch reorders fields in the perf_sample_data struct in order to
minimize the number of cachelines touched in perf_sample_data_init().
It also removes some intializations which are redundant with the code
in kernel/events/core.c
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1411559322-16548-7-git-send-email-eranian@google.com
Cc: cebbert.lkml@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: jolsa@redhat.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit
2565711fb7d7 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I92db818e36740e3601da3a5a00fc5973840ef8c2
Stephane Eranian [Wed, 24 Sep 2014 11:48:37 +0000 (13:48 +0200)]
perf: Add ability to sample machine state on interrupt
Enable capture of interrupted machine state for each sample.
Registers to sample are passed per event in the sample_regs_intr bitmask.
To sample interrupt machine state, the PERF_SAMPLE_INTR_REGS must be passed in
sample_type.
The list of available registers is arch dependent and provided by asm/perf_regs.h
Registers are laid out as u64 in the order of the bit order of sample_intr_regs.
This patch also adds a new ABI version PERF_ATTR_SIZE_VER4 because we extend
the perf_event_attr struct with a new u64 field.
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: cebbert.lkml@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-api@vger.kernel.org
Link: http://lkml.kernel.org/r/1411559322-16548-2-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit
60e2364e60e8 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I3127f0a78ed6d0f78b0d2db73a1c5b114322c369
Vince Weaver [Fri, 13 Dec 2013 20:52:25 +0000 (15:52 -0500)]
perf: Document the new transaction sample type
Commit
fdfbbd07e91f8fe3871 ("perf: Add generic transaction flags")
added support for PERF_SAMPLE_TRANSACTION but forgot to add documentation
for the sample type to include/uapi/linux/perf_event.h
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1312131548450.10372@pianoman.cluster.toy
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit
189b84fb5449 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I5910990525a9bc7014c9b5c3e7002e62bc6e51c5
Andi Kleen [Fri, 20 Sep 2013 14:40:39 +0000 (07:40 -0700)]
perf: Add generic transaction flags
Add a generic qualifier for transaction events, as a new sample
type that returns a flag word. This is particularly useful
for qualifying aborts: to distinguish aborts which happen
due to asynchronous events (like conflicts caused by another
CPU) versus instructions that lead to an abort.
The tuning strategies are very different for those cases,
so it's important to distinguish them easily and early.
Since it's inconvenient and inflexible to filter for this
in the kernel we report all the events out and allow
some post processing in user space.
The flags are based on the Intel TSX events, but should be fairly
generic and mostly applicable to other HTM architectures too. In addition
to various flag words there's also reserved space to report an
program supplied abort code. For TSX this is used to distinguish specific
classes of aborts, like a lock busy abort when doing lock elision.
Flags:
Elision and generic transactions (ELISION vs TRANSACTION)
(HLE vs RTM on TSX; IBM etc. would likely only use TRANSACTION)
Aborts caused by current thread vs aborts caused by others (SYNC vs ASYNC)
Retryable transaction (RETRY)
Conflicts with other threads (CONFLICT)
Transaction write capacity overflow (CAPACITY WRITE)
Transaction read capacity overflow (CAPACITY READ)
Transactions implicitely aborted can also return an abort code.
This can be used to signal specific events to the profiler. A common
case is abort on lock busy in a RTM eliding library (code 0xff)
To handle this case we include the TSX abort code
Common example aborts in TSX would be:
- Data conflict with another thread on memory read.
Flags: TRANSACTION|ASYNC|CONFLICT
- executing a WRMSR in a transaction. Flags: TRANSACTION|SYNC
- HLE transaction in user space is too large
Flags: ELISION|SYNC|CAPACITY-WRITE
The only flag that is somewhat TSX specific is ELISION.
This adds the perf core glue needed for reporting the new flag word out.
v2: Add MEM/MISC
v3: Move transaction to the end
v4: Separate capacity-read/write and remove misc
v5: Remove _SAMPLE. Move abort flags to 32bit. Rename
transaction to txn
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1379688044-14173-2-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit
fdfbbd07e91f to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I8a6349c860fa7a4d6e085e52452e44f729042aba
Adrian Hunter [Tue, 27 Aug 2013 08:23:07 +0000 (11:23 +0300)]
perf: make events stream always parsable
The event stream is not always parsable because the format of a sample
is dependent on the sample_type of the selected event. When there is
more than one selected event and the sample_types are not the same then
parsing becomes problematic. A sample can be matched to its selected
event using the ID that is allocated when the event is opened.
Unfortunately, to get the ID from the sample means first parsing it.
This patch adds a new sample format bit PERF_SAMPLE_IDENTIFER that puts
the ID at a fixed position so that the ID can be retrieved without
parsing the sample. For sample events, that is the first position
immediately after the header. For non-sample events, that is the last
position.
In this respect parsing samples requires that the sample_type and ID
values are recorded. For example, perf tools records struct
perf_event_attr and the IDs within the perf.data file. Those must be
read first before it is possible to parse samples found later in the
perf.data file.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Stephane Eranian <eranian@google.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1377591794-30553-6-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[inki.dae: backport mainline commit
ff3d527cebc1 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I073f77c98152300fe594233de4f0ce998d511890
Peter Zijlstra [Fri, 23 Jan 2015 11:24:14 +0000 (12:24 +0100)]
perf: Fix event->ctx locking
commit
f63a8daa5812afef4f06c962351687e1ff9ccb2b upstream.
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
event->ctx, the RCU use makes it very hard.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20150123125834.209535886@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[sw0312.kim: backport the commit
18163dd15627 from linux-3.16.y to fix CVE-2016-6787 and CVE-2016-6788]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I058da6e62db2ce7166aad2b87a60929d6d56b4d3
Andy Lutomirski [Thu, 30 Jul 2015 21:31:32 +0000 (14:31 -0700)]
x86/ldt: Make modify_ldt synchronous
commit
37868fe113ff2ba814b3b4eb12df214df555f8dc upstream.
modify_ldt() has questionable locking and does not synchronize
threads. Improve it: redesign the locking and synchronize all
threads' LDTs using an IPI on all modifications.
This will dramatically slow down modify_ldt in multithreaded
programs, but there shouldn't be any multithreaded programs that
care about modify_ldt's performance in the first place.
This fixes some fallout from the CVE-2015-5157 fixes.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: security@kernel.org <security@kernel.org>
Cc: xen-devel <xen-devel@lists.xen.org>
Link: http://lkml.kernel.org/r/4c6978476782160600471bd865b318db34c7b628.1438291540.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[ luis: backported to 3.16:
- dropped changes to comments in switch_mm()
- included asm/mmu_context.h in perf_event.c
- adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
[sw0312.kim: backport the commit
b29f804421c4 from linux-3.16.y to fix CVE-2015-5157]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I189a166480ae8b758e9b992c87a1e7ff7fb8c2ad
Jaechul Lee [Mon, 20 Nov 2017 01:08:19 +0000 (10:08 +0900)]
media: radio: sprd: Fixed build warnings
Fixed build warnings Wunused-variable
Change-Id: I297d9fdde5168e7851b77b1830e64b1ebabcdaf7
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Wook Song [Mon, 13 Nov 2017 04:05:07 +0000 (13:05 +0900)]
misc: clk_mon: Remove some of build warnings
This patch removes build warnings caused by differences between
expected function argument type and actual passed function argument and
the build warning caused by a variable declaration in the middle of
code. Note that the build warning introduced by -Wframe-larger-than
remains.
Change-Id: Ia59d6c978a3692757833778bdc65a225c864713e
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Mon, 13 Nov 2017 02:38:06 +0000 (11:38 +0900)]
leds: sm5701: Remove build warnings
This patch remove build warnings caused by wrong usage of the
container_of macro.
Change-Id: I76d9e74300a85fd864b2e93caf7429588df90d04
Signed-off-by: Wook Song <wook16.song@samsung.com>
Jaechul Lee [Mon, 13 Nov 2017 02:28:51 +0000 (11:28 +0900)]
ASoC: sprd: Remove build warnings
Add __maybe_unused for fixing Wunused-function.
Change-Id: I90c9bd1b0e07fcd5be498acae051afc02dff4d13
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Jaechul Lee [Mon, 13 Nov 2017 02:25:49 +0000 (11:25 +0900)]
ALSA: drivers: Remove build warnings
Remove build warnings like Wunused-variable, Wdiscarded-qualifiers.
Change-Id: I90c58e93f571af03aba322d989691bf2872c784f
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Peter Kümmel [Tue, 4 Nov 2014 11:01:59 +0000 (12:01 +0100)]
kconfig: Fix warning "‘jump’ may be used uninitialized"
Warning:
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
jump->offset = strlen(r->s);
Simplifies the test logic because (head && local) means (jump != 0)
and makes GCC happy when checking if the jump pointer was initialized.
Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
[sw0312.kim: cherry-pick from mainline commit
2d5603060967 to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I8b834f68f6e4d1637e001991feb6708e85d4ea00
Wook Song [Fri, 10 Nov 2017 08:25:30 +0000 (17:25 +0900)]
Input: keyboard: tc350-touchkey: Remove a build warning
This patch removes a build warning caused by a unused variable.
Change-Id: Ib89f0b36a5e443466698d6fa45939ef716dab393
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Fri, 10 Nov 2017 07:59:47 +0000 (16:59 +0900)]
Input: keyboard: sc_keypad: Remove build warnings
This patch removes build warnings caused by differences between expected
function argument type and actual passed function argument type. In
addition, several build warnings introduced by unused
variables/functions and type conversions without cast are removed.
Change-Id: I612420f1cb900ba79c58d2a5980e49b80e9a0386
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Fri, 10 Nov 2017 07:25:05 +0000 (16:25 +0900)]
Input: keyboard: sprd_eic: Remove build warnings
This patch removes build warnings caused by passing wrong pointer type
as a function argument type. The build warnings caused by unused
variables/functions, and variable declarations in the middle of code are
also removed.
Change-Id: I7cadc6ed8cd8763e5773652e9f4d8cb0e7f46cdb
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Fri, 10 Nov 2017 02:22:55 +0000 (11:22 +0900)]
usb: dwc_otg: Remove build warnings
This patch removes build warnings caused by type conversions without
cast, unused variables/functions, wrong printk format strings, 'return'
with a value in function returning void, and ignorance of return value
of several functions.
Change-Id: Icbb1b40984f6ad3f78a3a921320fdf7660e4f7d2
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Fri, 10 Nov 2017 00:38:40 +0000 (09:38 +0900)]
mfd: sm5701: Remove build warnings
This patch removes build warnings caused by non-existent function
argument type, unused function, and wrong printk format strings.
Change-Id: I7ceb213b3326e261e2a7ddeb4fc2e78d1d46db2a
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Fri, 10 Nov 2017 00:37:02 +0000 (09:37 +0900)]
mfd: sm5504: Remove build warnings
This patch removes build warnings caused by unused varibles and
functions.
Change-Id: I925a2bd95c204267106372e35080abfe0519ee44
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Thu, 9 Nov 2017 11:26:12 +0000 (20:26 +0900)]
zram: Resolve build warnings due to redefined macros
This patch removes build warnings due to redefined macros.
Change-Id: I9c7e50d5fd9bdc6de4415c4893c8041c66420147
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Thu, 9 Nov 2017 07:14:35 +0000 (16:14 +0900)]
PM / sprd: Remove build warnings
This patch removes build warnings caused by making pointers from integer
without casts, unexpected types of function arguments, unused
variables/functions, using variables without initialization, using wrong
printk format strings, and -Wreturn-type.
Change-Id: Ic08fc5384235643ebeae2bf13c9609013c781563
Signed-off-by: Wook Song <wook16.song@samsung.com>
Jaechul Lee [Thu, 9 Nov 2017 05:30:52 +0000 (14:30 +0900)]
ASoC: sprd: Remove build warnings
Fix build warnings in sprd such as redefine, -Wunused-variable,
Wparentheses, Wformat-extra-args
Change-Id: I6397abc3f9716235e87896d024f7d3fc09f7c77e
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Wook Song [Thu, 9 Nov 2017 03:14:47 +0000 (12:14 +0900)]
cpufreq: platform: sprd: Remove build warnings
This patch removes build warnings caused by unused variables/functions,
making pointer from integer without cast, and unexpected type of a
function argument.
Change-Id: I33486abad8bd8760b1cffc96a06bc0baa20fafb6
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 7 Nov 2017 09:19:33 +0000 (18:19 +0900)]
PM / load_analyzer: Remove build warnings
This patch removes build warnings caused by redefined macros and unused
variables.
Change-Id: I593b5b0e010b4fdf03d46dc8b5a74d41c5787b32
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 7 Nov 2017 02:49:04 +0000 (11:49 +0900)]
cpufreq: sprd: Remove build warnings
This patch removes build warnings introduced by unused variables, unused
functions, and -Wincompatible-pointer-types.
Change-Id: Icfc07589b52bb4d51af7e27d87e97ace1568dcd4
Signed-off-by: Wook Song <wook16.song@samsung.com>
Seung-Woo Kim [Thu, 2 Nov 2017 09:56:30 +0000 (18:56 +0900)]
autotst: remove build warnings
Remove build warnings including unused variable, redefined macro and
assignment from inger without a cast.
Change-Id: I7faf4ef345244be3f7aa626163de079fb0b2a840
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Thu, 2 Nov 2017 09:48:08 +0000 (18:48 +0900)]
wlan: sc2331: fix build warnings
Fix build warnings.
Change-Id: I0f16258795e30eaa4818127f61229d90f717f5af
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Thu, 2 Nov 2017 02:06:57 +0000 (11:06 +0900)]
usb: gadget: vserial: remove unused variable build warnings
There are build warnings about unused variable because of debug
log print function. Remove the build warnings with __maybe_unused
macro.
Change-Id: I3b0a61beb388876efab82c7fdc8ee196946ad08f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Thu, 2 Nov 2017 01:56:26 +0000 (10:56 +0900)]
usb: gadget: slp: remove build warnings
There are build warnings about incompatible pointer type and unused
function. Remove the build warnings.
Change-Id: I666cf0a172f9aa66a6dfbb06587bc6a0501cbdb5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 12:38:32 +0000 (21:38 +0900)]
battery: fix build warnings
Fix build warnings in product battery driver.
Change-Id: I532f2ee3d8401823f0d5e4c029c4c73c3d83793b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 11:43:14 +0000 (20:43 +0900)]
ARM: lib: fix build warnings in ksm optimized memcmp
With linux/limkage.h header, there are macro redefined build
warnings. Fix the build warnings by removing the header.
Change-Id: Ia9904af0f7db840b2517b8da8f25ba346835ea96
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 11:41:44 +0000 (20:41 +0900)]
ARM: mach-sc: remove build warnings
Remove build warnings with explict type conversion, modified
function pointers, and modified print formats.
Change-Id: I5f173bb04d014e1c93ea56e62374466a05e5101e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 09:13:18 +0000 (18:13 +0900)]
USB: gadget: ethernet: remove a build warning with wrong indent
Remove a build warning with wrong indent caused by product patch.
Change-Id: I7eed4229726ec4a8c0c81482684e1b6dd0f208c6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 09:09:37 +0000 (18:09 +0900)]
staging: alarm-dev: remove build warnings caused by product patch
Remove build warnings caused by product patch.
Change-Id: Ifdd6bc64b7cf420d3ef671f416ef8a111ac53563
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 09:03:47 +0000 (18:03 +0900)]
thermal: step_wise: remove build warnings caused by print log
Remove build warnings caused by product print log.
Change-Id: I7a764079539ad40cfcad1d3d6dfbb92306520ad9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 08:53:32 +0000 (17:53 +0900)]
ipv4: remove build warnings caused by product patch
Remove build warnings caused by product patch with -Wformat and
-Wunused-function.
Change-Id: I88887cd727dca4892726169eddbf46ea9bd9e22e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 08:34:11 +0000 (17:34 +0900)]
cpufreq: remove a build warning caused by product log
There is a print format mismatch build warning caused by product
log. Remove the build warning.
Change-Id: I3e8659ab6c902e281c5fbc48298c5220005a8adb
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 08:32:27 +0000 (17:32 +0900)]
cpuidle: fix mixed declaration
There is mixed declaration caused by product patch which makes
declaration-after-statement build waring. Fix the mixed declaration.
Change-Id: Ic10b2d7713a102ba06bd4994a506466268c32171
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 08:29:48 +0000 (17:29 +0900)]
cpuidle: governor: menu: remove unused-function build warning
There is unused functuon causing a build warning. Remove the
build warning by add __maybe_unused macro.
Change-Id: Ia087aecb86162418c706e69515e78e562615485d
Fixes:
df99953c42c6 ("cpuidle: governor: menu: don't use loadavg") in https://android.googlesource.com/kernel/common
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 08:14:03 +0000 (17:14 +0900)]
mm: remove build warnings caused by product patch
There are build warnings, with printing format mismatch, which are
caused by product patch. Remove the build warnings.
Change-Id: I45e86000426f461332eb05ff15be97272f46e750
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 07:56:33 +0000 (16:56 +0900)]
vfs: remove build warnings caused by product patch
There are build warnings caused by product patch. Remove the build
warnings including unused-variable and printing format mismatch.
Change-Id: I7a5ea4bb939a8f97c1f8bc5039fdf52c521d1afc
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 06:40:45 +0000 (15:40 +0900)]
PM / Sleep: remove build warnings caused by product patch
Remove build warnings caused by product patch.
Note: freeze_begin() / freeze_enter() functions are never called
with product patch.
Change-Id: I6ec93a93784a4ebb12c8e1030a419623017a7c7e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Dmitry Shmidt [Tue, 13 Jan 2015 21:52:49 +0000 (13:52 -0800)]
irq: pm: Remove unused variable
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
[sw0312.kim: cherry-pick the commit
c0d201a31f79 from https://android.googlesource.com/kernel/common to remove build warning
- to apply patch, change-id tag is adjusted]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If1ce074d6a92ff415e089df9ea023ce057c8ebd1
Seung-Woo Kim [Wed, 1 Nov 2017 06:14:07 +0000 (15:14 +0900)]
coredump: remove build warnings caused by product patch
Remove build warnings made from product patch.
Change-Id: Ic0f3778bbac6b3b19f69a7c74f796a21b6955862
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 06:04:25 +0000 (15:04 +0900)]
module: remove a build warning in product log patch
There is a build warning in product log patch. Remove the build
warning.
Change-Id: I192d3eada6857b58698dc74a6fabd06330266970
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 06:03:10 +0000 (15:03 +0900)]
CPU hotplug: remove build warnings in product log patch
There are a build warnings in product log patch. Remove the build
warnings.
Change-Id: I0c97dcc7f001ec6676c4d046962c3ff7fcad52f6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 06:01:19 +0000 (15:01 +0900)]
init: remove a build warning in product perf patch
There is a build warning caused by product perf patch. Remove
the unused-variable build warning.
Change-Id: If7ce74eef352680f7dd2b6093ff4fc335b6594e9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 05:59:02 +0000 (14:59 +0900)]
firmware_class: remove a build warning in product log patch
There is a build warning in product log patch. Remove the build
warning.
Change-Id: I7f9bdb57b27efd50a446688f9cfbe631f5602672
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 05:56:14 +0000 (14:56 +0900)]
drivers: dma-contiguous: remove build warnings caused by product patch
There are build warnings caused by product patch. Remove the build
warnings including incompatible-pointer-types, discarded-qualifiers,
and unused-variable.
Change-Id: I24ee1c977c7f93c09b36067bd8032a0777a3b465
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 01:55:33 +0000 (10:55 +0900)]
video: mdnie: add omitted semicolon to struct
The omitted semicolon in struct causes build warnings. Add the
omitted semicolon to remove build warnings.
Change-Id: Ieab07085484f79d1520d10487ff15ed0e51f0192
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 01:44:43 +0000 (10:44 +0900)]
usb: dwc_otg: fix build warnings from -Wstrict-prototypes
There are functions without parameter type, and it causes build
warning from -Wstrict-prototypes. Fix the build warnings by adding
parameter type.
Change-Id: I0b195d65e2c19727d6372310b1032a9b482412ab
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 1 Nov 2017 01:02:11 +0000 (10:02 +0900)]
ARM: sprd: fix build warnings from -Wstrict-prototypes
There are functions without parameter type, and it causes build
warning from -Wstrict-prototypes. Fix the build warnings by adding
parameter type.
Change-Id: Iad2356258d0358e8f49ca1e0ef7985e43981730a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 31 Oct 2017 08:23:09 +0000 (17:23 +0900)]
ARM: sprd: remove macro redefined build warnings
In sprd soc headers, order of header affects repeated macro
definitions and it causes many build warnings. Remove the macro
redefined build warnings by changing order of included headers.
Change-Id: I444399e693727787774b9825029aae1d773affe3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 31 Oct 2017 04:50:20 +0000 (13:50 +0900)]
ARM: SPRD: fix config type of SPRD_SYSDUMP as bool
There is config type conflict for SPRD_SYSDUMP because for arm sprd
in arch/arm/Kconfig.debug, it is tristate but for arm64 sprd in
drivers/platform/sprd/Kconfig, it is bool. Fix the config type
as bool to remove type conflict.
Change-Id: I234d18022f5eba50574ca2afe4b13d0aefed63d4
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 31 Oct 2017 06:37:32 +0000 (15:37 +0900)]
hid: fix return type of input_configured callback
The return type of input_configured callback is fixed from void to
int from header. Fix return type of input_configured callback from
hid drivers to fix build warnings.
This is partially picked from the commit
9154301a47b3
("HID: hid-input: allow input_configured callback return errors")
in mainline.
Change-Id: Id529359eb7d6d005aac28596f0ec65dde59b5564
Fixes:
5925993fe56e ("HID: Add input_register callback.") in https://android.googlesource.com/kernel/common
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Uwe Kleine-König [Wed, 24 Sep 2014 07:51:57 +0000 (08:51 +0100)]
ARM: 8160/1: drop warning about return_address not using unwind tables
The warning was introduced in 2009 (commit
4bf1fa5a34aa ([ARM] 5613/1:
implement CALLER_ADDRESSx)). The only "problem" here is that
CALLER_ADDRESSx for x > 1 returns NULL which doesn't do much harm.
The drawback of implementing a fix (i.e. use unwind tables to implement CALLER_ADDRESSx) is that much of the unwinder code would need to be marked as not
traceable.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[sw0312.kim: cherry-pick from mainline to remove build warning.]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ifd4a14efb9f891abca8e3da0a65f0635160356e8
Luis Henriques [Wed, 14 Aug 2013 22:10:06 +0000 (23:10 +0100)]
net: rfkill: Do not ignore errors from regulator_enable()
commit
dee08ab83d0378d922b67e7cf10bbec3e4ea343b upstream.
Function regulator_enable() may return an error that has to be checked.
This patch changes function rfkill_regulator_set_block() so that it checks
for the return code. Also, rfkill_data->reg_enabled is set to 'true' only
if there is no error.
This fixes the following compilation warning:
net/rfkill/rfkill-regulator.c:43:20: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[sw0312.kim: cherry-pick from linux-3.10.y to remove build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I5d8067d57941fc25945a04e10b093109d92080a0
Chanwoo Choi [Wed, 25 Oct 2017 07:55:40 +0000 (16:55 +0900)]
arm: configs: tm1: Enable HUNG_TASK_DETECT configuration
This patch just enables the HUNG_TASK_DETECT configuration
in order to catch the deadlock issue.
Change-Id: I913fca23938141ad239cfd8a8c11db4663b20b3e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Helge Deller [Mon, 19 Jun 2017 15:34:05 +0000 (17:34 +0200)]
Allow stack to grow up to address space limit
commit
bd726c90b6b8ce87602208701b208a208e6d5600 upstream.
Fix expand_upwards() on architectures with an upward-growing stack (parisc,
metag and partly IA-64) to allow the stack to reliably grow exactly up to
the address space limit given by TASK_SIZE.
Signed-off-by: Helge Deller <deller@gmx.de>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[sw0312.kim: cherry-pick from linux-3.10.y to apply CVE]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I827de17000efa8216b6aea9ffdc510e4052b3add
Hugh Dickins [Tue, 20 Jun 2017 09:10:44 +0000 (02:10 -0700)]
mm: fix new crash in unmapped_area_topdown()
commit
f4cb767d76cf7ee72f97dd76f6cfa6c76a5edc89 upstream.
Trinity gets kernel BUG at mm/mmap.c:1963! in about 3 minutes of
mmap testing. That's the VM_BUG_ON(gap_end < gap_start) at the
end of unmapped_area_topdown(). Linus points out how MAP_FIXED
(which does not have to respect our stack guard gap intentions)
could result in gap_end below gap_start there. Fix that, and
the similar case in its alternative, unmapped_area().
Cc: stable@vger.kernel.org
Fixes:
1be7107fbe18 ("mm: larger stack guard gap, between vmas")
Reported-by: Dave Jones <davej@codemonkey.org.uk>
Debugged-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[sw0312.kim: cherry-pick from linux-3.10.y to fix CVE-2017-1000364]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id45155ff188da963d152f71db3cc0a4399fd83a2
Seung-Woo Kim [Wed, 18 Oct 2017 02:05:35 +0000 (11:05 +0900)]
Revert "Revert "mm: larger stack guard gap, between vmas""
This reverts commit
670116c57e183693ceba3cc505b36664fb470c8c.
Now, swap-modules package is ready, reverts again to apply CVE
patch.
Change-Id: I205ce828ed5004a270e48d5b68932f8426a3722b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Sarah Sharp [Wed, 28 Aug 2013 16:31:04 +0000 (09:31 -0700)]
xhci: Fix warning introduced by disabling runtime PM.
The 0day build server caught a new build warning that is triggered when
CONFIG_USB_DEFAULT_PERSIST is turned on:
tree: git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git for-usb-next
head:
0730d52a86919300a39a2be37f6c140997dfb82f
commit:
c8476fb855434c733099079063990e5bfa7ecad6 [1/3] usb: xhci: Disable runtime PM suspend for quirky controllers
config: i386-randconfig-r6-0826 (attached as .config)
All warnings:
drivers/usb/host/xhci.c: In function 'xhci_free_dev':
>> drivers/usb/host/xhci.c:3560:17: warning: unused variable 'dev' [-Wunused-variable]
struct device *dev = hcd->self.controller;
^
drivers/usb/host/xhci.c: In function 'xhci_alloc_dev':
>> drivers/usb/host/xhci.c:3648:17: warning: unused variable 'dev' [-Wunused-variable]
struct device *dev = hcd->self.controller;
^
vim +/dev +3560 drivers/usb/host/xhci.c
3554 * disabled. Free any HC data structures associated with that device.
3555 */
3556 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
3557 {
3558 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
3559 struct xhci_virt_device *virt_dev;
> 3560 struct device *dev = hcd->self.controller;
3561 unsigned long flags;
3562 u32 state;
3563 int i, ret;
3564
3565 #ifndef CONFIG_USB_DEFAULT_PERSIST
3566 /*
3567 * We called pm_runtime_get_noresume when the device was attached.
3568 * Decrement the counter here to allow controller to runtime suspend
3569 * if no devices remain.
3570 */
3571 if (xhci->quirks & XHCI_RESET_ON_RESUME)
3572 pm_runtime_put_noidle(dev);
3573 #endif
3574
...
3641 /*
3642 * Returns 0 if the xHC ran out of device slots, the Enable Slot command
3643 * timed out, or allocating memory failed. Returns 1 on success.
3644 */
3645 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
3646 {
3647 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
> 3648 struct device *dev = hcd->self.controller;
3649 unsigned long flags;
3650 int timeleft;
3651 int ret;
Fix this.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Shawn Nematbakhsh <shawnn@chromium.org>
[sw0312.kim: cherry-pick from mainline to remove build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I16dccdaacd8736bf0b0169765bb4e46f6eb27fed
Jiri Slaby [Thu, 19 Feb 2015 14:20:43 +0000 (15:20 +0100)]
Bluetooth: make hci_test_bit's addr const
gcc5 warns about passing a const array to hci_test_bit which takes a
non-const pointer:
net/bluetooth/hci_sock.c: In function ‘hci_sock_sendmsg’:
net/bluetooth/hci_sock.c:955:8: warning: passing argument 2 of ‘hci_test_bit’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]
&hci_sec_filter.ocf_mask[ogf])) &&
^
net/bluetooth/hci_sock.c:49:19: note: expected ‘void *’ but argument is of type ‘const __u32 (*)[4] {aka const unsigned int (*)[4]}’
static inline int hci_test_bit(int nr, void *addr)
^
So make 'addr' 'const void *'.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
[sw0312.kim: cherry-pick from mainline to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ibedfcf6ac77d4e998a3b71fea7a613ee95ace8b2
Arnd Bergmann [Tue, 9 May 2017 19:46:57 +0000 (21:46 +0200)]
trace: fix trace_graph_ret_raw return type
As found by kernelci, an extraneous semicolon causes incorrect
behavior in one of the tracing functions:
kernel/trace/trace_output.c: In function 'trace_graph_ret_raw':
kernel/trace/trace_output.c:976:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (!trace_seq_printf(&iter->seq, "%lx %lld %lld %ld %d\n",
^~
kernel/trace/trace_output.c:982:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
return TRACE_TYPE_PARTIAL_LINE;
This removes the semicolon to make the function return success
correctly.
Link: https://kernelci.org/build/id/5910641d59b514cb17b12d4d/logs/
Fixes:
6f6f99a38132 ("trace: add non-hierarchical function_graph option")
Cc: Jamie Gennis <jgennis@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
[sw0312.kim: Cherry-pick from linux-android (https://android.googlesource.com/kernel/common) to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I1c8a2d4261e92060f12e23de3529510ac7333a01
Dan Carpenter [Tue, 18 Feb 2014 12:20:51 +0000 (15:20 +0300)]
af_packet: remove a stray tab in packet_set_ring()
At first glance it looks like there is a missing curly brace but
actually the code works the same either way. I have adjusted the
indenting but left the code the same.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[sw0312.kim: Cherry-pick from mainline to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I6cfee6fafdb5a26a13a7414eaa5ea9aca1bd593c
Tim Gardner [Thu, 28 Aug 2014 17:26:03 +0000 (11:26 -0600)]
fs: namespace: suppress 'may be used uninitialized' warnings
commit
b8850d1fa8e2f6653e57daf6d08e58c5f5eb2c85 upstream.
The gcc version 4.9.1 compiler complains Even though it isn't possible for
these variables to not get initialized before they are used.
fs/namespace.c: In function ‘SyS_mount’:
fs/namespace.c:2720:8: warning: ‘kernel_dev’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags,
^
fs/namespace.c:2699:8: note: ‘kernel_dev’ was declared here
char *kernel_dev;
^
fs/namespace.c:2720:8: warning: ‘kernel_type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags,
^
fs/namespace.c:2697:8: note: ‘kernel_type’ was declared here
char *kernel_type;
^
Fix the warnings by simplifying copy_mount_string() as suggested by Al Viro.
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[sw0312.kim: Backport from mainline to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id8e784ebc6e4300aebd883d9766fd66cb8ab76c1
Tim Gardner [Mon, 13 Oct 2014 22:54:20 +0000 (15:54 -0700)]
scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized
In file included from scripts/sortextable.c:194:0:
scripts/sortextable.c: In function `main':
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
memset(relocs, 0, relocs_size);
^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
int relocs_size;
^
In file included from scripts/sortextable.c:192:0:
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
memset(relocs, 0, relocs_size);
^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
int relocs_size;
^
gcc 4.9.1
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Jamie Iles <jamie.iles@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[sw0312.kim: cherry-pick from mainline to remove build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I3a397b65061b22c9b72b9b69327ffc72d2a974bd
Ramkumar Ramachandra [Wed, 10 Jul 2013 18:03:38 +0000 (23:33 +0530)]
scripts: remove unused function in sortextable.c
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: David Daney <david.daney@cavium.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
[sw0312.kim: cherry-pick from mainline to remove build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ib5eac1bded1efc40b2cc7e7c55b4b69dd207f580
Seung-Woo Kim [Fri, 13 Oct 2017 02:13:45 +0000 (11:13 +0900)]
Revert "mm: larger stack guard gap, between vmas"
This reverts commit
f0e0e3b1f94f68b1efc9bc94c3d9eb2d7bca4f1f.
With the CVE patch, stack_guard_page_start() and stack_guard_end()
are removed but they are currently used by swap-modules kernel
modules, so swap-modules build is failed. So temporary revert
this CVE patch until swap-modules modification.
Change-Id: Ib0d196146822ccea0a562bb5bc04f325e11bf046
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Al Viro [Fri, 7 Jul 2017 18:51:19 +0000 (14:51 -0400)]
dentry name snapshots
commit
49d31c2f389acfe83417083e1208422b4091cd9e upstream.
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same structure.
dentry must be held by the caller of take_dentry_name_snapshot(),
but may be freely dropped afterwards - the snapshot will stay
until destroyed by release_dentry_name_snapshot().
Intended use:
struct name_snapshot s;
take_dentry_name_snapshot(&s, dentry);
...
access s.name
...
release_dentry_name_snapshot(&s);
Replaces fsnotify_oldname_...(), gets used in fsnotify to obtain the name
to pass down with event.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[carnil: backport 4.9: adjust context]
[bwh: Backported to 3.16:
- External names are not ref-counted, so copy them
- Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[sw0312.kim: cherry-pick from linux-3.16.y to fix CVE-2017-7533]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ied190805c27c67c4e02dac3a1260a2eb202301b7