Linus Senior Medvedev #70

Closed
wants to merge 4,600 commits into
from
@RobertBColton

doggies2

Robin Gong and others added some commits Nov 13, 2012
Robin Gong ENGR00233366-3 CPUFREQ:add cpufreq restore back if set fail
Restore back cpu freq and regulator if set fail.

Signed-off-by: Robin Gong <b38343@freescale.com>
a538dc2
Robin Gong ENGR00233366-4 WDOG LDO_BYPASS: fix wdog2 to reset external pmic in l…
…do bypass

On Sabresd board design, the WDOG_B output to reset external pmic source from
GPIO_2 pad which can be configured as WDOG2_WDOG_B, so if in ldo bypass mode,
we should use WDOG2 reset signal to reset pmic, not WDOG1. Also, configure the
related pins.

Signed-off-by: Robin Gong <b38343@freescale.com>
c9f6d63
Robin Gong ENGR00234045 fix building error caused by ENGR00233366
Forget submit some local change...

Signed-off-by: Robin Gong <b38343@freescale.com>
326e7cd
Robby Cai ENGR00231307 csi/camera: add some ioctls
added ioctls are:
VIDIOC_ENUM_FRAMEINTERVALS
VIDIOC_ENUM_FRAMESIZES
VIDIOC_ENUM_FMT
VIDIOC_DBG_G_CHIP_IDENT

Signed-off-by: Robby Cai <R63905@freescale.com>
b957623
Robby Cai ENGR00232893 mx6sl: pxp/v4l2: add dependency on CONFIG_FB_MXC_ELCDIF_FB
Without this dependency, we have to manually disable
CONFIG_VIDEO_MXC_PXP_V4L2 when disable CONFIG_FB_MXC_ELCDIF_FB.
Otherwise, a build error shows up. This patch fixed it.

Signed-off-by: Robby Cai <R63905@freescale.com>
c17e62b
Robby Cai ENGR00229852 csi/v4l: lower the priority of "working queue empty" mes…
…sage

When pause the capture test program, the "working queue empty" message
shows up repeatedly. However this message is expected to show up because
there's no QBUF called. Change pr_err to pr_debug to keep it as debug level.

Signed-off-by: Robby Cai <R63905@freescale.com>
da53026
Robin Gong ENGR00234217 cpufreq:fix loops_per_jiffy wrong on new suspend flow of…
… cpufreq

Currently, we use pm_notifier to enter suspend/resume flow. But in the notifier
we only set cpufreq, didn't tell CPUFREQ core what the current cpufreq setting
now. So in the next time if CPUFREQ core find the current cpu frequncy is not
the value that CPUFREQ core want to set before. CPUFREQ core will force to set
the freqs.old with its own rule, which means the freqs.old will be MODIFYED
unexpectedly, and this will cause wrong loops_per_jiffy. We need add cpufreq_
notify_transition in the suspend/resume interface of cpufreq.

Signed-off-by: Robin Gong <b38343@freescale.com>
f7df006
Adrian Alonso ENGR00234354-1: board-mx6q_sabreauto aline spi-nor partition layout
* Aline spi-nor partition layout
* set correct chip-select value

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
ec7f947
Adrian Alonso ENGR00234354-2: board-mx6q_sabreauto aline weim-nor partition layout
* Aline weim-nor partition layout with u-boot expected
  offtsets
  "bootloader"  /dev/mtd0
  "bootenv"     /dev/mtd1
  "kernel"      /dev/mtd2
  "rootfs"      /dev/mtd3

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
8116f8d
Michael Minnick ENGR00233494 EPDC: Driver only supports 16 LUTs
This bug was introduced by ENGR00229290 which fixed
the problem of greater than 16 LUTs used when 5-bit
waveform loaded. The bug is that now the driver is also
restricted to using 16 LUTs in 4-bit mode.

The fix is to correct the test of the EPDC_FORMAT
register used to determine if a 5-bit waveform
is loaded.

Also removed the while loop in favor of a bitwise OR
used to determine if a chosen LUT has yet to be
acknowledged by the interrupt handler.

Signed-off-by: Michael Minnick <michael.minnick@freescale.com>
0ffba59
Robin Gong ENGR00234411-1 Sabreauto: fix error print COULD NOT SET GP VOLTAGE.
Didn't take more care about non-pfuze board, and there is two place in BSP will
call "mx6_cpu_regulator_init". It means regulator_get will be called twice on
every vddcore/vddsoc regulator. Then one value need set twice ,because from
regulator core view, there is two regulators share the same regulator. The non-
validate one will return error and print "COULD NOT SET GP VOLTAGE!!!!." on
Sabreauto board. The same as Sabrelite and ARM2 board.

Meanwhile, Sabreauto need be configured LDO bypass default.
Signed-off-by: Robin Gong <b38343@freescale.com>
e2cb64c
Robin Gong ENGR00234411-2 CPUFREQ: fix one code bug on regulator restore when fail
Didn't care about pu_regulator is enabled or not when regulator restore if some
regulator set failed.

Signed-off-by: Robin Gong <b38343@freescale.com>
ab96223
Steve Cornelius ENGR00234401: CAAM: Fix incorrect invalidate call for output ring
The job ring driver exhibited a hang condition in the top of
caam_jr_dequeue() where a BUG_ON statement looks for a condition
where the output ring is said to have valid entries by the ring logic,
but the ring entries apparently have NULL descriptor pointers.

In the initial ARM port of this driver, the cache flush call
of the output ring content occured before the output ring read index
register read occurred, exposing a condition where the driver sensed valid
output entries, yet the entries written by the ring hardware were not
invalidated, and therefore were not visible to the processor, appearing
as false NULL entries.

This patch relocates the invalidate call to immediately follow the
check of the output read index, where it is required.

Signed-off-by: Vicki Milhoan <vicki.milhoan@freescale.com>
Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
25629f0
Tony LIU ENGR00234531 fix MFGTOOL issue after USB module loadable done
- must add a new config item to enable USB
  CONFIG_USB_FSL_ARC_OTG=y

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
ba7a36b
@b38800 b38800 ENGR00234362 Camera: ov5640_mipi: wait for sensor stable before streamon
ov5642 add some delay to wait for sensor stable after S_PARM.
And ov5640_mipi should keep the same behavior.
So the upper layer can trust the first frame comes out of ov5640_mipi.

- delay added according to the recommended time from ov company

Signed-off-by: Sheng Nan <b38800@freescale.com>
765f642
Ryan QIAN ENGR00234519 mmc: support eMMC v4.5 memory cards
Bypass eMMC version checking, so that eMMC v4.5 can work on current kernel as
eMMC v4.4 cards, no specific v4.5 feature supported. Only basic read/write
operations are supported, also ddr mode is supported.

Acked-by: Dong Aisheng <b29396@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
d62bb92
Robby Cai ENGR00234387 mx6sl: csi/v4l2: add V4L2_MEMORY_USERPTR support
Add V4L2_MEMORY_USERPTR support for csi v4l2 capture
Support V4L2_MEMORY_USERPTR and V4L2_MEMORY_MMAP now

Signed-off-by: Robby Cai <R63905@freescale.com>
b2851b3
Ge Lei ENGR00233569 SDMA: Add support for SDMA M2M copy
Our SDMA code did not support SDMA M2M copy function before, we add
SDMA M2M copy function in this patch, you can use 'sg' to use this
function, you can refer to 'linux-test/module_test/mxc_sdma_memcopy_test.c'
for how to use this function.

Signed-off-by: Ge Lei <b42127@freescale.com>
7c92123
Robin Gong ENGR00234685-1 cpufreq:fix one bug in cpufreq driver if I2C transfer …
…error

Currently, if we used LDO bypass, will set pfuze register by I2C bus to modify
voltage according to different cpu frequency, if I2C transfer error, we should
restore to old cpu frequency, not only in cpufreq driver but also cpufreq core.

Signed-off-by: Robin Gong <b38343@freescale.com>
5edceb5
Robin Gong ENGR00234685-2 mx6q_sabreauto: change Sabreauto board to LDO-ENABLED …
…mode

