Dear all,
+ stable(a)vger.kernel.org
It should be posted to stable(a)vger.kernel.org
in order to merge it to stable tree.
Regards,
Chanwoo Choi
On 19. 4. 12. 오전 8:30, Chanwoo Choi wrote:
> On 19. 4. 4. 오후 11:17, Yue Haibing wrote:
>> From: YueHaibing <yuehaibing(a)huawei.com>
>>
>> As Hans de Goede pointed, using this driver without ACPI
>> makes little sense, so add ACPI dependency to Kconfig entry
>> to fix a build error while CONFIG_ACPI is not set.
>>
>> drivers/extcon/extcon-axp288.c: In function 'axp288_extcon_probe':
>> drivers/extcon/extcon-axp288.c:363:20: error: dereferencing pointer to incomplete type
>> put_device(&adev->dev);
>>
>> Fixes: 0cf064db948a ("extcon: axp288: Convert to use acpi_dev_get_first_match_dev()")
>> Reported-by: Hulk Robot <hulkci(a)huawei.com>
>> Suggested-by: Hans de Goede <hdegoede(a)redhat.com>
>> Signed-off-by: YueHaibing <yuehaibing(a)huawei.com>
>> ---
>> v2: rework patch
>> ---
>> drivers/extcon/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
>> index 1ed4b45..de06faf 100644
>> --- a/drivers/extcon/Kconfig
>> +++ b/drivers/extcon/Kconfig
>> @@ -30,7 +30,7 @@ config EXTCON_ARIZONA
>>
>> config EXTCON_AXP288
>> tristate "X-Power AXP288 EXTCON support"
>> - depends on MFD_AXP20X && USB_SUPPORT && X86
>> + depends on MFD_AXP20X && USB_SUPPORT && X86 && ACPI
>> select USB_ROLE_SWITCH
>> help
>> Say Y here to enable support for USB peripheral detection
>>
>
> Applied it. Thanks.
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
Hello,
We ran automated tests on a patchset that was proposed for merging into this
kernel tree. The patches were applied to:
Kernel repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: 8b298d3a0bd5 - Linux 5.0.7
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Merge testing
-------------
We cloned this repository and checked out a ref:
Repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Ref: 8b298d3a0bd5 - Linux 5.0.7
We then merged the patchset with `git am`:
drm-i915-gvt-do-not-let-pin-count-of-shadow-mm-go-ne.patch
kbuild-pkg-use-f-srctree-makefile-to-recurse-to-top-.patch
netfilter-nft_compat-use-.release_ops-and-remove-lis.patch
netfilter-nf_tables-use-after-free-in-dynamic-operat.patch
netfilter-nf_tables-add-missing-release_ops-in-error.patch
hv_netvsc-fix-unwanted-wakeup-after-tx_disable.patch
ibmvnic-fix-completion-structure-initialization.patch
ip6_tunnel-match-to-arphrd_tunnel6-for-dev-type.patch
ipv6-fix-dangling-pointer-when-ipv6-fragment.patch
ipv6-sit-reset-ip-header-pointer-in-ipip6_rcv.patch
kcm-switch-order-of-device-registration-to-fix-a-cra.patch
net-ethtool-not-call-vzalloc-for-zero-sized-memory-r.patch
net-gro-fix-gro-flush-when-receiving-a-gso-packet.patch
net-mlx5-decrease-default-mr-cache-size.patch
netns-provide-pure-entropy-for-net_hash_mix.patch
net-rds-force-to-destroy-connection-if-t_sock-is-nul.patch
net-sched-act_sample-fix-divide-by-zero-in-the-traff.patch
net-sched-fix-get-helper-of-the-matchall-cls.patch
openvswitch-fix-flow-actions-reallocation.patch
qmi_wwan-add-olicard-600.patch
r8169-disable-aspm-again.patch
sctp-initialize-_pad-of-sockaddr_in-before-copying-t.patch
tcp-ensure-dctcp-reacts-to-losses.patch
tcp-fix-a-potential-null-pointer-dereference-in-tcp_.patch
vrf-check-accept_source_route-on-the-original-netdev.patch
net-mlx5e-fix-error-handling-when-refreshing-tirs.patch
net-mlx5e-add-a-lock-on-tir-list.patch
nfp-validate-the-return-code-from-dev_queue_xmit.patch
nfp-disable-netpoll-on-representors.patch
bnxt_en-improve-rx-consumer-index-validity-check.patch
bnxt_en-reset-device-on-rx-buffer-errors.patch
net-ip_gre-fix-possible-use-after-free-in-erspan_rcv.patch
net-ip6_gre-fix-possible-use-after-free-in-ip6erspan.patch
net-bridge-always-clear-mcast-matching-struct-on-rep.patch
net-thunderx-fix-null-pointer-dereference-in-nicvf_o.patch
net-vrf-fix-ping-failed-when-vrf-mtu-is-set-to-0.patch
net-core-netif_receive_skb_list-unlist-skb-before-pa.patch
r8169-disable-default-rx-interrupt-coalescing-on-rtl.patch
net-mlx5-add-a-missing-check-on-idr_find-free-buf.patch
net-mlx5e-update-xoff-formula.patch
net-mlx5e-update-xon-formula.patch
kbuild-clang-choose-gcc_toolchain_dir-not-on-ld.patch
lib-string.c-implement-a-basic-bcmp.patch
revert-clk-meson-clean-up-clock-registration.patch
Compile testing
---------------
We compiled the kernel for 3 architectures:
aarch64:
make options: -j20 INSTALL_MOD_STRIP=1 targz-pkg
configuration: https://artifacts.cki-project.org/builds/aarch64/kernel-stable_queue-aarch6…
kernel build: https://artifacts.cki-project.org/builds/aarch64/kernel-stable_queue-aarch6…
ppc64le:
make options: -j20 INSTALL_MOD_STRIP=1 targz-pkg
configuration: https://artifacts.cki-project.org/builds/ppc64le/kernel-stable_queue-ppc64l…
kernel build: https://artifacts.cki-project.org/builds/ppc64le/kernel-stable_queue-ppc64l…
x86_64:
make options: -j20 INSTALL_MOD_STRIP=1 targz-pkg
configuration: https://artifacts.cki-project.org/builds/x86_64/kernel-stable_queue-x86_64-…
kernel build: https://artifacts.cki-project.org/builds/x86_64/kernel-stable_queue-x86_64-…
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
✅ Boot test [0]
✅ LTP lite [1]
✅ AMTU (Abstract Machine Test Utility) [2]
🚧 ✅ audit: audit testsuite test [3]
✅ httpd: mod_ssl smoke sanity [4]
✅ httpd: php sanity [5]
✅ iotop: sanity [6]
✅ /CoreOS/net-snmp/Regression/bz251332-tcp-transport
✅ tuned: tune-processes-through-perf [7]
🚧 ✅ stress: stress-ng [8]
ppc64le:
✅ Boot test [0]
✅ LTP lite [1]
✅ AMTU (Abstract Machine Test Utility) [2]
🚧 ✅ audit: audit testsuite test [3]
✅ httpd: mod_ssl smoke sanity [4]
✅ httpd: php sanity [5]
✅ iotop: sanity [6]
✅ /CoreOS/net-snmp/Regression/bz251332-tcp-transport
🚧 ✅ selinux-policy: serge-testsuite [9]
✅ tuned: tune-processes-through-perf [7]
🚧 ✅ stress: stress-ng [8]
x86_64:
✅ Boot test [0]
✅ LTP lite [1]
✅ AMTU (Abstract Machine Test Utility) [2]
🚧 ✅ audit: audit testsuite test [3]
✅ httpd: mod_ssl smoke sanity [4]
✅ httpd: php sanity [5]
✅ iotop: sanity [6]
✅ /CoreOS/net-snmp/Regression/bz251332-tcp-transport
🚧 ✅ selinux-policy: serge-testsuite [9]
✅ tuned: tune-processes-through-perf [7]
🚧 ✅ stress: stress-ng [8]
Test source:
[0]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[1]: https://github.com/CKI-project/tests-beaker/archive/master.zip#distribution…
[2]: https://github.com/CKI-project/tests-beaker/archive/master.zip#misc/amtu
[3]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/aud…
[4]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/htt…
[5]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/htt…
[6]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/iot…
[7]: https://github.com/CKI-project/tests-beaker/archive/master.zip#packages/tun…
[8]: https://github.com/CKI-project/tests-beaker/archive/master.zip#stress/stres…
[9]: https://github.com/CKI-project/tests-beaker/archive/master.zip#/packages/se…
Waived tests (marked with 🚧)
-----------------------------
This test run included waived tests. Such tests are executed but their results
are not taken into account. Tests are waived when their results are not
reliable enough, e.g. when they're just introduced or are being fixed.
Steve,
This patch adds code to allow us to do fsctl passthrough for fsctl types that
need to pass data to the server.
This not only needs to pass the blob to the server but also need to decode
the access-type part of the fsctl code and change the arguments to the CREATE
accordingly.
The values for the access are from wireshark traces of win16 -> win16.
For now I only implement the special handling we need for
FILE_READ_WRITE_ACCESS.
We can add the others as needed and as we we discover them while adding
new functions to smbinfo.
BugLink: https://bugs.launchpad.net/bugs/1775165
[Note to upstream]
I understand that this patch is a little long for -stable, but this patch series
fixes a real issue, seen by real users, is testable, and is made up from
upstream commits. Please consider it.
[Impact]
When userspace tasks which are processing fanotify permission events act
incorrectly, the fsnotify_mark_srcu SRCU is held indefinitely which causes
the whole notification subsystem to hang.
This has been seen in production, and it can also be seen when running the
Linux Test Project testsuite, specifically fanotify07.
[Fix]
Instead of holding the SRCU lock while waiting for userspace to respond,
which may never happen, or not in the order we are expecting, we drop the
fsnotify_mark_srcu SRCU lock before waiting for userspace response, and then
reacquire the lock again when userspace responds.
The fixes are from a series of upstream commits:
05f0e38724e8449184acd8fbf0473ee5a07adc6c (cherry-pick)
9385a84d7e1f658bb2d96ab798393e4b16268aaa (backport)
abc77577a669f424c5d0c185b9994f2621c52aa4 (backport)
[Testcase]
You can reproduce the problem pretty quickly with the Linux Test Project:
Steps (with root):
1. sudo apt-get install git xfsprogs -y
2. git clone --depth=1 https://github.com/linux-test-project/ltp.git
3. cd ltp
4. make autotools
5. ./configure
6. make; make install
7. cd /opt/ltp
8. echo -e "fanotify07 fanotify07 \nfanotify08 fanotify08" > /tmp/jobs
9. ./runltp -f /tmp/jobs
On a stock 4.9.168 kernel, the system will hang, and the testcase will look like:
<<<test_start>>>
tag=fanotify07 stime=1554326200
cmdline="fanotify07 "
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1096: INFO: Timeout per run is 0h 05m 00s
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Test timeouted, sending SIGKILL!
Cannot kill test processes!
Congratulation, likely test hit a kernel bug.
Exitting uncleanly...
<<<execution_status>>>
initiation_status="ok"
duration=350 termination_type=exited termination_id=1 corefile=no
cutime=0 cstime=0
<<<test_end>>>
Looking at dmesg, we see the following call stack
[ 41.648244] LTP: starting fanotify07 (fanotify07 )
[ 242.729211] INFO: task fanotify07:1511 blocked for more than 120 seconds.
[ 242.729257] Not tainted 4.9.168vanilla #1
[ 242.729281] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 242.729320] fanotify07 D 0 1511 1510 0x00000000
[ 242.729325] ffff92faf98a64c0 ffff92faf50f8000 ffff92faf19f2d00 ffff92faf989ad00
[ 242.729329] ffff92faffc19900 ffffb2f5c0cbbc70 ffffffffae8cf2c2 ffffb2f5c0cbbd60
[ 242.729333] 00e590a200000010 ffff92faffc19900 0000000000000046 7fffffffffffffff
[ 242.729336] Call Trace:
[ 242.729345] [<ffffffffae8cf2c2>] ? __schedule+0x242/0x700
[ 242.729348] [<ffffffffae8cf7ac>] schedule+0x2c/0x80
[ 242.729351] [<ffffffffae8d2e0b>] schedule_timeout+0x1fb/0x370
[ 242.729355] [<ffffffffae0fcaae>] ? add_timer+0x11e/0x290
[ 242.729358] [<ffffffffae8d021a>] wait_for_completion+0xba/0x140
[ 242.729361] [<ffffffffae0b4ac0>] ? wake_up_q+0x80/0x80
[ 242.729364] [<ffffffffae0f1a44>] __synchronize_srcu+0xf4/0x140
[ 242.729367] [<ffffffffae0f08a0>] ? trace_raw_output_rcu_utilization+0x60/0x60
[ 242.729370] [<ffffffffae0f1ab3>] synchronize_srcu+0x23/0x40
[ 242.729374] [<ffffffffae283bab>] fsnotify_mark_destroy_list+0x7b/0xe0
[ 242.729377] [<ffffffffae282d7f>] fsnotify_destroy_group+0x1f/0x50
[ 242.729380] [<ffffffffae285e66>] fanotify_release+0xd6/0x140
[ 242.729384] [<ffffffffae23e70a>] __fput+0xea/0x230
[ 242.729386] [<ffffffffae23e88e>] ____fput+0xe/0x10
[ 242.729390] [<ffffffffae0a6f2c>] task_work_run+0x7c/0xa0
[ 242.729394] [<ffffffffae003753>] exit_to_usermode_loop+0x93/0xa0
[ 242.729397] [<ffffffffae003bc7>] do_syscall_64+0xc7/0xe0
[ 242.729400] [<ffffffffae8d448e>] entry_SYSCALL_64_after_swapgs+0x58/0xc6
Note this call stack is the same as the one for 4.4, but some function names
have changed due to the two commits already included in 4.9.
On a patched kernel, the test will pass successfully, and there will be no
messages in dmesg.
[Regression Potential]
This makes modifications to how locking is performed in fsnotify / fanotify and
there may be some cause for regression. Running all fanotify Linux Test Project
tests shows that there are no extra failures caused by the patches, and instead
fewer failures are seen due to the bugfix.
Running the entire Linux Test Project testsuite actually works and runs to
completion, something which doesn't happen in a unpatched kernel since it will
hang on the fanotify07 test.
The patches are taken from upstream, and all necessary commits have been taken
into account, so I am happy with the potential risks and that testing has been
completed.
Jan Kara (3):
fsnotify: Provide framework for dropping SRCU lock in ->handle_event
fsnotify: Pass fsnotify_iter_info into handle_event handler
fanotify: Release SRCU lock when waiting for userspace response
fs/notify/dnotify/dnotify.c | 3 +-
fs/notify/fanotify/fanotify.c | 20 ++++++-
fs/notify/fsnotify.c | 19 +++++--
fs/notify/fsnotify.h | 6 ++
fs/notify/group.c | 1 +
fs/notify/inotify/inotify.h | 3 +-
fs/notify/inotify/inotify_fsnotify.c | 3 +-
fs/notify/inotify/inotify_user.c | 2 +-
fs/notify/mark.c | 83 +++++++++++++++++++++++++++-
include/linux/fsnotify_backend.h | 8 ++-
kernel/audit_fsnotify.c | 3 +-
kernel/audit_tree.c | 3 +-
kernel/audit_watch.c | 3 +-
13 files changed, 139 insertions(+), 18 deletions(-)
--
2.19.1
On Tue, Apr 09, 2019 at 02:50:04PM +0900, Masahiro Yamada wrote:
>Greg, Sasha,
>
>
>Sorry, the commit ID was wrong.
>
>
>The following commit for 4.19.x:
>
>commit 02826a6ba301b72461c3706e1cc66d5571cd327e
>Author: Masahiro Yamada <yamada.masahiro(a)socionext.com>
>Date: Mon Nov 5 16:52:34 2018 +0900
>
> kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used
This commit claims it's fixing 80463f1b7bf9, which is not in 4.19. Was
that a mistake in the commit message?
--
Thanks,
Sasha