]>
git.ipfire.org Git - thirdparty/kernel/stable.git/log
Chuck Lever [Sun, 22 Nov 2020 17:49:52 +0000 (12:49 -0500)]
NFSD: Make nfsd4_ops::opnum a u32
[ Upstream commit
3a237b4af5b7b0e77588e120554077cab3341943 ]
Avoid passing a "pointer to int" argument to xdr_stream_decode_u32.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 16:04:02 +0000 (11:04 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_listxattrs()
[ Upstream commit
2212036cadf4da3c4b0e4bd2a9a8c3d78617ab4f ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 15:59:57 +0000 (10:59 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_setxattr()
[ Upstream commit
403366a7e8e2930002157525cd44add7fa01bca9 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 15:56:52 +0000 (10:56 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_xattr_name()
[ Upstream commit
830c71502ae0ae1677ac6c08ffbcf85a6e7b2937 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 15:46:46 +0000 (10:46 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_clone()
[ Upstream commit
3dfd0b0e15671e2b4047ccb9222432f0b2d930be ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 15:54:47 +0000 (10:54 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_seek()
[ Upstream commit
9d32b412fe0a6186cc57789d218e8f8299454ae2 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Sat, 21 Nov 2020 19:21:25 +0000 (14:21 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_offload_status()
[ Upstream commit
2846bb0525a73e00b3566fda535ea6a5879e2971 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Sat, 21 Nov 2020 19:19:24 +0000 (14:19 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_copy_notify()
[ Upstream commit
f9a953fb369bbd2135ccead3393ec1ef66544471 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 15:49:37 +0000 (10:49 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_copy()
[ Upstream commit
e8febea7190bcbd1e608093acb67f2a5009556aa ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 23:05:06 +0000 (18:05 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_nl4_server()
[ Upstream commit
f49e4b4d58cc835d8bd0cc9663f7b9c5497e0e7e ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 15:44:05 +0000 (10:44 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_fallocate()
[ Upstream commit
6aef27aaeae7611f98af08205acc79f5a8f3aa59 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 20:02:11 +0000 (15:02 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_reclaim_complete()
[ Upstream commit
0d6467844d437e07db1e76d96176b1a55401018c ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 20:15:09 +0000 (15:15 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_destroy_clientid()
[ Upstream commit
c95f2ec3490586cbb33badc8f4c82d6aa4955078 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:57:44 +0000 (14:57 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_test_stateid()
[ Upstream commit
b7a0c8f6e741bf9dee0d24e69d3ce51fa4ccce78 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:55:19 +0000 (14:55 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_sequence()
[ Upstream commit
cf907b11326d9360877d6c6ea8f75e1b29f39f2f ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:33:12 +0000 (14:33 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_secinfo_no_name()
[ Upstream commit
53d70873e37c09a582167ed73d1858e3a2af0157 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 15:42:25 +0000 (10:42 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_layoutreturn()
[ Upstream commit
645fcad371420913c30e9aca80fc0a38f3acf432 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 20:06:04 +0000 (15:06 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_layoutget()
[ Upstream commit
c8e88e3aa73889421461f878cd569ef84f231ceb ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 15:40:07 +0000 (10:40 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_layoutcommit()
[ Upstream commit
5185980d8a23001c2317c290129ab7ab20067e20 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 20:03:50 +0000 (15:03 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_getdeviceinfo()
[ Upstream commit
044959715f370b24870c95df3940add8710c5a29 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Sun, 1 Nov 2020 18:38:27 +0000 (13:38 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_free_stateid()
[ Upstream commit
aec387d5909304810d899f7d90ae57df33f3a75c ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 18:50:55 +0000 (13:50 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_destroy_session()
[ Upstream commit
94e254af1f873b4b551db4c4549294f2c4d385ef ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:52:44 +0000 (14:52 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_create_session()
[ Upstream commit
81243e3fe37ed547fc4ed8aab1cec2865540bb18 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 20:35:05 +0000 (15:35 -0500)]
NFSD: Add a helper to decode channel_attrs4
[ Upstream commit
3a3f1fbacb0960b628e5a9f07c78287312f7a99d ]
De-duplicate some code.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 20:21:55 +0000 (15:21 -0500)]
NFSD: Add a helper to decode nfs_impl_id4
[ Upstream commit
10ff84228197f47401833495ba19a50131323b4a ]
Refactor for clarity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 2 Nov 2020 20:19:12 +0000 (15:19 -0500)]
NFSD: Add a helper to decode state_protect4_a
[ Upstream commit
523ec6ed6fb80fd1537d748a06bffd060a8b3235 ]
Refactor for clarity.
Also, remove a stale comment. Commit
ed94164398c9 ("nfsd: implement
machine credential support for some operations") added support for
SP4_MACH_CRED, so state_protect_a is no longer completely ignored.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 16:17:50 +0000 (11:17 -0500)]
NFSD: Add a separate decoder for ssv_sp_parms
[ Upstream commit
547bfeb4cd8d491aabbd656d5a6f410cb4249b4e ]
Refactor for clarity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 16:13:00 +0000 (11:13 -0500)]
NFSD: Add a separate decoder to handle state_protect_ops
[ Upstream commit
2548aa784d760567c2a77cbd8b7c55b211167c37 ]
Refactor for clarity and de-duplication of code.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:16:23 +0000 (13:16 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_bind_conn_to_session()
[ Upstream commit
571e0451c4de0a545960ffaea16d969931afc563 ]
A dedicated sessionid4 decoder is introduced that will be used by
other operation decoders in subsequent patches.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:14:35 +0000 (13:14 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_backchannel_ctl()
[ Upstream commit
0f81d96098f8eb707afe2f8d5c3fe0f9316ef5ce ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:09:34 +0000 (13:09 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_cb_sec()
[ Upstream commit
1a99440807bfc66597aaa2e0f0213c319b023e34 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 18:42:25 +0000 (13:42 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_release_lockowner()
[ Upstream commit
a4a80c15ca4dd998ab5cbe87bd856c626a318a80 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:44:28 +0000 (14:44 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_write()
[ Upstream commit
244e2befcba80f42c65293b6c56282bb78f9f417 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:40:32 +0000 (14:40 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_verify()
[ Upstream commit
67cd453eeda86be90f83a0f4798f33832cf2d98c ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 20:12:33 +0000 (15:12 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_setclientid_confirm()
[ Upstream commit
d1ca55149d67e5896f89a30053f5d83c002ac10e ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:35:02 +0000 (14:35 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_setclientid()
[ Upstream commit
92fa6c08c251d52d0d7b46066ecf87b96a0c4b8f ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Sat, 21 Nov 2020 19:14:59 +0000 (14:14 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_setattr()
[ Upstream commit
44592fe9479d8d4b88594365ab825f7b07afdf7c ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 20:09:42 +0000 (15:09 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_secinfo()
[ Upstream commit
d0abdae5191a916d767164f6fc6c0e2e814a20a7 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 20:08:50 +0000 (15:08 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_renew()
[ Upstream commit
d12f90458dc8c11734ba44ec88f109bf8de86ff0 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 20:05:58 +0000 (15:05 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_rename()
[ Upstream commit
ba881a0a5342b3aaf83958901ebe3fe752eaab46 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 20:04:36 +0000 (15:04 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_remove()
[ Upstream commit
b7f5fbf219aecda98e32de305551e445f9438899 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:30:59 +0000 (14:30 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_readdir()
[ Upstream commit
0dfaf2a371436860ace6af889e6cd8410ee63164 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:28:24 +0000 (14:28 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_read()
[ Upstream commit
3909c3bc604688503e31ddceb429dc156c4720c1 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:23:02 +0000 (14:23 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_putfh()
[ Upstream commit
a73bed98413b1d9eb4466f776a56d2fde8b3b2c9 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:21:01 +0000 (14:21 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_open_downgrade()
[ Upstream commit
dca71651f097ea608945d7a66bf62761a630de9a ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 19:18:57 +0000 (14:18 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_open_confirm()
[ Upstream commit
06bee693a1f1cb774b91000f05a6e183c257d8e9 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Sun, 1 Nov 2020 17:04:06 +0000 (12:04 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_open()
[ Upstream commit
61e5e0b3ec713d1365008c8af3fe5fdd262e2a60 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 22:45:04 +0000 (17:45 -0500)]
NFSD: Add helper to decode OPEN's open_claim4 argument
[ Upstream commit
1708e50b0145f393acbec9e319bdf0e33f765d25 ]
Refactor for clarity.
Note that op_fname is the only instance of an NFSv4 filename stored
in a struct xdr_netobj. Convert it to a u32/char * pair so that the
new nfsd4_decode_filename() helper can be used.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 22:56:17 +0000 (17:56 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_share_deny()
[ Upstream commit
b07bebd9eb9842e2d0dea87efeb92884556e55b0 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 22:54:48 +0000 (17:54 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_share_access()
[ Upstream commit
9aa62f5199749b274454b6d7d914c9b2a5e77031 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 22:41:21 +0000 (17:41 -0500)]
NFSD: Add helper to decode OPEN's openflag4 argument
[ Upstream commit
e6ec04b27bfb4869c0e35fbcf24333d379f101d5 ]
Refactor for clarity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 22:37:42 +0000 (17:37 -0500)]
NFSD: Add helper to decode OPEN's createhow4 argument
[ Upstream commit
bf33bab3c4182cdd795983f14de5606e82fab377 ]
Refactor for clarity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 22:34:01 +0000 (17:34 -0500)]
NFSD: Add helper to decode NFSv4 verifiers
[ Upstream commit
796dd1c6b680959ac968b52aa507911b288b1749 ]
This helper will be used to simplify decoders in subsequent
patches.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 20:02:40 +0000 (15:02 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_lookup()
[ Upstream commit
3d5877e8e03f60d7cc804d7b230ff9c00c9c07bd ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:33:28 +0000 (13:33 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_locku()
[ Upstream commit
ca9cf9fc27f8f722e9eb2763173ba01f6ac3dad1 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:31:44 +0000 (13:31 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_lockt()
[ Upstream commit
0a146f04aa0fa7a57aaed3913d1c2732b3853f31 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:29:27 +0000 (13:29 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_lock()
[ Upstream commit
7c59deed5cd2e1cfc6cbecf06f4584ac53755f53 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 22:16:52 +0000 (17:16 -0500)]
NFSD: Add helper for decoding locker4
[ Upstream commit
8918cc0d2b72db9997390626010b182c4500d749 ]
Refactor for clarity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 16 Nov 2020 22:25:02 +0000 (17:25 -0500)]
NFSD: Add helpers to decode a clientid4 and an NFSv4 state owner
[ Upstream commit
144e82694092ff80b5e64749d6822cd8947587f2 ]
These helpers will also be used to simplify decoders in subsequent
patches.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 16:41:55 +0000 (11:41 -0500)]
NFSD: Relocate nfsd4_decode_opaque()
[ Upstream commit
5dcbfabb676b2b6d97767209cf707eb463ca232a ]
Enable nfsd4_decode_opaque() to be used in more decoders, and
replace the READ* macros in nfsd4_decode_opaque().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 4 Nov 2020 20:01:24 +0000 (15:01 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_link()
[ Upstream commit
5c505d128691c70991b766dd6a3faf49fa59ecfb ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 19:40:20 +0000 (14:40 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_getattr()
[ Upstream commit
f759eff260f1f0b0f56531517762f27ee3233506 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Sat, 21 Nov 2020 19:11:58 +0000 (14:11 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_delegreturn()
[ Upstream commit
95e6482cedfc0785b85db49b72a05323bbf41750 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:24:10 +0000 (13:24 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_create()
[ Upstream commit
000dfa18b3df9c62df5f768f9187cf1a94ded71d ]
A dedicated decoder for component4 is introduced here, which will be
used by other operation decoders in subsequent patches.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 17:56:05 +0000 (12:56 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_fattr()
[ Upstream commit
d1c263a031e876ac3ca5223c728e4d98ed50b3c0 ]
Let's be more careful to avoid overrunning the memory that backs
the bitmap array. This requires updating the synopsis of
nfsd4_decode_fattr().
Bruce points out that a server needs to be careful to return nfs_ok
when a client presents bitmap bits the server doesn't support. This
includes bits in bitmap words the server might not yet support.
The current READ* based implementation is good about that, but that
requirement hasn't been documented.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 19:07:43 +0000 (14:07 -0500)]
NFSD: Replace READ* macros that decode the fattr4 umask attribute
[ Upstream commit
66f0476c704c86d44aa9da19d4753df66f2dbc96 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 19:05:51 +0000 (14:05 -0500)]
NFSD: Replace READ* macros that decode the fattr4 security label attribute
[ Upstream commit
dabe91828f92cd493e9e75efbc10f9878d2a73fe ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 19:01:08 +0000 (14:01 -0500)]
NFSD: Replace READ* macros that decode the fattr4 time_set attributes
[ Upstream commit
1c3eff7ea4a98c642134ee493001ae13b79ff38c ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 18:58:18 +0000 (13:58 -0500)]
NFSD: Replace READ* macros that decode the fattr4 owner_group attribute
[ Upstream commit
393c31dd27f83adb06b07a1b5f0a5b8966a0f01e ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 18:56:42 +0000 (13:56 -0500)]
NFSD: Replace READ* macros that decode the fattr4 owner attribute
[ Upstream commit
9853a5ac9be381917e9be0b4133cd4ac5a7ad875 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 18:54:26 +0000 (13:54 -0500)]
NFSD: Replace READ* macros that decode the fattr4 mode attribute
[ Upstream commit
1c8f0ad7dd35fd12307904036c7c839f77b6e3f9 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 18:02:54 +0000 (13:02 -0500)]
NFSD: Replace READ* macros that decode the fattr4 acl attribute
[ Upstream commit
c941a96823cf52e742606b486b81ab346bf111c9 ]
Refactor for clarity and to move infrequently-used code out of line.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 18:47:16 +0000 (13:47 -0500)]
NFSD: Replace READ* macros that decode the fattr4 size attribute
[ Upstream commit
2ac1b9b2afbbacf597dbec722b23b6be62e4e41e ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 19 Nov 2020 18:09:13 +0000 (13:09 -0500)]
NFSD: Change the way the expected length of a fattr4 is checked
[ Upstream commit
081d53fe0b43c47c36d1832b759bf14edde9cdbb ]
Because the fattr4 is now managed in an xdr_stream, all that is
needed is to store the initial position of the stream before
decoding the attribute list. Then the actual length of the list
is computed using the final stream position, after decoding is
complete.
No behavior change is expected.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:19:51 +0000 (13:19 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_commit()
[ Upstream commit
cbd9abb3706e96563b36af67595707a7054ab693 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:18:23 +0000 (13:18 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_close()
[ Upstream commit
d3d2f38154571e70d5806b5c5264bf61c101ea15 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 18:12:27 +0000 (13:12 -0500)]
NFSD: Replace READ* macros in nfsd4_decode_access()
[ Upstream commit
d169a6a9e5fd7f9e4b74e5e5d2e5a4fd0f84ef05 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Tue, 3 Nov 2020 16:54:23 +0000 (11:54 -0500)]
NFSD: Replace the internals of the READ_BUF() macro
[ Upstream commit
c1346a1216ab5cb04a265380ac9035d91b16b6d5 ]
Convert the READ_BUF macro in nfs4xdr.c from open code to instead
use the new xdr_stream-style decoders already in use by the encode
side (and by the in-kernel NFS client implementation). Once this
conversion is done, each individual NFSv4 argument decoder can be
independently cleaned up to replace these macros with C code.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Sat, 21 Nov 2020 16:36:42 +0000 (11:36 -0500)]
NFSD: Add tracepoints in nfsd4_decode/encode_compound()
[ Upstream commit
08281341be8ebc97ee47999812bcf411942baa1e ]
For troubleshooting purposes, record failures to decode NFSv4
operation arguments and encode operation results.
trace_nfsd_compound_decode_err() replaces the dprintk() call sites
that are embedded in READ_* macros that are about to be removed.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Mon, 19 Oct 2020 17:00:29 +0000 (13:00 -0400)]
NFSD: Add tracepoints in nfsd_dispatch()
[ Upstream commit
0dfdad1c1d1b77b9b085f4da390464dd0ac5647a ]
For troubleshooting purposes, record GARBAGE_ARGS and CANT_ENCODE
failures.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 5 Nov 2020 19:48:29 +0000 (14:48 -0500)]
NFSD: Add common helpers to decode void args and encode void results
[ Upstream commit
788f7183fba86b46074c16e7d57ea09302badff4 ]
Start off the conversion to xdr_stream by de-duplicating the functions
that decode void arguments and encode void results.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 5 Nov 2020 16:19:42 +0000 (11:19 -0500)]
SUNRPC: Prepare for xdr_stream-style decoding on the server-side
[ Upstream commit
5191955d6fc65e6d4efe8f4f10a6028298f57281 ]
A "permanent" struct xdr_stream is allocated in struct svc_rqst so
that it is usable by all server-side decoders. A per-rqst scratch
buffer is also allocated to handle decoding XDR data items that
cross page boundaries.
To demonstrate how it will be used, add the first call site for the
new svcxdr_init_decode() API.
As an additional part of the overall conversion, add symbolic
constants for successful and failed XDR operations. Returning "0" is
overloaded. Sometimes it means something failed, but sometimes it
means success. To make it more clear when XDR decoding functions
succeed or fail, introduce symbolic constants.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 11 Nov 2020 20:52:47 +0000 (15:52 -0500)]
SUNRPC: Add xdr_set_scratch_page() and xdr_reset_scratch_buffer()
[ Upstream commit
0ae4c3e8a64ace1b8d7de033b0751afe43024416 ]
Clean up: De-duplicate some frequently-used code.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Huang Guobin [Wed, 25 Nov 2020 08:39:33 +0000 (03:39 -0500)]
nfsd: Fix error return code in nfsd_file_cache_init()
[ Upstream commit
231307df246eb29f30092836524ebb1fcb8f5b25 ]
Fix to return PTR_ERR() error code from the error handling case instead of
0 in function nfsd_file_cache_init(), as done elsewhere in this function.
Fixes: 65294c1f2c5e7("nfsd: add a new struct file caching facility to nfsd")
Signed-off-by: Huang Guobin <huangguobin4@huawei.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 27 Aug 2020 20:09:53 +0000 (16:09 -0400)]
NFSD: Add SPDX header for fs/nfsd/trace.c
[ Upstream commit
f45a444cfe582b85af937a30d35d68d9a84399dd ]
Clean up.
The file was contributed in 2014 by Christoph Hellwig in commit
31ef83dc0538 ("nfsd: add trace events").
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Fri, 4 Sep 2020 19:06:26 +0000 (15:06 -0400)]
NFSD: Remove extra "0x" in tracepoint format specifier
[ Upstream commit
3a90e1dff16afdae6e1c918bfaff24f4d0f84869 ]
Clean up: %p adds its own 0x already.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 19 Aug 2020 16:56:40 +0000 (12:56 -0400)]
NFSD: Clean up the show_nf_may macro
[ Upstream commit
b76278ae68848cea13b325d247aa5cf31c87edac ]
Display all currently possible NFSD_MAY permission flags.
Move and rename show_nf_may with a more generic name because the
NFSD_MAY permission flags are used in other places besides the file
cache.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Alex Shi [Fri, 6 Nov 2020 05:40:57 +0000 (13:40 +0800)]
nfsd/nfs3: remove unused macro nfsd3_fhandleres
[ Upstream commit
71fd721839a74d945c242299f6be29a246fc2131 ]
The macro is unused, remove it to tame gcc warning:
fs/nfsd/nfs3proc.c:702:0: warning: macro "nfsd3_fhandleres" is not used
[-Wunused-macros]
Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Tom Rix [Sun, 1 Nov 2020 15:32:34 +0000 (07:32 -0800)]
NFSD: A semicolon is not needed after a switch statement.
[ Upstream commit
25fef48bdbe7cac5ba5577eab6a750e1caea43bc ]
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Thu, 5 Nov 2020 15:24:19 +0000 (10:24 -0500)]
NFSD: Invoke svc_encode_result_payload() in "read" NFSD encoders
[ Upstream commit
76e5492b161f555c0fb69cad9eb39a7d8467f5fe ]
Have the NFSD encoders annotate the boundaries of every
direct-data-placement eligible result data payload. Then change
svcrdma to use that annotation instead of the xdr->page_len
when handling Write chunks.
For NFSv4 on RDMA, that enables the ability to recognize multiple
result payloads per compound. This is a pre-requisite for supporting
multiple Write chunks per RPC transaction.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Chuck Lever [Wed, 10 Jun 2020 14:36:42 +0000 (10:36 -0400)]
SUNRPC: Rename svc_encode_read_payload()
[ Upstream commit
03493bca084fdca48abc59b00e06ce733aa9eb7d ]
Clean up: "result payload" is a less confusing name for these
payloads. "READ payload" reflects only the NFS usage.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Greg Kroah-Hartman [Sun, 16 Jun 2024 11:32:37 +0000 (13:32 +0200)]
Linux 5.10.219
Link: https://lore.kernel.org/r/20240613113247.525431100@linuxfoundation.org
Tested-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
Tested-by: Pavel Machek (CIP) <pavel@denx.de>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chengchang Tang [Fri, 4 Aug 2023 01:27:11 +0000 (09:27 +0800)]
RDMA/hns: Fix CQ and QP cache affinity
commit
9e03dbea2b0634b21a45946b4f8097e0dc86ebe1 upstream.
Currently, the affinity between QP cache and CQ cache is not
considered when assigning QPN, it will affect the message rate of HW.
Allocate QPN from QP cache with better CQ affinity to get better
performance.
Fixes: 71586dd20010 ("RDMA/hns: Create QP with selected QPN for bank load balance")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20230804012711.808069-5-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yangyang Li [Tue, 19 Jan 2021 09:28:33 +0000 (17:28 +0800)]
RDMA/hns: Use mutex instead of spinlock for ida allocation
commit
9293d3fcb70583f2c786f04ca788af026b7c4c5c upstream.
GFP_KERNEL may cause ida_alloc_range() to sleep, but the spinlock covering
this function is not allowed to sleep, so the spinlock needs to be changed
to mutex.
As there is a certain chance of memory allocation failure, GFP_ATOMIC is
not suitable for QP allocation scenarios.
Fixes: 71586dd20010 ("RDMA/hns: Create QP with selected QPN for bank load balance")
Link: https://lore.kernel.org/r/1611048513-28663-1-git-send-email-liweihang@huawei.com
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chao Yu [Wed, 9 Dec 2020 08:42:14 +0000 (16:42 +0800)]
f2fs: compress: fix compression chksum
commit
75e91c888989cf2df5c78b251b07de1f5052e30e upstream.
This patch addresses minor issues in compression chksum.
Fixes: b28f047b28c5 ("f2fs: compress: support chksum")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Neil Armstrong [Mon, 21 Aug 2023 12:11:21 +0000 (14:11 +0200)]
scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5
commit
c422fbd5cb58c9a078172ae1e9750971b738a197 upstream.
The qunipro_g4_sel clear is also needed for new platforms with major
version > 5. Fix the version check to take this into account.
Fixes: 9c02aa24bf40 ("scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW version major 5")
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230821-topic-sm8x50-upstream-ufs-major-5-plus-v2-1-f42a4b712e58@linaro.org
Reviewed-by: "Bao D. Nguyen" <quic_nguyenb@quicinc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anna Schumaker [Thu, 25 Apr 2024 20:24:29 +0000 (16:24 -0400)]
NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS
commit
f06d1b10cb016d5aaecdb1804fefca025387bd10 upstream.
Olga showed me a case where the client was sending multiple READ_PLUS
calls to the server in parallel, and the server replied
NFS4ERR_OPNOTSUPP to each. The client would fall back to READ for the
first reply, but fail to retry the other calls.
I fix this by removing the test for NFS_CAP_READ_PLUS in
nfs4_read_plus_not_supported(). This allows us to reschedule any
READ_PLUS call that has a NFS4ERR_OPNOTSUPP return value, even after the
capability has been cleared.
Reported-by: Olga Kornievskaia <kolga@netapp.com>
Fixes: c567552612ec ("NFS: Add READ_PLUS data segment support")
Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergey Shtylyov [Fri, 10 May 2024 20:24:04 +0000 (23:24 +0300)]
nfs: fix undefined behavior in nfs_block_bits()
commit
3c0a2e0b0ae661457c8505fecc7be5501aa7a715 upstream.
Shifting *signed int* typed constant 1 left by 31 bits causes undefined
behavior. Specify the correct *unsigned long* type by using 1UL instead.
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Cc: stable@vger.kernel.org
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harald Freudenberger [Mon, 13 May 2024 12:49:13 +0000 (14:49 +0200)]
s390/ap: Fix crash in AP internal function modify_bitmap()
commit
d4f9d5a99a3fd1b1c691b7a1a6f8f3f25f4116c9 upstream.
A system crash like this
Failing address:
200000cb7df6f000 TEID:
200000cb7df6f403
Fault in home space mode while using kernel ASCE.
AS:
00000002d71bc007 R3:
00000003fe5b8007 S:
000000011a446000 P:
000000015660c13d
Oops: 0038 ilc:3 [#1] PREEMPT SMP
Modules linked in: mlx5_ib ...
CPU: 8 PID: 7556 Comm: bash Not tainted 6.9.0-rc7 #8
Hardware name: IBM 3931 A01 704 (LPAR)
Krnl PSW :
0704e00180000000 0000014b75e7b606 (ap_parse_bitmap_str+0x10e/0x1f8)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3
Krnl GPRS:
0000000000000001 ffffffffffffffc0 0000000000000001 00000048f96b75d3
000000cb00000100 ffffffffffffffff ffffffffffffffff 000000cb7df6fce0
000000cb7df6fce0 00000000ffffffff 000000000000002b 00000048ffffffff
000003ff9b2dbc80 200000cb7df6fcd8 0000014bffffffc0 000000cb7df6fbc8
Krnl Code:
0000014b75e7b5fc :
a7840047 brc 8,
0000014b75e7b68a
0000014b75e7b600 : 18b2 lr %r11,%r2
#
0000014b75e7b602 :
a7f4000a brc 15,
0000014b75e7b616
>
0000014b75e7b606 :
eb22d00000e6 laog %r2,%r2,0(%r13)
0000014b75e7b60c :
a7680001 lhi %r6,1
0000014b75e7b610 : 187b lr %r7,%r11
0000014b75e7b612 :
84960021 brxh %r9,%r6,
0000014b75e7b654
0000014b75e7b616 : 18e9 lr %r14,%r9
Call Trace:
[<
0000014b75e7b606 >] ap_parse_bitmap_str+0x10e/0x1f8
([<
0000014b75e7b5dc >] ap_parse_bitmap_str+0xe4/0x1f8)
[<
0000014b75e7b758 >] apmask_store+0x68/0x140
[<
0000014b75679196 >] kernfs_fop_write_iter+0x14e/0x1e8
[<
0000014b75598524 >] vfs_write+0x1b4/0x448
[<
0000014b7559894c >] ksys_write+0x74/0x100
[<
0000014b7618a440 >] __do_syscall+0x268/0x328
[<
0000014b761a3558 >] system_call+0x70/0x98
INFO: lockdep is turned off.
Last Breaking-Event-Address:
[<
0000014b75e7b636 >] ap_parse_bitmap_str+0x13e/0x1f8
Kernel panic - not syncing: Fatal exception: panic_on_oops
occured when /sys/bus/ap/a[pq]mask was updated with a relative mask value
(like +0x10-0x12,+60,-90) with one of the numeric values exceeding INT_MAX.
The fix is simple: use unsigned long values for the internal variables. The
correct checks are already in place in the function but a simple int for
the internal variables was used with the possibility to overflow.
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Baokun Li [Sat, 4 May 2024 07:55:25 +0000 (15:55 +0800)]
ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find()
commit
0c0b4a49d3e7f49690a6827a41faeffad5df7e21 upstream.
Syzbot reports a warning as follows:
============================================
WARNING: CPU: 0 PID: 5075 at fs/mbcache.c:419 mb_cache_destroy+0x224/0x290
Modules linked in:
CPU: 0 PID: 5075 Comm: syz-executor199 Not tainted
6.9.0-rc6-gb947cc5bf6d7
RIP: 0010:mb_cache_destroy+0x224/0x290 fs/mbcache.c:419
Call Trace:
<TASK>
ext4_put_super+0x6d4/0xcd0 fs/ext4/super.c:1375
generic_shutdown_super+0x136/0x2d0 fs/super.c:641
kill_block_super+0x44/0x90 fs/super.c:1675
ext4_kill_sb+0x68/0xa0 fs/ext4/super.c:7327
[...]
============================================
This is because when finding an entry in ext4_xattr_block_cache_find(), if
ext4_sb_bread() returns -ENOMEM, the ce's e_refcnt, which has already grown
in the __entry_find(), won't be put away, and eventually trigger the above
issue in mb_cache_destroy() due to reference count leakage.
So call mb_cache_entry_put() on the -ENOMEM error branch as a quick fix.
Reported-by: syzbot+dd43bd0f7474512edc47@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=dd43bd0f7474512edc47
Fixes: fb265c9cb49e ("ext4: add ext4_sb_bread() to disambiguate ENOMEM cases")
Cc: stable@kernel.org
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240504075526.2254349-2-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>