Per hardware design, we can't set LDO bypass mode on Sabreauto board,otherwise,
system will can't reset,if cpu freq run in 400Mhz.
Signed-off-by: Robin Gong <b38343@freescale.com>
2fe94a8
Michal Hocko mm: fix off-by-two in __zone_watermark_ok()
Commit 88f5acf ("mm: page allocator: adjust the per-cpu counter
threshold when memory is low") changed the form how free_pages is
calculated but it forgot that we used to do free_pages - ((1 << order) -
1) so we ended up with off-by-two when calculating free_pages.

Reported-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2dd9359
Zhang Jiejing ENGR00234781 input: add novatek touch screen driver.
This patch add device drvier for novatek touch screen driver.
This touch screen chip will be support because it have
more populary screen size.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
01539e3
Fugang Duan ENGR00234236 1588: fix kernel build warning
Warning: no return statement in function returning non-void.
fec_ptp_ioctl return zero when 1588 is not enable.

Signed-off-by: Fugang Duan  <B38611@freescale.com>
e6a3ea5
Fugang Duan ENGR00235090 FEC: Workaround for FEC RX hang with stress test
When do Ethernet UDP stress overnight test with abundance of
data transmission, RX path may hang-on.
Dump the RX BD, found all BD "Empty" bit is cleared, which means
CPU read BD status is not right and waiting here.

Change BD memroy attribute from Normal to strongly ordered:
changes the memory attribute of C=0, B=0 instead of C=0, B=1.
Apply the change, the issue cannot be reproduced.

Signed-off-by: Fugang Duan  <B38611@freescale.com>
af18f30
Ryan QIAN ENGR00234933 mmc: sdhci: invalid cd_gpio for always_present host cont…
…roller

Issue:
By default, cd_gpio is 0 for always presented host controller, which is a
valid gpio. Then it will result to free_irq for 0 in esdhc_pltfm_exit for
these always_present host controllers.

Fix:
Invalid cd_gpio if the controller is indicated to be always present.

Acked-by: Dong Aisheng <b29396@freescale.com>
Signed-off-by: Ryan QIAN <b32804@freescale.com>
21d674e
Gary Zhang ENGR00234111 wm8962: switch automatically between speaker and hp
when detect hp inserted, disable speaker; when hp is plugout,
enable speaker.

Signed-off-by: Gary Zhang <b13634@freescale.com>
fd1aee5
Fugang Duan ENGR00235086 I2C: update i2c clock divider for each transaction
Currently on Arik/Rigel, the I2C clk is from IPG_PERCLK which is
sourced from IPG_CLK. Under normal operation, ipg_perclk is at 22MHz
so that we can get 400KHz i2c speed. In low bus freq mode, IPG_CLK is
at 12MHz and IPG_PERCLK is down to 4MHz.
So the I2C driver must update the divider register for each transaction.

Signed-off-by: Fugang Duan  <B38611@freescale.com>
1c382ea
Alejandro Sierra ENGR00234466 UART: Fix disablement of CTS signal
On Uart driver, CTS signal were never disabled
on the imx_set_mctrl function since the register was
written inside of the conditional.
        if (mctrl & TIOCM_RTS) {
                temp |= UCR2_CTS;
                writel(temp, sport->port.membase + UCR2);
        }

Signed-off-by: Alejandro Sierra <b18039@freescale.com>
8ddd1ff
Alejandro Sierra ENGR00235081 Quad DL: Fix chip select for SPI-NOR and flags
Fix chip select for SPI-NOR and
remove flags for no writeable partition for weim nor and
SPI-NOR

Signed-off-by: Alejandro Sierra <b18039@freescale.com>
ce38b85
Zhang Xiaodong ENGR00223037 fsl: Add new board HDMI dongle for imx6 Q/DL.
Add HDMIdongle board for imx6Q/DL under board/freescale.

Signed-off-by: Zhang Xiaodong <B39117@freescale.com>
10f2c6c
Terry Lv ENGR00235268: change caam_ipg_clk's CG to CG6
Another patch changed caam_ipg_clk's CG to CG4 and this commit will
revert this change.

Signed-off-by: Terry Lv <r65388@freescale.com>
d4a15e9
Fugang Duan ENGR00235363 I2C: fix kernel crash due
Kernel crash log:
Unable to handle kernel NULL pointer dereference at
virtual address 00000001 pgd = d02ec000
[00000001] *pgd=00000000
Internal error: Oops: 1 [#1] PREEMPT SMP
Modules linked in:
CPU: 0    Not tainted  (3.0.35-05332-ga7a1dec-dirty #38)
PC is at i2c_imx_probe+0xdc/0x434
LR is at i2c_imx_xfer+0x53c/0x75c
pc : [<c002645c>]    lr : [<c03b1e98>]    psr: 20000013
sp : d41c3dd8  ip : 00000001  fp : 00000001
r10: 00000001  r9 : ffff8fcc  r8 : d41c3e48
r7 : c08f4dc0  r6 : 00000001  r5 : d41c3e48  r4 : d447f000
r3 : d417cbe0  r2 : 00000001  r1 : 000186a0  r0 : d447f000
Flags:nzCv IRQs on  FIQs on Mode SVC_32 ISA ARM Segment kernel
...
Process kworker/0:3 (pid: 1254, stack limit = 0xd41c22f0)
Stack: (0xd41c3dd8 to 0xd41c4000)
3dc0:  00000000

I2C driver call the function "static void __init i2c_imx_set_clk()"
in runtime, the function is linked to init.text section, and don't
be used after kernel bootup. Remove the "__init" statement to fix
the issue.

Signed-off-by: Fugang Duan  <B38611@freescale.com>
812b6f8
make shi ENGR00234722 USB: fix Kernel dump issue after USB driver loadable
- It is better to disable otgsc and wake up interrupt to avoid an
  abnormal interrupt happen during USB driver being removed.
- If the USB host is already at low power mode, only need turn on
  the clock, no need turn off the clock.
- Need discharge dp and dm during USB driver being removed ,in order
  to avoid a wakeup interrupt happen. And if the USB otg is in host
  mode, we should clear discharge dp and dm in fsl_otg_set_host()
  during system boot up.

Signed-off-by: make shi <b15407@freescale.com>
7395b05
make shi ENGR00235630 MX6 USB :fix USB does not work when plug in device durin…
…g suspend

USB does not work when plug in a usb device during system suspend. Under this
case, USB driver will be in low power mode, but WIE bit not be set if usb wake
up is not enabled.So there are only ID change interrupt no USB wakeup interrupt
after system resume.In current bsp, after system resume ID change status not be
clear,and ID change interrupt will continue happen, which cause the system busy.
No checking WIR bit if ID change interrupt happen when USB in low power mode to
fix this issue.

Signed-off-by: make shi <b15407@freescale.com>
3a64cce
Fugang Duan ENGR00235626 FEC: Enable phy pause frame feature
Since some ethernet MAC flow control is relied on phy pause
status, both link partners exchange information via auto neg to
determine if both parties are capable of flow control.
Advertise phy pause frame to avoid pause frame is not responsed
by the other net node.

Signed-off-by: Fugang Duan  <B38611@freescale.com>
59530a4
Hongzhang Yang ENGR00232530 Refine VPU suspend/resume according to open_count
1. Refine VPU suspend/resume according to open_count to completely
fix bug: ENGR00230203 [Android_MX6DL_SD] Gallery: System hang
after resume from suspend during video playback. 20%

open_count == 0 case can be simplified because VPU is released
(all instances are freed), so
- clock is already off
- context is no longer needed
- power is already off on MX6

VPU reset is removed from resume because power is ensured to be off
before entering resume on MX6 by calling regulator API.

2. Fix bug: VPU always busy after suspend/resume

Error log (VPU refused to suspend due to VPU busy):
pm_op(): platform_pm_suspend+0x0/0x54 returns -11
PM: Device mxc_vpu failed to suspend: error -11
PM: Some devices failed to suspend

Root cause:
- Suspend happened during vpu_Init(), somewhere after VPU lib started
  to download FW (when PC == 0), but before run FW. (BIT_BUSY_FLAG=1,
  BIT_CODE_RUN=1).
- In such case, VPU resume downloaded FW and run VPU to idle because
  suspend was triggered after VPU was opened (active).
- vpu_Init run VPU again with BIT_BUSY_FLAG=1. So VPU was trapped in
  idle loop but BIT_BUSY_FLAG was never cleared. VPU lib regarded VPU
  as always busy.

Solution (in VPU resume):
- run VPU FW only if VPU was opened and PC before suspend is not 0
- restore host register is required
- download FW is required, because program memory is lost after power
  off.

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
e470b6f
Alejandro Sierra ENGR00235624 Quad/DualLite ARD: MTD partition non aligned
MTD partition for SPI-NOR was not aligned to 8K.
Replace its offset from MTDPART_OFS_APPEND to MTDPART_OFS_NXTBLK.

Signed-off-by: Alejandro Sierra <b18039@freescale.com>
e6a5dc7
make shi ENGR00236031 MX6 USB :Change default USB H1 and OTG driver load order
In current linux BSP USB H1 driver default load before otg driver load,
which cause USBx not match the ehci controller number. like bellow:

root@freescale /sys/devices/platform/fsl-ehci.0$ ls
driver     modalias   pools      power      subsystem  uevent     usb2
root@freescale /sys/devices/platform/fsl-ehci.1$ ls
driver     modalias   pools      power      subsystem  uevent     usb1

Signed-off-by: make shi <b15407@freescale.com>
f12b683
@b38800 b38800 ENGR00235665: mxc_v4l2_capture: add YV12 format support in camera driver
Android CTS verifier have a must requirement for YV12 format. Since IPUv3
common driver has supported IPU_PIX_FMT_YVU420P pixel format, add the
support of YV12 format in mxc_v4l2_capture.

Signed-off-by: Sheng Nan <b38800@freescale.com>
98a5129
@b38800 b38800 ENGR00236196: mxc_vout: add YV12 format support in enum fmt field.
Since YV12 format is supported in mxc_v4l2_capture, it should be also
supported in mxc_vout.

Signed-off-by: Sheng Nan <b38800@freescale.com>
efaaa44
Chen Liangjun ENGR00236499 ASRC: fix build warning
Remove unused function "asrc_get_output_buffer_size()" to fix build
warning.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
c870770
Zhang Jiejing ENGR00235817 mx6: use SNVS LPGPR register to store boot mode value.
After using POR reset, the content in SRC will be reset.
See RM: 63.5.1.2.3 IPP_RESET_B(POR)

Because POR reset will reset most of register in IC, so use
SNVS_LP General Purpose Register (LPGPR) to store the boot mode value.

Below copy from SNVS_BlockGuide.pdf:
The SNVS_LP General Purpose Register provides a 32 bit read write
register, which can be used by any application for retaining 32 bit
data during a power-down mode

This Patch will use [7,8] bits of this register.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
a27cdd5
Gary Zhang ENGR00236020-1 ALSA: add calling of trigger in machine driver
soc_pcm_trigger() calls trigger functions of cpu_dai, codec_dai
and platform, but the trigger function of machine is not called.
add calling of trigger in machine driver in soc_pcm_trigger()

Signed-off-by: Gary Zhang <b13634@freescale.com>
5d26163
Gary Zhang ENGR00236020-2 wm8962: hp/speaker switching afer resume
implement headphone and speaker automatically switch
even if headphone is plugin/out during suspend

Signed-off-by: Gary Zhang <b13634@freescale.com>
695ec57
make shi ENGR00236169 MX6 USB :kfree udc_controller when remove udc driver
Kree and reset udc_controller should be done when remove udc driver to avoid
kernel dump during modprobe gadget driver after modprobe and rmmod udc driver.

Signed-off-by: make shi <b15407@freescale.com>
84d91e1
Zhang Xiaodong ENGR00223037-1 pmic: Fix the bug of pmic I2C
Fix the bug of wm831x pmic I2C

Signed-off-by: Zhang Xiaodong <B39117@freescale.com>
Acked-by: Lily Zhang
0a88e56
Ranjani Vaidyanathan ENGR00236837 MX6SL-Fix random crash caused by incorrect setting of IP…
…G clk rate.

Need to ensure that bus frequency setpoint is changed only if
the system is not already at the requested setpoint.
Changing the bus freq to high setpoint when its already at
high setpoint causes the AHB/IPG dividers to be set incorrectly.
Then when the system enters WAIT mode, the 12:5 ratio of
ARM_CLK:IPG_CLK is no longer maintained.
This causes random crashes.
Fix is to return immediately if the bus is already at the
requested setpoint

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
2e077b4
Robby Cai ENGR00229855 mx6sl: csi: can not support two camera instances
run two unit test instances as follows fails (sometimes kernel dump).
/unit_tests/csi_v4l2_capture.out &
/unit_tests/csi_v4l2_capture.out

Fix by improving the resource lock.
- We get busy_lock semaphore before we get a dqueue event, so, when user
  is blocked at DQBUF ioctrl, the user will also be blocked at QBUF ioctrl,
  then the video performance will drop. This patch changes to get busy_lock
  semaphore to protect DQBUF ioctrl until we successfully get a dqueue event.
- Use queue_int_lock spinlock to protect cam->ping_pong_csi, since it can be
  modified either in irq handler or in queue event.
- linked list should be protected by the lock:
  -- Use queue_int_lock and dqueue_int_lock spinlocks to protect working_q/
     ready_q/done_q in the end of frame interrupt handler camera_callback(),
     in case, the handler and VIDIOC_QBUF/VIDIOC_DQBUF ioctrls are called on
     different threads at same time.
  -- Protect ready_q with queue_int_lock spinlock in streamon(), in case,
     VIDIOC_STREAMON and VIDIOC_QBUF ioctrls are called on different threads
     at same time.

Signed-off-by: Robby Cai <R63905@freescale.com>
ac6d252
Robby Cai ENGR00236137 mx6sl: csi: Change video buffer access mode to writecombine
Change buffer access mode from noncached to writecombine for better
performance.

Signed-off-by: Robby Cai <R63905@freescale.com>
c1a7c48
Robby Cai ENGR00236722 mx6sl: csi: Ensure dma reflash operation done when dma i…
…s disabled

If do dma reflash operation when dma is enabled, the system will hang and we
can not connect to the core through jtag. The reason is the reflash signal
(DMA_REFLASH_RFF) will initialize the AHB bus signals and it indeed seems to
modify the AHB address on the clock as soon as the programmable register value
is changed, the bus may not respond.

This patch revised it according to the RM:
"Reflash DMA Controller for RxFIFO. This bit reflash the embedded DMA controller
for RxFIFO. It should be reflashed before the embedded DMA controller starts
to work."

Signed-off-by: Robby Cai <R63905@freescale.com>
e515072
LiGang ENGR00231808: Add epdc pmic shut down feature
For some cases, system maybe restart with epdc pmic on.
If epdc pmic on for sometime(2~3s), the current epdc pmic consume will increase
obviously, then the total current of board maybe exceed to the current limit,
which will pull down the input voltage to lead to the system pmic reset,
an un-expected POR reset occurs.
So it is necessary to close epdc pmic before system restart.

This patch is added by Robby Cai<r63905@freescale.com>

Signed-off-by: LiGang <b41990@freescale.com>
(cherry picked from commit ee9ffb4307b2b3d7440fc3468b0faaace3d2829e)
1d9cd23
Hongzhang Yang ENGR00236879 Enhance VPU driver to handle API call sequence abnormal …
…abort

Some application may exit without calling neccessay API to wrap up VPU
after it receives error message.

This could lead to system hang because driver will power off VPU
(vpu_release) while VPU may still be busy.

We require application to strictly follow the API call sequence even in
error handling case. Meanwhile, we enhance VPU driver to protect against
such abnormal abort, to prevent system hang at least.

If the last instance is closed, VPU will gate off or power off only if
VPU is idle.

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
48e8037
Fugang Duan ENGR00236240 i2c: i2c performance optimization
It is unnecessary to calculate and update i2c divider during
every transaction. Only do it if current i2c clock is different
with the previous clock frequency.

Signed-off-by: Fugang Duan  <B38611@freescale.com>
592eb9e
Gary Zhang ENGR00236910 wm8962: use alsa jack mechanism to handle pin detection
use alsa jack mechanism to handle pin detection

Signed-off-by: Gary Zhang <b13634@freescale.com>
29d7623
Liu Ying ENGR00237678 IPUv3:Clean up sync and error interrupt
1) Split sync and error interrupt handler into 2 different
   handlers, so that we may save several CPU cycles to
   handler sync interrupt which is triggered in most IPU
   usecases.
2) So far, every IPUv3 version in different SoCs has sync
   and error interrupts, so we return -ENODEV if they cannot
   be gotten from platform resource. Then, we may request
   them directly but do not check more.
3) Clean up free irq code by removing unnecessary check.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit a88d2aa)
e84859f
Robin Gong ENGR00237742 busfreq:fix IPG_PERCLK will be decreased to 6M once exit…
… low bus

on Sabresd board, IPG_PERCLK will be fixed on 6Mhz once system enter low bus,
and never restore to 22Mhz which be set in boot.  It means some device clock
which sourcing from IPG_PERCLK such as I2C will be slow down. The root cause is
that there is workaround for GPT timer of Arik TO1.0 in mx6_ddr_freq.S. GPT
clock source from IPG_PERCLK on TO1.0 and should be fixed on 6Mhz. But for
TO1.1 and TO1.2 ,the workaround should be removed.
Signed-off-by: Robin Gong <B38343@freescale.com>
edbdbeb
guoyin.chen ENGR00236141 csi:Add stride alignment setting from userspace
In android, IPU fills the I420 buffer. And GPU shows the buffer to display.
mx6's GPU has 32 Y-stride alignment for I420. The stride alignment will
be passed through by bytesperline. This update is only for
csi->smfc->mem channel.

Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
(cherry picked from commit 4708dc1)
1e54665
guoyin.chen ENGR00238201-1 V4L2:ADV7180:Support ioctrl_enum_framesizes
Add ioctl_enum_framesizes function to align the requirement
of Camera HAL in Android

Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
(cherry picked from commit fd0a1be)
ad7f343
guoyin.chen ENGR00238201-2 V4L2:ADV7180:driver kconfig change
Move ADV7180 out of choice to make it be enabled with other
camera config simultaneously

Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
(cherry picked from commit a6becd9)
a0f146f
Sandor Yu ENGR00238357 MX6x Change HDMI default output RGB
Change HDMI default output RGB

Signed-off-by: Sandor Yu <R01008@freescale.com>
485bf63
Sandor Yu ENGR00238382 MX6 HDMI: Change VGA mode flag, adjust default modelist …
…sequency

- Change VGA mode the flag from unknow to VESA.
- Adjust default modelist order, put the VESA to the end of modelist.
- Fix a build warning.

Signed-off-by: Sandor Yu <R01008@freescale.com>
66eca71
Sandor Yu ENGR00238384 MX6x HDMI: Update HDMI setting when HDMI cable plugin
Update HDMI setting when HDMI cable plugin,
HDMI will catch capbility update with EDID data updated.

Signed-off-by: Sandor Yu <R01008@freescale.com>
0c65d1a
Sandor Yu ENGR00238391 MX6x HDMI: Add default EDID config function when read ED…
…ID failed

Add default EDID config function when read EDID failed.
Fix HDMI no audio issue  when failed read EDID.

Signed-off-by: Sandor Yu <R01008@freescale.com>
7797766
Chen Liangjun ENGR00238439 ASRC: add delay before reading ASRC FIFO status
ASRC driver would read the sample number of ASRC output FIFO to fetch
the data from ASRC output FIFO. However, SDMA's fetching operation may
not finished before ASRC's reading. In this case, ASRC driver may read a
error data from the register.

In this patch, add delay before reading ASRC FIFO status to prevent
noise.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
5b8e69b
Gary Zhang ENGR00238809-1 mx6sl: clock: add dependency of IRAM clk
when IRAM is used by SSI, add IRAM clock dependency to
SSI clock

Signed-off-by: Gary Zhang <b13634@freescale.com>
36b611f
Gary Zhang ENGR00238809-2 mx6sl: ssi: add IRAM support
locate SSI playback buffer into IRAM in mx6sl.
because left IRAM room is not enough to contain record
buffer, if IRAM allocation for record fails, record
buffer will use external ram

Signed-off-by: Gary Zhang <b13634@freescale.com>
724fef3
Lionel Xu ENGR00238281 MX6SL_EVK: Add rfkill interface to bluetooth
MX6SL EVK board uses Silex SX-SDMAN board for bluetooth.
Add rfkill interface to control SX-SDMAN reset.
The reset signal is required before using bluetooth.

Signed-off-by: Lionel Xu <R63889@freescale.com>
1ffc70e
Lionel Xu ENGR00238307 MX6SL_EVK bluetooth: Add support to Silex SXSDMAN module
mx6sl_evk board uses Silex SXSDMAN board for bluetooth, add uart4 driver
to support it.

Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
343f8f9
Gary Zhang ENGR00238943 wm8962: add judgement for no det_pin case
add judgement to avoid no detect pin case

Signed-off-by: Gary Zhang <b13634@freescale.com>
9870e52
Loren Huang ENGR00238947 [GPU]Integrate Vivante 4.6.9p10 gpu driver kernel part code
Integrate both 4.6.9p9.1 and 4.6.9p10.

Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Lily Zhang
68544bc
Robby Cai ENGR00238237-1 mx6sl: csi/v4l: fix camera picture flickering issue
Flickering issue happens when there's no buffer to be processed(e.g., the
pace of QBUF is much slower than DQBUF). The cause is the hardware is using
double buffering, while the driver has no good protection at above case and
thus the CSI will fill the buffer not in the right order. The way to fix is
refining the output of the working_q buffer list, that is, if there's no buffer
to be processed then output to a dummy buffer.

Another important change is to only do DMA reflash operation when SOF is
detected in streamon. Remove this operation is CSI interrupt handler because
it violates to the SPEC (only do DMA reflash before DMA is enabled but NOT at
the time or after DMA's enabled).

Signed-off-by: LiGang <b41990@freescale.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 0c4584763fa44b01a2f48198fa27c9206a116164)
4514a3c
Robby Cai ENGR00238237-2 mx6sl: csi/v4l: Initialize the variable cam_fmt
This patch fixed the cam_fmt uninitialization issue.

Signed-off-by: LiGang <b41990@freescale.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 48a48ea30c6e55e44c9eacaad316b5caa04a3dda)
e6faeea
Zhang Jiejing ENGR00239187 input: novatek_ts: fix some point not release issue.
This issue is caused by Touch Screen F/W, and it will report a
full package with 0xFF * 6 to notice the point was release.

Add this workaround to fix this issue, fixup the wrong finger id.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
509b601
Chen Liangjun ENGR00238813 ASRC: add check before release ASRC pair
Add check before relase ASRC pair to prevent ASRC register operation
while clock is not enabled. The ASRC clock is disable while index is not
applied.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
b2381e9
Sandor Yu ENGR00239062 MX6X HDMI add 1440x240p60 mode support
Adjust 1440x240p60 timing to pass HDMI compliance test.

Signed-off-by: Sandor Yu <R01008@freescale.com>
675f8ef
Peter Chan ENGR00232879 mx6sl: EPDC VDDH and VPOS power on/off sequence is wrong
VDDH should only be ON after VPOS when power up and should be off
before VPOS when power down. Set the appropriate MAX17135 timing
parameters for the correct power up/down sequence

Signed-off-by: Peter Chan <B18700@freescale.com>
d7c6674
@LiuHui-Jason LiuHui-Jason fix echo 1 > compact_memory return error issue
when run the folloing command under shell, it will return error
sh/$ echo 1 > /proc/sys/vm/compact_memory
sh/$ sh: write error: Bad address

After strace, I found the following log:
...
write(1, "1\n", 2)               = 3
write(1, "", 4294967295)         = -1 EFAULT (Bad address)
write(2, "echo: write error: Bad address\n", 31echo: write error: Bad address
) = 31

This tells system return 3(COMPACT_COMPLETE) after write data to compact_memory.

The fix is to make the system just return 0 instead 3(COMPACT_COMPLETE) from
sysctl_compaction_handler after compaction_nodes finished.

Signed-off-by: Jason Liu <r64343@freescale.com>
Suggested-by: David Rientjes <rientjes@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
80ad41a
Adrian Alonso ENGR00237364: board-mx6q_sabreauto fix adv7180 tvin powerdown
* Fix adv7180 tvin powerdown function
  gpio power pin already exported in io-mux setup function
  no need to request/free gpio
* Update copyrigth year 2013.

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
0b68422
@b38800 b38800 ENGR00237682-1: mxc_v4l2_capture: ov5640: use global initialization
The current code struct of parallel ov5640 set mode directly.
The newest settings need to go through global initialization.
New settings are provided by ov company

So this patch does:
- Make parallel ov5640 mode settings go through global initialization.
- Only VGA (640 * 480) are provided as a validation of the new setting.
- Other modes will be provided in the later patches.

Signed-off-by: Sheng Nan <b38800@freescale.com>
7936969
@b38800 b38800 ENGR00237706: mxc_v4l2_capture: ov5640: correct the behavior of ENUM_FMT
ov5640 ioctl_enum_fmt_cap only returns value of index = 0;
before support other formats, correct the behavior of this ioctl.

- ENUM_FMT returns all the supported format.

Signed-off-by: Sheng Nan <b38800@freescale.com>
aeb4138
@b38800 b38800 ENGR00237682-2: mxc_v4l2_capture: ov5640: support all subsampling modes
Supported the following modes, verified image quality and frame rate
- VGA 30/15fps
- QVGA 30/15fps
- NTSC 30/15fps
- PAL 30/15fps
- 720P 30/15fps
Note: use the same setting as app note of ov5640 dvp
- QCIF 30/15fps
- XGA 22.5/15fps
Note: cannot make XGA work on 30fps. Just a reference of ov5640 datasheet:
1280*960 YUV422 maximum at 22.5fps.
1280*720 YUV422 maximum at 30fps.
Need to confirm later.

Signed-off-by: Sheng Nan <b38800@freescale.com>
f3432e3
@b38800 b38800 ENGR00237682-3: mxc_v4l2_capture: ov5640: support scaling modes
The method for change between scaling and subsampling mode is different
from ov5640_mipi.
(image bigger than 1280*960 is scaling mode, smaller is subsampling).

According to OV5640 Auto Focus Camera Module Application Notes
(with DVP Interface) R2.14.pdf,
change back from QSXGA to VGA, don't need to do exposure calculation.

According to the test result, if we do exposure calculation when change
back from scaling to subsampling mode, the image would be dark.

So the method is:
Change to scaling mode, go through exposure calcuation.
Change to or back to subsampling mode, change mode directly.

Supported mode:
- QSXGA@7.5fps
- 1080P@7.5fps

Can't make 1080P works at 15fps. Here is a reply from ov fae:
because of scaling down, max frame for 1080P is the same as 5M, both are 15fps.
so if 5M can runs up to 7.5fps on your demo, then 1080P is the same 7.5fps max.

Signed-off-by: Sheng Nan <b38800@freescale.com>
648dfe4
make shi ENGR00232755 USB: disable clock and abnormal wakeup when remove gadge…
…t driver

- In current bsp, the usb clock mismatch when rmmod gadget class driver. The
  clock should be turn off when gadget class driver unregister.
- There is an abnormal usb wakeup interrupt happen if phy is no power without
  VBUS. If we unplug the usb cable after unregister usb gadget driver, it is
  difficult to handle the unexpected usb wakeup interrupt. SO we must call
  dr_discharge_line()  to make sure no abnormal usb wakeup interrupt happen in
  usb unregister gadget class driver.

Signed-off-by: make shi <b15407@freescale.com>
5a5ec76
Sandor Yu ENGR00239207 MX6x HDMI add some support modes
Remove video mode 2880x480p60 that not supported by IPU.
Add video mode 1080p25, 1080p30, 720p100, 720p120, 1440x480p60,
1440x288p50, 1440x576p50.

Signed-off-by: Sandor Yu <R01008@freescale.com>
4e4c302
Sandor Yu ENGR00239569 Mx6x HDMI Add RGB/YCbCr output select via system file
Add RGB/YCbCr output select via system file,
the default output is RGB.

Signed-off-by: Sandor Yu <R01008@freescale.com>
dbdca9c
Richard Zhu ENGR00239905 PCIe Enable PCIe switch support
PCIe switch access mechanism:
 - CfgRd0/CfgWr0 is used to access the CFG space of the EP device
 or the upstream port of PCIe switch that is connected to RC directly.
 - CfgRd1/CfgWr1 is used to access the CFG space of the downstream port
 of PCIe switch and so on cases.

UR and kernel crash problem:
i.MX6 PCIe maps UR(Unsupported Request)err to AXI SLVERR err, which would
cause the arm data abort exception.
There is one "Received Master Abort" in iMX6 Root complex Secondary
status register when a requester receives a Completion
with Unsupported Request Completion Status.
In this case, the Linux kernel would be crashed.

Workaround: correct this imprecise external abort.

Signed-off-by: Richard Zhu <r65037@freescale.com>
339a24c
Hongzhang Yang ENGR00240506 fix a bug in abnormal abort handling
Bug:
If app quits before FW is loaded to VPU, VPU driver will hang in vpu_release().

Root cause:
In that case, if BIT_BUSY_FLAG=1, vpu_release may reset VPU and run FW
init code, but FW has not been loaded.

Solution:
- Don't run FW init code after reset since VPU lib can load it next time.
- If PC=0, which means VPU never runs, don't check BIT_BUSY_FLAG

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
f1d62f6
Wayne Zou ENGR00240298 IMX IPU: Optimize IPU resize performance
When disabling IPU channels, it needs less than 200us to wait for stop
Using msleep, it often sleep longer(above 10ms). So the extra delay
decrease the performance.

For 720p video playback on 1080p display(60Hz), the performance is about 40fps
With this patch, it can achieve around 60fps.

Signed-off-by: Wayne Zou <b36644@freescale.com>
3f2e125
Huang Shijie ENGR00240571 mtd: gpmi: fix the compiler warning
The current code may print out the following warning:
....................................................................
drivers/mtd/nand/gpmi-nand/gpmi-lib.c: In function gpmi_begin:
drivers/mtd/nand/gpmi-nand/gpmi-lib.c:1163: warning: hw.use_half_periods
				may be used uninitialized in this function
drivers/mtd/nand/gpmi-nand/gpmi-lib.c:1163: warning: hw.sample_delay_factor
				may be used uninitialized in this function
....................................................................

this patch fixes it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
84cdc6e
Sandor Yu ENGR00239734 Mx6 HDMI PHY: Add 2 variable to pass board specific config
The PHY register 0x9 and 0xe should setting
to different value in different board to pass HCT.
Add variable phy_reg_vlev and phy_reg_cksymtx to pass
phy config data.

Signed-off-by: Sandor Yu <R01008@freescale.com>
844aab7
Richard Zhu ENGR00240650 pcie: imx: fix ep device no int when pcie switch is used
The pcie ep device inserted into the downstream port of the
pcie switch doesn't get the legacy INT when pcie switch
is used.

Signed-off-by: Richard Zhu <r65037@freescale.com>
28cae96
@b38800 b38800 ENGR00240228: IPUv3: CSI: Correct enum definition of IPU_CSI_DATA_WIDTH
The current definition for with 10 and 16 is not correct.
IPU_CSI_DATA_WIDTH_10 = 2;
IPU_CSI_DATA_WIDTH_16 = 3;

According to the latest i.MX6DQ RM, the correct value should be:
IPU_CSI_DATA_WIDTH_10 = 3;
IPU_CSI_DATA_WIDTH_16 = 9;

Signed-off-by: Sheng Nan <b38800@freescale.com>
052f9c3
Liu Ying ENGR00240740-1 IPUv3:Workaround bootup ipu error
Enabling IPU hsp clock in mxcfb_probe() context by calling
ipu_init_channel() can avoid the IPU display channel(setup
in bootloader) from being damaged by some IPU common driver
APIS which enable/disable IPU hsp clock when doing driver
probe. However, somehow, after LDO bypass patch set is pushed
to kernel, this clock enablement can trigger IPU errors
(IPU_INT_STAT_5 - 0x00800000/IPU_INT_STAT_10 - 0x00100000) and
a display flash. A workaround is to enable IPU hsp clock when
we are at ipu_probe() context, which is earlier than mxcfb_probe()
context, and then to disable(cleanup) the clock once more when
fb_set_par() is triggered by the user for the first time. This
patch exports an interface to disable ipu hsp clock so that
fb_set_par() may call it, and enables ipu hsp clock in ipu_probe()
context.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 06e5772)
168f63d
Liu Ying ENGR00240740-2 ARM:IPUv3:Add an interface to disable IPU hsp clk
This patch adds an interface to disable IPU hsp clock so that it
can be called out of ipu common driver.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 78f0495)
af4f088
Liu Ying ENGR00240740-3 IPUv3 fb:Workaround bootup ipu error
Enabling IPU hsp clock in mxcfb_probe() context by calling
ipu_init_channel() can avoid the IPU display channel(setup
in bootloader) from being damaged by some IPU common driver
APIS which enable/disable IPU hsp clock when doing driver
probe. However, somehow, after LDO bypass patch set is pushed
to kernel, this clock enablement can trigger IPU errors
(IPU_INT_STAT_5 - 0x00800000/IPU_INT_STAT_10 - 0x00100000) and
a display flash. A workaround is to enable IPU hsp clock when
we are at ipu_probe() context, which is earlier than mxcfb_probe()
context, and then to disable(cleanup) the clock once more when
fb_set_par() is triggered by the user for the first time. This
patch updates the comment for ipu_init_channel() and
ipu_enable_channel() in mxcfb_probe() context, and disables ipu
hsp clock when fb_set_par() is triggered by the user for the first
time.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 5528e41)
41067ad
Liu Ying ENGR00240990 MX6 HDMI dongle:Configure HDMI PHY registers
This patch sets HDMI PHY register values in MXC HDMI driver
platform data so that MXC HDMI driver can configure the
0x09 CKSYMTXCTRL register(Clock Symbol and Transmitter
Control Register) and 0x0E VLEVCTRL register(Voltage Level
Control Register), then we may pass HDMI compliance test
for MX6 HDMI dongle board.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 788bcf5)
3f50062
Wayne Zou ENGR00240972-1 IPU: Add deinterlace frame rate double flags
Add deinterlace frame rate double flags for ipu header file

Signed-off-by: Wayne Zou <b36644@freescale.com>
34baea6
Wayne Zou ENGR00240972-2 IPU: Add vdic double frame rate feature
Add vdic double frame rate feature
It depends on the which frame(0 or 1),
and interlace field format(top or bottom) to do VDI process

Signed-off-by: Wayne Zou <b36644@freescale.com>
77df6b0
Wayne Zou ENGR00240972-3 V4L2: VDI double frame rate for interlace stream
Each VPU decoded frame is de-interlaced twice inside v4l2 output driver,
and show twice also to achieve IPU/VDI double frame rate output.
This feature is disable by default.

Signed-off-by: Wayne Zou <b36644@freescale.com>
ebd9fef
Loren HUANG ENGR00240988-5 Update gpu code to support 3.5 kernel
Cherry-pick from imx_3.5.7 branch.
-Comment regulator setting code temperarily for 3.5 kernel.
-Adjust clock setting code based on new clock framework.
-Disable dynamic frequency change feature as it depends on thermal
driver.
-Use DTS to get reserved memory information.
-Comment cpu check code for 3.5 kernel.
-Comment GPU reset code for 3.5 kernel.

Signed-off-by: Loren HUANG <b02279@freescale.com>
Acked-by: Lily Zhang
ca2426a
@ddstreet ddstreet pushed a commit to ddstreet/linux that referenced this pull request Jul 16, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
bed51b6
@krieger-od krieger-od pushed a commit to krieger-od/linux that referenced this pull request Jul 17, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
31bc2e9
@krieger-od krieger-od pushed a commit to krieger-od/linux that referenced this pull request Jul 21, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
f70e7bb
@ddstreet ddstreet pushed a commit to ddstreet/linux that referenced this pull request Jul 25, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
383c099
@swarren swarren pushed a commit to swarren/linux-tegra that referenced this pull request Jul 29, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1386c4d
@krieger-od krieger-od pushed a commit to krieger-od/linux that referenced this pull request Aug 4, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7273d2e
@JoonsooKim JoonsooKim pushed a commit to JoonsooKim/linux that referenced this pull request Aug 6, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1972f1c
@ddstreet ddstreet pushed a commit to ddstreet/linux that referenced this pull request Aug 6, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
4e241d7
@swarren swarren pushed a commit to swarren/linux-tegra that referenced this pull request Aug 8, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
b7c7c8a
@aryabinin aryabinin pushed a commit to aryabinin/linux that referenced this pull request Aug 12, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
eb66b86
@aryabinin aryabinin pushed a commit to aryabinin/linux that referenced this pull request Aug 13, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0977ac0
@aryabinin aryabinin pushed a commit to aryabinin/linux that referenced this pull request Aug 14, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ed456ba
@andy-shev andy-shev pushed a commit to andy-shev/linux that referenced this pull request Aug 26, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
9fcb2df
@aryabinin aryabinin pushed a commit to aryabinin/linux that referenced this pull request Sep 3, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
5c29b37
@andy-shev andy-shev pushed a commit to andy-shev/linux that referenced this pull request Sep 5, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3a794b5
@aryabinin aryabinin pushed a commit to aryabinin/linux that referenced this pull request Sep 10, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
a01dd1d
@aryabinin aryabinin pushed a commit to aryabinin/linux that referenced this pull request Sep 24, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
189c5c3
@ddstreet ddstreet pushed a commit to ddstreet/linux that referenced this pull request Sep 25, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
e951d5a
@koct9i koct9i pushed a commit to koct9i/linux that referenced this pull request Sep 27, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
224ef30
@tom3q tom3q pushed a commit to tom3q/linux that referenced this pull request Oct 2, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
98470fc
@aryabinin aryabinin pushed a commit to aryabinin/linux that referenced this pull request Oct 3, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
4b2facd
@bengal bengal pushed a commit to bengal/linux that referenced this pull request Oct 7, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
6456615
@cyndis cyndis pushed a commit to cyndis/linux that referenced this pull request Oct 15, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
60e93f2
@swarren swarren pushed a commit to swarren/linux-tegra that referenced this pull request Oct 16, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
31d520d
@aryabinin aryabinin pushed a commit to aryabinin/linux that referenced this pull request Oct 27, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
45bd311
@rperier rperier pushed a commit to rperier/linux that referenced this pull request Oct 28, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
8a1ebf2
@rperier rperier pushed a commit to rperier/linux that referenced this pull request Oct 31, 2014
Andrew Morton kernel-posix-timersc-code-clean-up-checkpatch-fixes
WARNING: space prohibited between function name and open parenthesis '('
#55: FILE: kernel/posix-timers.c:345:
+					       sizeof (struct k_itimer), 0,

ERROR: do not use assignment in if condition
#70: FILE: kernel/posix-timers.c:504:
+	if ((event->sigev_notify & SIGEV_THREAD_ID) &&

total: 1 errors, 1 warnings, 192 lines checked

./patches/kernel-posix-timersc-code-clean-up.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Fabian Frederick <fabf@skynet.be>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7da0fbb
@torvalds torvalds pushed a commit that referenced this pull request Nov 2, 2014
@bonzini bonzini KVM: vmx: defer load of APIC access page address during reset
Most call paths to vmx_vcpu_reset do not hold the SRCU lock.  Defer loading
the APIC access page to the next vmentry.

This avoids the following lockdep splat:

[ INFO: suspicious RCU usage. ]
3.18.0-rc2-test2+ #70 Not tainted
-------------------------------
include/linux/kvm_host.h:474 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
1 lock held by qemu-system-x86/2371:
 #0:  (&vcpu->mutex){+.+...}, at: [<ffffffffa037d800>] vcpu_load+0x20/0xd0 [kvm]

stack backtrace:
CPU: 4 PID: 2371 Comm: qemu-system-x86 Not tainted 3.18.0-rc2-test2+ #70
Hardware name: Dell Inc. OptiPlex 9010/0M9KCM, BIOS A12 01/10/2013
 0000000000000001 ffff880209983ca8 ffffffff816f514f 0000000000000000
 ffff8802099b8990 ffff880209983cd8 ffffffff810bd687 00000000000fee00
 ffff880208a2c000 ffff880208a10000 ffff88020ef50040 ffff880209983d08
Call Trace:
 [<ffffffff816f514f>] dump_stack+0x4e/0x71
 [<ffffffff810bd687>] lockdep_rcu_suspicious+0xe7/0x120
 [<ffffffffa037d055>] gfn_to_memslot+0xd5/0xe0 [kvm]
 [<ffffffffa03807d3>] __gfn_to_pfn+0x33/0x60 [kvm]
 [<ffffffffa0380885>] gfn_to_page+0x25/0x90 [kvm]
 [<ffffffffa038aeec>] kvm_vcpu_reload_apic_access_page+0x3c/0x80 [kvm]
 [<ffffffffa08f0a9c>] vmx_vcpu_reset+0x20c/0x460 [kvm_intel]
 [<ffffffffa039ab8e>] kvm_vcpu_reset+0x15e/0x1b0 [kvm]
 [<ffffffffa039ac0c>] kvm_arch_vcpu_setup+0x2c/0x50 [kvm]
 [<ffffffffa037f7e0>] kvm_vm_ioctl+0x1d0/0x780 [kvm]
 [<ffffffff810bc664>] ? __lock_is_held+0x54/0x80
 [<ffffffff812231f0>] do_vfs_ioctl+0x300/0x520
 [<ffffffff8122ee45>] ? __fget+0x5/0x250
 [<ffffffff8122f0fa>] ? __fget_light+0x2a/0xe0
 [<ffffffff81223491>] SyS_ioctl+0x81/0xa0
 [<ffffffff816fed6d>] system_call_fastpath+0x16/0x1b

Reported-by: Takashi Iwai <tiwai@suse.de>
Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Reviewed-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Tested-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Fixes: 38b9917
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
a73896c
@prahal prahal added a commit to prahal/linux that referenced this pull request Nov 9, 2014
@prahal prahal drm: exynos: G2D : Fix cmdlist free collision
The cmdlist was freed twice:
[  372.563832] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[  372.570508] Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
[  372.570730] Workqueue: g2d g2d_runqueue_worker [exynosdrm]
[  372.570741] task: ed300000 ti: eb6a4000 task.ti: eb6a4000
[  372.570800] PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
[  372.570814] LR is at vprintk_emit+0x4ec/0x570
[  372.570820] pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
[  372.570820] sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
[  372.570824] r10: 00000000  r9 : 00000000  r8 : eafdcca4
[  372.570828] r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
[  372.570832] r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
[  372.570838] Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
[  372.570843] Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
[  372.570847] Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
[  372.570851] Stack: (0xeb6a5e38 to 0xeb6a6000)
[  372.570857] 5e20:                                                       e3ae3000 6b6b6b6b
[  372.570865] 5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
[  372.570873] 5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
[  372.570881] 5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
[  372.570889] 5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
[  372.570896] 5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
[  372.570904] 5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
[  372.570912] 5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
[  372.570922] 5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
[  372.570929] 5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
[  372.570937] 5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
[  372.570944] 5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
[  372.570951] 5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
[  372.570958] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  372.570965] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[  372.571087] [<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[  372.571195] [<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[  372.571258] [<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[  372.571269] [<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[  372.571282] [<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[  372.571297] [<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
[  372.571306] Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
90b21bc
@dabrace dabrace referenced this pull request in dabrace/linux Nov 10, 2014
@bonzini bonzini KVM: vmx: defer load of APIC access page address during reset
Most call paths to vmx_vcpu_reset do not hold the SRCU lock.  Defer loading
the APIC access page to the next vmentry.

This avoids the following lockdep splat:

[ INFO: suspicious RCU usage. ]
3.18.0-rc2-test2+ #70 Not tainted
-------------------------------
include/linux/kvm_host.h:474 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
1 lock held by qemu-system-x86/2371:
 #0:  (&vcpu->mutex){+.+...}, at: [<ffffffffa037d800>] vcpu_load+0x20/0xd0 [kvm]

stack backtrace:
CPU: 4 PID: 2371 Comm: qemu-system-x86 Not tainted 3.18.0-rc2-test2+ #70
Hardware name: Dell Inc. OptiPlex 9010/0M9KCM, BIOS A12 01/10/2013
 0000000000000001 ffff880209983ca8 ffffffff816f514f 0000000000000000
 ffff8802099b8990 ffff880209983cd8 ffffffff810bd687 00000000000fee00
 ffff880208a2c000 ffff880208a10000 ffff88020ef50040 ffff880209983d08
Call Trace:
 [<ffffffff816f514f>] dump_stack+0x4e/0x71
 [<ffffffff810bd687>] lockdep_rcu_suspicious+0xe7/0x120
 [<ffffffffa037d055>] gfn_to_memslot+0xd5/0xe0 [kvm]
 [<ffffffffa03807d3>] __gfn_to_pfn+0x33/0x60 [kvm]
 [<ffffffffa0380885>] gfn_to_page+0x25/0x90 [kvm]
 [<ffffffffa038aeec>] kvm_vcpu_reload_apic_access_page+0x3c/0x80 [kvm]
 [<ffffffffa08f0a9c>] vmx_vcpu_reset+0x20c/0x460 [kvm_intel]
 [<ffffffffa039ab8e>] kvm_vcpu_reset+0x15e/0x1b0 [kvm]
 [<ffffffffa039ac0c>] kvm_arch_vcpu_setup+0x2c/0x50 [kvm]
 [<ffffffffa037f7e0>] kvm_vm_ioctl+0x1d0/0x780 [kvm]
 [<ffffffff810bc664>] ? __lock_is_held+0x54/0x80
 [<ffffffff812231f0>] do_vfs_ioctl+0x300/0x520
 [<ffffffff8122ee45>] ? __fget+0x5/0x250
 [<ffffffff8122f0fa>] ? __fget_light+0x2a/0xe0
 [<ffffffff81223491>] SyS_ioctl+0x81/0xa0
 [<ffffffff816fed6d>] system_call_fastpath+0x16/0x1b

Reported-by: Takashi Iwai <tiwai@suse.de>
Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Reviewed-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Tested-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Fixes: 38b9917
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5356c2d
@tobiasjakobi tobiasjakobi added a commit that referenced this pull request Feb 3, 2015
@prahal prahal drm: exynos/g2d: Fix cmdlist free collision
The cmdlist was freed twice:
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
Workqueue: g2d g2d_runqueue_worker [exynosdrm]
task: ed300000 ti: eb6a4000 task.ti: eb6a4000
PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
LR is at vprintk_emit+0x4ec/0x570
pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
r10: 00000000  r9 : 00000000  r8 : eafdcca4
r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
Stack: (0xeb6a5e38 to 0xeb6a6000)
5e20:                                                       e3ae3000 6b6b6b6b
5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
9e2fa35
@tobiasjakobi tobiasjakobi added a commit that referenced this pull request Feb 7, 2015
@prahal prahal drm: exynos/g2d: Fix cmdlist free collision
The cmdlist was freed twice:
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
Workqueue: g2d g2d_runqueue_worker [exynosdrm]
task: ed300000 ti: eb6a4000 task.ti: eb6a4000
PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
LR is at vprintk_emit+0x4ec/0x570
pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
r10: 00000000  r9 : 00000000  r8 : eafdcca4
r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
Stack: (0xeb6a5e38 to 0xeb6a6000)
5e20:                                                       e3ae3000 6b6b6b6b
5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
eb30057
@tobiasjakobi tobiasjakobi added a commit that referenced this pull request Feb 9, 2015
@prahal prahal drm: exynos/g2d: Fix cmdlist free collision
The cmdlist was freed twice:
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
Workqueue: g2d g2d_runqueue_worker [exynosdrm]
task: ed300000 ti: eb6a4000 task.ti: eb6a4000
PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
LR is at vprintk_emit+0x4ec/0x570
pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
r10: 00000000  r9 : 00000000  r8 : eafdcca4
r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
Stack: (0xeb6a5e38 to 0xeb6a6000)
5e20:                                                       e3ae3000 6b6b6b6b
5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
2ee4b7f
@tobiasjakobi tobiasjakobi added a commit that referenced this pull request Mar 10, 2015
@prahal prahal drm: exynos/g2d: Fix cmdlist free collision
The cmdlist was freed twice:
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
Workqueue: g2d g2d_runqueue_worker [exynosdrm]
task: ed300000 ti: eb6a4000 task.ti: eb6a4000
PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
LR is at vprintk_emit+0x4ec/0x570
pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
r10: 00000000  r9 : 00000000  r8 : eafdcca4
r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
Stack: (0xeb6a5e38 to 0xeb6a6000)
5e20:                                                       e3ae3000 6b6b6b6b
5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
f23b0a0
@tobiasjakobi tobiasjakobi added a commit that referenced this pull request Mar 18, 2015
@prahal prahal drm: exynos/g2d: Fix cmdlist free collision
The cmdlist was freed twice:
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
Workqueue: g2d g2d_runqueue_worker [exynosdrm]
task: ed300000 ti: eb6a4000 task.ti: eb6a4000
PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
LR is at vprintk_emit+0x4ec/0x570
pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
r10: 00000000  r9 : 00000000  r8 : eafdcca4
r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
Stack: (0xeb6a5e38 to 0xeb6a6000)
5e20:                                                       e3ae3000 6b6b6b6b
5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
1da168a
@tobiasjakobi tobiasjakobi added a commit that referenced this pull request Mar 29, 2015
@prahal prahal drm: exynos/g2d: Fix cmdlist free collision
The cmdlist was freed twice:
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
Workqueue: g2d g2d_runqueue_worker [exynosdrm]
task: ed300000 ti: eb6a4000 task.ti: eb6a4000
PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
LR is at vprintk_emit+0x4ec/0x570
pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
r10: 00000000  r9 : 00000000  r8 : eafdcca4
r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
Stack: (0xeb6a5e38 to 0xeb6a6000)
5e20:                                                       e3ae3000 6b6b6b6b
5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
bcb1f6d
@tobiasjakobi tobiasjakobi added a commit that referenced this pull request Apr 13, 2015
@prahal prahal drm: exynos/g2d: Fix cmdlist free collision
The cmdlist was freed twice:
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
Workqueue: g2d g2d_runqueue_worker [exynosdrm]
task: ed300000 ti: eb6a4000 task.ti: eb6a4000
PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
LR is at vprintk_emit+0x4ec/0x570
pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
r10: 00000000  r9 : 00000000  r8 : eafdcca4
r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
Stack: (0xeb6a5e38 to 0xeb6a6000)
5e20:                                                       e3ae3000 6b6b6b6b
5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
4ef1e7d
@tobiasjakobi tobiasjakobi added a commit that referenced this pull request Apr 15, 2015
@prahal prahal drm: exynos/g2d: Fix cmdlist free collision
The cmdlist was freed twice:
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: cfg80211 bnep nfsd auth_rpcgss[  372.570601] CPU: 0 PID: 71 Comm: kworker/u8:2 Tainted: G         C O   3.18.0-rc3-00168-gd9d00f7-dirty #70
Workqueue: g2d g2d_runqueue_worker [exynosdrm]
task: ed300000 ti: eb6a4000 task.ti: eb6a4000
PC is at g2d_unmap_cmdlist_gem+0x3c/0xe8 [exynosdrm]
LR is at vprintk_emit+0x4ec/0x570
pc : [<bf059908>]    lr : [<c007bf58>]    psr: 000f0053
sp : eb6a5e38  ip : eb6a5da0  fp : eb6a5e74
r10: 00000000  r9 : 00000000  r8 : eafdcca4
r7 : 6b6b6b6b  r6 : e3ae3000  r5 : e3ae3008  r4 : 6b6b6b6b
r3 : 6b6b6b7b  r2 : 00000000  r1 : c0864ac4  r0 : 00000017
Flags: nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 67a6c04a  DAC: 00000015
Process kworker/u8:2 (pid: 71, stack limit = 0xeb6a4248)
Stack: (0xeb6a5e38 to 0xeb6a6000)
5e20:                                                       e3ae3000 6b6b6b6b
5e40: 6b6b6b7b eafdcc50 00000000 6b6b6b6b e3ae3008 e3ae3000 eafdcc50 eafdcca4
5e60: 00000000 00000000 eb6a5e9c eb6a5e78 bf059a00 bf0598d8 a56b6b6b eafdcc64
5e80: eafdcce4 eafdcc50 eb6a4000 eddad400 eb6a5ebc eb6a5ea0 bf05a5b4 bf0599c0
5ea0: bf05a55c eafdcc64 eb67f400 edc15580 eb6a5efc eb6a5ec0 c003fa58 bf05a568
5ec0: edc15580 eb6a4000 eb6a4000 00000000 eb67f400 edc15580 edc155a0 eb6a4000
5ee0: eb6a4000 eb67f418 eb67f400 00000088 eb6a5f44 eb6a5f00 c00405d4 c003f828
5f00: eb6a5f24 eb6a5f10 c06cc3c4 c0a0f100 00000000 c0a728f7 c00402bc eb68af00
5f20: 00000000 eb67f400 c00402bc 00000000 00000000 00000000 eb6a5fac eb6a5f48
5f40: c0045544 c00402c8 c0a2e138 00000000 eb6a5f6c eb67f400 00000000 00000000
5f60: dead4ead ffffffff ffffffff eb6a5f6c eb6a5f6c 00000000 00000000 dead4ead
5f80: ffffffff ffffffff eb6a5f88 eb6a5f88 eb68af00 c0045450 00000000 00000000
5fa0: 00000000 eb6a5fb0 c000f918 c004545c 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 5a5a5a5a 5a5a5a5a
[<bf059908>] (g2d_unmap_cmdlist_gem [exynosdrm]) from [<bf059a00>] (g2d_free_runqueue_node+0x4c/0xa8 [exynosdrm])
[<bf059a00>] (g2d_free_runqueue_node [exynosdrm]) from [<bf05a5b4>] (g2d_runqueue_worker+0x58/0x80 [exynosdrm])
[<bf05a5b4>] (g2d_runqueue_worker [exynosdrm]) from [<c003fa58>] (process_one_work+0x23c/0x44c)
[<c003fa58>] (process_one_work) from [<c00405d4>] (worker_thread+0x318/0x51c)
[<c00405d4>] (worker_thread) from [<c0045544>] (kthread+0xf4/0xfc)
[<c0045544>] (kthread) from [<c000f918>] (ret_from_fork+0x14/0x20)
Code: eb59a21a e2973010 e50b3034 0a00000c (e5973010)
e8f65c6
@RobertBColton RobertBColton changed the title from Linus Cox Senior Medvedev to Linus Senior Medvedev Dec 23, 2015
@sashalevin sashalevin added a commit that referenced this pull request Apr 11, 2016
@jhovold jhovold USB: serial: fix race between probe and open
commit a65a6f1 upstream.

Fix race between probe and open by making sure that the disconnected
flag is not cleared until all ports have been registered.

A call to tty_open while probe is running may get a reference to the
serial structure in serial_install before its ports have been
registered. This may lead to usb_serial_core calling driver open before
port is fully initialised.

With ftdi_sio this result in the following NULL-pointer dereference as
the private data has not been initialised at open:

[  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698297] *pde = 00000000
[  199.698303] Oops: 0000 [#1] PREEMPT SMP
[  199.698313] Modules linked in: ftdi_sio usbserial
[  199.698323]
[  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
[  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
[  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
[  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
[  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
[  199.698364] Stack:
[  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
[  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
[  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
[  199.698496] Call Trace:
[  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
[  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
[  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
[  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
[  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
[  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
[  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
[  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
[  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
[  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
[  199.698576]  [<c10f3e08>] do_last+0x198/0x730
[  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
[  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
[  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
[  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
[  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
[  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
[  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
[  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
[  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
[  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
[  199.698893] CR2: 0000000000000078
[  199.698925] ---[ end trace 77c43ec023940cff ]---

Reported-and-tested-by: Ken Huang <csuhgw@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2f82d7e
@sashalevin sashalevin added a commit that referenced this pull request Apr 11, 2016
@jhovold jhovold USB: serial: fix race between probe and open
commit a65a6f1 upstream.

Fix race between probe and open by making sure that the disconnected
flag is not cleared until all ports have been registered.

A call to tty_open while probe is running may get a reference to the
serial structure in serial_install before its ports have been
registered. This may lead to usb_serial_core calling driver open before
port is fully initialised.

With ftdi_sio this result in the following NULL-pointer dereference as
the private data has not been initialised at open:

[  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698297] *pde = 00000000
[  199.698303] Oops: 0000 [#1] PREEMPT SMP
[  199.698313] Modules linked in: ftdi_sio usbserial
[  199.698323]
[  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
[  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
[  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
[  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
[  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
[  199.698364] Stack:
[  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
[  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
[  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
[  199.698496] Call Trace:
[  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
[  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
[  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
[  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
[  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
[  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
[  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
[  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
[  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
[  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
[  199.698576]  [<c10f3e08>] do_last+0x198/0x730
[  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
[  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
[  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
[  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
[  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
[  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
[  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
[  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
[  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
[  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
[  199.698893] CR2: 0000000000000078
[  199.698925] ---[ end trace 77c43ec023940cff ]---

Reported-and-tested-by: Ken Huang <csuhgw@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
3cb70c8
@sashalevin sashalevin added a commit that referenced this pull request Apr 12, 2016
@jhovold jhovold USB: serial: fix race between probe and open
commit a65a6f1 upstream.

Fix race between probe and open by making sure that the disconnected
flag is not cleared until all ports have been registered.

A call to tty_open while probe is running may get a reference to the
serial structure in serial_install before its ports have been
registered. This may lead to usb_serial_core calling driver open before
port is fully initialised.

With ftdi_sio this result in the following NULL-pointer dereference as
the private data has not been initialised at open:

[  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698297] *pde = 00000000
[  199.698303] Oops: 0000 [#1] PREEMPT SMP
[  199.698313] Modules linked in: ftdi_sio usbserial
[  199.698323]
[  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
[  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
[  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
[  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
[  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
[  199.698364] Stack:
[  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
[  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
[  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
[  199.698496] Call Trace:
[  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
[  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
[  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
[  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
[  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
[  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
[  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
[  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
[  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
[  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
[  199.698576]  [<c10f3e08>] do_last+0x198/0x730
[  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
[  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
[  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
[  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
[  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
[  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
[  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
[  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
[  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
[  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
[  199.698893] CR2: 0000000000000078
[  199.698925] ---[ end trace 77c43ec023940cff ]---

Reported-and-tested-by: Ken Huang <csuhgw@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
d88e869
@sashalevin sashalevin added a commit to sashalevin/linux-stable-security that referenced this pull request Apr 29, 2016
@jhovold jhovold USB: serial: fix race between probe and open
commit a65a6f1 upstream.

Fix race between probe and open by making sure that the disconnected
flag is not cleared until all ports have been registered.

A call to tty_open while probe is running may get a reference to the
serial structure in serial_install before its ports have been
registered. This may lead to usb_serial_core calling driver open before
port is fully initialised.

With ftdi_sio this result in the following NULL-pointer dereference as
the private data has not been initialised at open:

[  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698297] *pde = 00000000
[  199.698303] Oops: 0000 [#1] PREEMPT SMP
[  199.698313] Modules linked in: ftdi_sio usbserial
[  199.698323]
[  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
[  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
[  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
[  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
[  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
[  199.698364] Stack:
[  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
[  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
[  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
[  199.698496] Call Trace:
[  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
[  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
[  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
[  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
[  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
[  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
[  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
[  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
[  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
[  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
[  199.698576]  [<c10f3e08>] do_last+0x198/0x730
[  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
[  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
[  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
[  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
[  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
[  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
[  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
[  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
[  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
[  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
[  199.698893] CR2: 0000000000000078
[  199.698925] ---[ end trace 77c43ec023940cff ]---

Reported-and-tested-by: Ken Huang <csuhgw@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
d9487e5
@sashalevin sashalevin added a commit to sashalevin/linux-stable-security that referenced this pull request Apr 29, 2016
@jhovold jhovold USB: serial: fix race between probe and open
commit a65a6f1 upstream.

Fix race between probe and open by making sure that the disconnected
flag is not cleared until all ports have been registered.

A call to tty_open while probe is running may get a reference to the
serial structure in serial_install before its ports have been
registered. This may lead to usb_serial_core calling driver open before
port is fully initialised.

With ftdi_sio this result in the following NULL-pointer dereference as
the private data has not been initialised at open:

[  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698297] *pde = 00000000
[  199.698303] Oops: 0000 [#1] PREEMPT SMP
[  199.698313] Modules linked in: ftdi_sio usbserial
[  199.698323]
[  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
[  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
[  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
[  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
[  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
[  199.698364] Stack:
[  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
[  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
[  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
[  199.698496] Call Trace:
[  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
[  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
[  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
[  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
[  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
[  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
[  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
[  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
[  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
[  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
[  199.698576]  [<c10f3e08>] do_last+0x198/0x730
[  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
[  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
[  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
[  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
[  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
[  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
[  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
[  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
[  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
[  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
[  199.698893] CR2: 0000000000000078
[  199.698925] ---[ end trace 77c43ec023940cff ]---

Reported-and-tested-by: Ken Huang <csuhgw@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
36fd940
@sashalevin sashalevin added a commit to sashalevin/linux-stable-security that referenced this pull request Apr 29, 2016
@jhovold jhovold USB: serial: fix race between probe and open
commit a65a6f1 upstream.

Fix race between probe and open by making sure that the disconnected
flag is not cleared until all ports have been registered.

A call to tty_open while probe is running may get a reference to the
serial structure in serial_install before its ports have been
registered. This may lead to usb_serial_core calling driver open before
port is fully initialised.

With ftdi_sio this result in the following NULL-pointer dereference as
the private data has not been initialised at open:

[  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698297] *pde = 00000000
[  199.698303] Oops: 0000 [#1] PREEMPT SMP
[  199.698313] Modules linked in: ftdi_sio usbserial
[  199.698323]
[  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
[  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
[  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
[  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
[  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
[  199.698364] Stack:
[  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
[  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
[  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
[  199.698496] Call Trace:
[  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
[  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
[  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
[  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
[  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
[  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
[  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
[  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
[  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
[  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
[  199.698576]  [<c10f3e08>] do_last+0x198/0x730
[  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
[  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
[  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
[  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
[  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
[  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
[  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
[  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
[  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
[  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
[  199.698893] CR2: 0000000000000078
[  199.698925] ---[ end trace 77c43ec023940cff ]---

Reported-and-tested-by: Ken Huang <csuhgw@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
5111ece
@0day-ci 0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Jun 15, 2016
@jkrzyszt jkrzyszt staging: media: omap1: fix null pointer dereference in omap1_cam_probe()
Commit 76e5433 ("staging: media: omap1: Switch to
devm_ioremap_resource") moved assignment of struct resource *res =
platform_get_resource() several lines down. That resulted in the
following error:

[    3.793237] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[    3.802198] pgd = c0004000
[    3.805202] [00000004] *pgd=00000000
[    3.809373] Internal error: Oops: c5 [#1] ARM
[    3.814070] CPU: 0 PID: 1 Comm: swapper Not tainted 4.6.0-rc1+ #70
[    3.820570] Hardware name: Amstrad E3 (Delta)
[    3.825232] task: c1819440 ti: c181e000 task.ti: c181e000
[    3.830973] PC is at omap1_cam_probe+0x48/0x2d4
[    3.835873] LR is at devres_add+0x20/0x28

Move the assignment back up where it was before - it is used to build
an argument for a subsequent devm_kzalloc(). Also, restore the check
for null value of res - it shouldn't hurt.

While being at it:
- follow the recently introduced convention of direct return
  instead of jump to return with err value assigned,
- drop no longer needed res member from the definition of struct
  omap1_cam_dev.

Created and tested on Amstrad Delta aginst Linux-4.7-rc3

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
059c08b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment