6.0.3-rc1 review
Subsystems (10)
Greg Kroah-Hartman
maintainerPATCH 439/862 ia64: export memory_add_physaddr_to_nid to fix cxl build error
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit 97c318bfbe84efded246e80428054f300042f110 ]
cxl_pmem.ko uses memory_add_physaddr_to_nid() but ia64 does not export it, so this causes a build error:
ERROR: modpost: "memory_add_physaddr_to_nid" [drivers/cxl/cxl_pmem.ko] undefined!
Fix this by exporting that function.
--- arch/ia64/mm/numa.c | 1 + 1 file changed, 1 insertion(+)
arch/ia64/mm/numa.c +1 -0
@@ -75,5 +75,6 @@ int memory_add_physaddr_to_nid(u64 addr)return 0 ;return nid; } +EXPORT_SYMBOL (memory_add_physaddr_to_nid);#endif #endif
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 1/862 ALSA: oss: Fix potential deadlock at unregistration
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 97d917879d7f92df09c3f21fd54609a8bcd654b2 upstream.
We took sound_oss_mutex around the calls of unregister_sound_special() at unregistering OSS devices. This may, however, lead to a deadlock, because we manage the card release via the card's device object, and the release may happen at unregister_sound_special() call -- which will take sound_oss_mutex again in turn.
Although the deadlock might be fixed by relaxing the rawmidi mutex in the previous commit, it's safer to move unregister_sound_special() calls themselves out of the sound_oss_mutex, too. The call is race-safe as the function has a spinlock protection by itself.
--- sound/core/sound_oss.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
sound/core/sound_oss.c +9 -4
@@ -162,7 +162,6 @@ int snd_unregister_oss_device(int type,mutex_unlock (&sound_oss_mutex);return -ENOENT ; } -unregister_sound_special (minor);switch (SNDRV_MINOR_OSS_DEVICE (minor)) {case SNDRV_MINOR_OSS_PCM : track2 =SNDRV_MINOR_OSS (cidx,SNDRV_MINOR_OSS_AUDIO );
@@ -174,12 +173,18 @@ int snd_unregister_oss_device(int type, track2 =SNDRV_MINOR_OSS (cidx,SNDRV_MINOR_OSS_DMMIDI1 );break ; } -if (track2 >=0 ) { -unregister_sound_special (track2); +if (track2 >=0 ) snd_oss_minors[track2] =NULL ; - } snd_oss_minors[minor] =NULL ;mutex_unlock (&sound_oss_mutex); + +/* call unregister_sound_special() outside sound_oss_mutex; +* otherwise may deadlock, as it can trigger the release of a card +*/ +unregister_sound_special (minor); +if (track2 >=0 ) +unregister_sound_special (track2); +kfree (mptr);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 10/862 io_uring: add custom opcode hooks on fail
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit a47b255e90395bdb481975ab3d9e96fcf8b3165f upstream.
Sometimes we have to do a little bit of a fixup on a request failuer in io_req_complete_failed(). Add a callback in opdef for that.
--- io_uring/io_uring.c | 4 ++++ io_uring/opdef.h | 1 + 2 files changed, 5 insertions(+)
io_uring/io_uring.c +4 -0
@@ -823,8 +823,12 @@ inline void __io_req_complete(struct io_void io_req_complete_failed (struct io_kiocb *req,s32 res) { +const struct io_op_def *def = &io_op_defs[req->opcode]; +req_set_fail (req);io_req_set_res (req, res,io_put_kbuf (req,IO_URING_F_UNLOCKED )); +if (def->fail) + def->fail (req);io_req_complete_post (req); }
io_uring/opdef.h +1 -0
@@ -36,6 +36,7 @@ struct io_op_def {int (*issue)(struct io_kiocb *,unsigned int );int (*prep_async)(struct io_kiocb *);void (*cleanup)(struct io_kiocb *); +void (*fail)(struct io_kiocb *); };extern const struct io_op_def io_op_defs[];
Greg Kroah-Hartman
maintainerPATCH 11/862 io_uring/rw: dont lose partial IO result on fail
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit 47b4c68660752facfa6247b1fc9ca9d722b8b601 upstream.
A partially done read/write may end up in io_req_complete_failed() and loose the result, make sure we return the number of bytes processed.
--- io_uring/opdef.c | 6 ++++++ io_uring/rw.c | 8 ++++++++ io_uring/rw.h | 1 + 3 files changed, 15 insertions(+)
io_uring/opdef.c +6 -0
@@ -69,6 +69,7 @@ const struct io_op_def io_op_defs[] = { .issue = io_read, .prep_async = io_readv_prep_async, .cleanup = io_readv_writev_cleanup, + .fail = io_rw_fail, }, [IORING_OP_WRITEV] = { .needs_file = 1,
@@ -85,6 +86,7 @@ const struct io_op_def io_op_defs[] = { .issue = io_write, .prep_async = io_writev_prep_async, .cleanup = io_readv_writev_cleanup, + .fail = io_rw_fail, }, [IORING_OP_FSYNC] = { .needs_file = 1,
@@ -105,6 +107,7 @@ const struct io_op_def io_op_defs[] = { .name = "READ_FIXED", .prep = io_prep_rw, .issue = io_read, + .fail = io_rw_fail, }, [IORING_OP_WRITE_FIXED] = { .needs_file = 1,
@@ -119,6 +122,7 @@ const struct io_op_def io_op_defs[] = { .name = "WRITE_FIXED", .prep = io_prep_rw, .issue = io_write, + .fail = io_rw_fail, }, [IORING_OP_POLL_ADD] = { .needs_file = 1,
@@ -273,6 +277,7 @@ const struct io_op_def io_op_defs[] = { .name = "READ", .prep = io_prep_rw, .issue = io_read, + .fail = io_rw_fail, }, [IORING_OP_WRITE] = { .needs_file = 1,
@@ -287,6 +292,7 @@ const struct io_op_def io_op_defs[] = { .name = "WRITE", .prep = io_prep_rw, .issue = io_write, + .fail = io_rw_fail, }, [IORING_OP_FADVISE] = { .needs_file = 1,
io_uring/rw.c +8 -0
@@ -984,6 +984,14 @@ static void io_cqring_ev_posted_iopoll(sio_cqring_wake (ctx); } +void io_rw_fail (struct io_kiocb *req) +{ +int res; + + res =io_fixup_rw_res (req, req->cqe.res); +io_req_set_res (req, res, req->cqe.flags); +} +int io_do_iopoll (struct io_ring_ctx *ctx,bool force_nonspin) {struct io_wq_work_node *pos, *start, *prev;
io_uring/rw.h +1 -0
@@ -21,3 +21,4 @@ int io_readv_prep_async(struct io_kiocbint io_write (struct io_kiocb *req,unsigned int issue_flags);int io_writev_prep_async (struct io_kiocb *req);void io_readv_writev_cleanup (struct io_kiocb *req); +void io_rw_fail (struct io_kiocb *req);
Greg Kroah-Hartman
maintainerPATCH 12/862 io_uring/net: dont lose partial send/recv on fail
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit 7e6b638ed501cced4e472298d6b08dd16346f3a6 upstream.
Just as with rw, partial send/recv may end up in io_req_complete_failed() and loose the result, make sure we return the number of bytes processed.
--- io_uring/net.c | 10 ++++++++++ io_uring/net.h | 2 ++ io_uring/opdef.c | 4 ++++ 3 files changed, 16 insertions(+)
io_uring/net.c +10 -0
@@ -1087,6 +1087,16 @@ int io_sendzc(struct io_kiocb *req, unsireturn IOU_OK ; } +void io_sendrecv_fail (struct io_kiocb *req) +{ + struct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg); +int res = req->cqe.res; + +if (req->flags &REQ_F_PARTIAL_IO ) + res = sr->done_io; +io_req_set_res (req, res, req->cqe.flags); +} +int io_accept_prep (struct io_kiocb *req,const struct io_uring_sqe *sqe) { struct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept);
io_uring/net.h +2 -0
@@ -43,6 +43,8 @@ int io_recvmsg_prep(struct io_kiocb *reqint io_recvmsg (struct io_kiocb *req,unsigned int issue_flags);int io_recv (struct io_kiocb *req,unsigned int issue_flags); +void io_sendrecv_fail (struct io_kiocb *req); +int io_accept_prep (struct io_kiocb *req,const struct io_uring_sqe *sqe);int io_accept (struct io_kiocb *req,unsigned int issue_flags);
io_uring/opdef.c +4 -0
@@ -157,6 +157,7 @@ const struct io_op_def io_op_defs[] = { .issue = io_sendmsg, .prep_async = io_sendmsg_prep_async, .cleanup = io_sendmsg_recvmsg_cleanup, + .fail = io_sendrecv_fail, #else .prep = io_eopnotsupp_prep,#endif
@@ -174,6 +175,7 @@ const struct io_op_def io_op_defs[] = { .issue = io_recvmsg, .prep_async = io_recvmsg_prep_async, .cleanup = io_sendmsg_recvmsg_cleanup, + .fail = io_sendrecv_fail, #else .prep = io_eopnotsupp_prep,#endif
@@ -316,6 +318,7 @@ const struct io_op_def io_op_defs[] = {#if defined(CONFIG_NET ) .prep = io_sendmsg_prep, .issue = io_send, + .fail = io_sendrecv_fail, #else .prep = io_eopnotsupp_prep,#endif
@@ -331,6 +334,7 @@ const struct io_op_def io_op_defs[] = {#if defined(CONFIG_NET ) .prep = io_recvmsg_prep, .issue = io_recv, + .fail = io_sendrecv_fail, #else .prep = io_eopnotsupp_prep,#endif
Greg Kroah-Hartman
maintainerPATCH 14/862 io_uring/rw: dont lose short results on io_setup_async_rw()
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit c278d9f8ac0db5590909e6d9e85b5ca2b786704f upstream.
If a retry io_setup_async_rw() fails we lose result from the first io_iter_do_read(), which is a problem mostly for streams/sockets.
--- io_uring/rw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
io_uring/rw.c +5 -3
@@ -794,10 +794,12 @@ int io_read(struct io_kiocb *req, unsigniov_iter_restore (&s->iter, &s->iter_state); ret2 =io_setup_async_rw (req, iovec, s, true); -if (ret2) -return ret2; - iovec =NULL ; +if (ret2) { + ret = ret >0 ? ret : ret2; + goto done; + } + io = req->async_data; s = &io->s;/*
Greg Kroah-Hartman
maintainerPATCH 13/862 io_uring/rw: fix unexpected link breakage
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit bf68b5b34311ee57ed40749a1257a30b46127556 upstream.
req->cqe.res is set in io_read() to the amount of bytes left to be done, which is used to figure out whether to fail a read or not. However, io_read() may do another without returning, and we stash the previous value into ->bytes_done but forget to update cqe.res. Then we ask a read to do strictly less than cqe.res but expect the return to be exactly cqe.res.
Fix the bug by updating cqe.res for retries.
--- io_uring/rw.c | 1 + 1 file changed, 1 insertion(+)
io_uring/rw.c +1 -0
@@ -823,6 +823,7 @@ int io_read(struct io_kiocb *req, unsignreturn -EAGAIN ; } + req->cqe.res =iov_iter_count (&s->iter);/* * Now retry read with the IOCB_WAITQ parts set in the iocb. If * we get -EIOCBQUEUED, then we'll get a notification when the
Greg Kroah-Hartman
maintainerPATCH 16/862 io_uring/net: dont update msg_name if not provided
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit 6f10ae8a155446248055c7ddd480ef40139af788 upstream.
io_sendmsg_copy_hdr() may clear msg->msg_name if the userspace didn't provide it, we should retain NULL in this case.
--- io_uring/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
io_uring/net.c +2 -1
@@ -163,7 +163,8 @@ static int io_setup_async_msg(struct io_ } req->flags |=REQ_F_NEED_CLEANUP ;memcpy (async_msg, kmsg,sizeof (*kmsg)); - async_msg->msg.msg_name = &async_msg->addr; +if (async_msg->msg.msg_name) + async_msg->msg.msg_name = &async_msg->addr;/* if were using fast_iov, set it to the new one */ if (!kmsg->free_iov) {size_t fast_idx = kmsg->msg.msg_iter.iov - kmsg->fast_iov;
Greg Kroah-Hartman
maintainerPATCH 15/862 io_uring/net: fix fast_iov assignment in io_setup_async_msg()
In reply to Greg Kroah-HartmanFrom: Stefan Metzmacher <[email protected]>
commit 3e4cb6ebbb2bad201c1186bc0b7e8cf41dd7f7e6 upstream.
I hit a very bad problem during my tests of SENDMSG_ZC. BUG(); in first_iovec_segment() triggered very easily. The problem was io_setup_async_msg() in the partial retry case, which seems to happen more often with _ZC.
iov_iter_iovec_advance() may change i->iov in order to have i->iov_offset being only relative to the first element.
Which means kmsg->msg.msg_iter.iov is no longer the same as kmsg->fast_iov.
But this would rewind the copy to be the start ofasync_msg->fast_iov, which means the internal
state of sync_msg->msg.msg_iter is inconsitent.
I tested with 5 vectors with length like this 4, 0, 64, 20, 8388608 and got a short writes with:
- ret=2675244 min_ret=8388692 => remaining 5713448 sr->done_io=2675244
- ret=-EAGAIN => io_uring_poll_arm
- ret=4911225 min_ret=5713448 => remaining 802223 sr->done_io=7586469
- ret=-EAGAIN => io_uring_poll_arm
- ret=802223 min_ret=802223 => res=8388692
While this was easily triggered with SENDMSG_ZC (queued for 6.1),
it was a potential problem starting with 7ba89d2af17aa879dda30f5d5d3f152e587fc551 in 5.18 for IORING_OP_RECVMSG.
And also with 4c3c09439c08b03d9503df0ca4c7619c5842892e in 5.19
for IORING_OP_SENDMSG.
However 257e84a5377fbbc336ff563833a8712619acce56 introduced the critical code into io_setup_async_msg() in 5.11.
--- io_uring/net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
io_uring/net.c +4 -2
@@ -165,8 +165,10 @@ static int io_setup_async_msg(struct io_memcpy (async_msg, kmsg,sizeof (*kmsg)); async_msg->msg.msg_name = &async_msg->addr;/* if were using fast_iov, set it to the new one */ -if (!async_msg->free_iov) - async_msg->msg.msg_iter.iov = async_msg->fast_iov; +if (!kmsg->free_iov) { +size_t fast_idx = kmsg->msg.msg_iter.iov - kmsg->fast_iov; + async_msg->msg.msg_iter.iov = &async_msg->fast_iov[fast_idx]; + }return -EAGAIN ; }
Greg Kroah-Hartman
maintainerPATCH 17/862 io_uring: limit registration w/ SINGLE_ISSUER
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit d7cce96c449e35bbfd41e830b341b95973891eed upstream.
IORING_SETUP_SINGLE_ISSUER restricts what tasks can submit requests. Extend it to registration as well, so non-owning task can't do registrations. It's not necessary at the moment but might be useful in the future.
--- io_uring/io_uring.c | 3 +++ 1 file changed, 3 insertions(+)
io_uring/io_uring.c +3 -0
@@ -3710,6 +3710,9 @@ static int __io_uring_register(struct ioif (WARN_ON_ONCE (percpu_ref_is_dying (&ctx->refs)))return -ENXIO ; +if (ctx->submitter_task && ctx->submitter_task != current) +return -EEXIST ; +if (ctx->restricted) {if (opcode >=IORING_REGISTER_LAST )return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 18/862 io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT
In reply to Greg Kroah-HartmanFrom: Jens Axboe <[email protected]>
commit 3fb1bd68817288729179444caf1fd5c5c4d2d65d upstream.
We treat EINPROGRESS like EAGAIN, but if we're retrying post getting EINPROGRESS, then we just need to check the socket for errors and terminate the request.
This was exposed on a bluetooth connection request which ends up taking a while and hitting EINPROGRESS, and yields a CQE result of -EBADFD because we're retrying a connect on a socket that is now connected.
--- io_uring/net.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-)
io_uring/net.c +22 -6
@@ -46,6 +46,7 @@ struct io_connect {struct file *file;struct sockaddr __user *addr;int addr_len; +bool in_progress; };struct io_sr_msg {
@@ -1263,6 +1264,7 @@ int io_connect_prep(struct io_kiocb *req conn->addr =u64_to_user_ptr (READ_ONCE (sqe->addr)); conn->addr_len =READ_ONCE (sqe->addr2); + conn->in_progress = false;return 0 ; }
@@ -1274,6 +1276,16 @@ int io_connect(struct io_kiocb *req, unsint ret;bool force_nonblock = issue_flags &IO_URING_F_NONBLOCK ; +if (connect->in_progress) { +struct socket *socket; + + ret = -ENOTSOCK ; + socket =sock_from_file (req->file); +if (socket) + ret =sock_error (socket->sk); + goto out; + } +if (req_has_async_data (req)) { io = req->async_data; }else {
@@ -1290,13 +1302,17 @@ int io_connect(struct io_kiocb *req, uns ret =__sys_connect_file (req->file, &io->address, connect->addr_len, file_flags);if ((ret == -EAGAIN || ret == -EINPROGRESS ) && force_nonblock) { -if (req_has_async_data (req)) -return -EAGAIN ; -if (io_alloc_async_data (req)) { - ret = -ENOMEM ; - goto out; +if (ret == -EINPROGRESS ) { + connect->in_progress = true; + }else { +if (req_has_async_data (req)) +return -EAGAIN ; +if (io_alloc_async_data (req)) { + ret = -ENOMEM ; + goto out; + } +memcpy (req->async_data, &__io,sizeof (__io)); } -memcpy (req->async_data, &__io,sizeof (__io));return -EAGAIN ; }if (ret == -ERESTARTSYS )
Greg Kroah-Hartman
maintainerPATCH 19/862 io_uring/af_unix: defer registered files gc to io_uring release
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit 0091bfc81741b8d3aeb3b7ab8636f911b2de6e80 upstream.
Instead of putting io_uring's registered files in unix_gc() we want it to be done by io_uring itself. The trick here is to consider io_uring registered files for cycle detection but not actually putting them down. Because io_uring can't register other ring instances, this will remove all refs to the ring file triggering the ->release path and clean up with io_ring_ctx_free().
--- include/linux/skbuff.h | 2 ++ io_uring/rsrc.c | 1 + net/unix/garbage.c | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+)
include/linux/skbuff.h +2 -0
@@ -796,6 +796,7 @@ typedef unsigned char *sk_buff_data_t;* @csum_level: indicates the number of consecutive checksums found in * the packet minus one that have been verified as * CHECKSUM_UNNECESSARY (max 3) +* @scm_io_uring: SKB holds io_uring registered files * @dst_pending_confirm: need to confirm neighbour * @decrypted: Decrypted SKB * @slow_gro: state present at GRO time, slower prepare step required
@@ -975,6 +976,7 @@ struct sk_buff {#endif __u8 slow_gro:1; __u8 csum_not_inet:1; + __u8 scm_io_uring:1;#ifdef CONFIG_NET_SCHED __u16 tc_index;/* traffic control index */
io_uring/rsrc.c +1 -0
@@ -855,6 +855,7 @@ int __io_scm_file_account(struct io_ringUNIXCB (skb).fp = fpl; skb->sk = sk; + skb->scm_io_uring =1 ; skb->destructor = unix_destruct_scm;refcount_add (skb->truesize, &sk->sk_wmem_alloc); }
net/unix/garbage.c +20 -0
@@ -204,6 +204,7 @@ void wait_for_unix_gc(void)/* The external entry point: unix_gc() */ void unix_gc (void ) { +struct sk_buff *next_skb, *skb;struct unix_sock *u;struct unix_sock *next;struct sk_buff_head hitlist;
@@ -297,11 +298,30 @@ void unix_gc(void)spin_unlock (&unix_gc_lock); +/* We need io_uring to clean its registered files, ignore all io_uring +* originated skbs. It's fine as io_uring doesn't keep references to +* other io_uring instances and so killing all other files in the cycle +* will put all io_uring references forcing it to go through normal +* release.path eventually putting registered files. +*/ + skb_queue_walk_safe(&hitlist, skb, next_skb) { +if (skb->scm_io_uring) { +__skb_unlink (skb, &hitlist); +skb_queue_tail (&skb->sk->sk_receive_queue, skb); + } + } +/* Here we are. Hitlist is filled. Die. */ __skb_queue_purge (&hitlist);spin_lock (&unix_gc_lock); +/* There could be io_uring registered files, just push them back to +* the inflight list +*/ +list_for_each_entry_safe (u, next, &gc_candidates, link) +list_move_tail (&u->link, &gc_inflight_list); +/* All candidates should have been detached by now. */ BUG_ON (!list_empty (&gc_candidates));
Greg Kroah-Hartman
maintainerPATCH 2/862 ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit a70aef7982b012e86dfd39fbb235e76a21ae778a upstream.
The register_mutex taken around the dev_unregister callback call in snd_rawmidi_free() may potentially lead to a mutex deadlock, when OSS emulation and a hot unplug are involved.
Since the mutex doesn't protect the actual race (as the registration itself is already protected by another means), let's drop it.
--- sound/core/rawmidi.c | 2 -- 1 file changed, 2 deletions(-)
sound/core/rawmidi.c +0 -2
@@ -1899,10 +1899,8 @@ static int snd_rawmidi_free(struct snd_rsnd_info_free_entry (rmidi->proc_entry); rmidi->proc_entry =NULL ; -mutex_lock (®ister_mutex);if (rmidi->ops && rmidi->ops->dev_unregister) rmidi->ops->dev_unregister (rmidi); -mutex_unlock (®ister_mutex);snd_rawmidi_free_substreams (&rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT ]);snd_rawmidi_free_substreams (&rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT ]);
Greg Kroah-Hartman
maintainerPATCH 20/862 io_uring: correct pinned_vm accounting
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit 42b6419d0aba47c5d8644cdc0b68502254671de5 upstream.
->mm_account should be released only after we free all registered buffers, otherwise __io_sqe_buffers_unregister() will see a NULL ->mm_account and skip locked_vm accounting.
--- io_uring/io_uring.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
io_uring/io_uring.c +4 -6
@@ -2422,12 +2422,6 @@ static void io_req_caches_free(struct iostatic __cold void io_ring_ctx_free (struct io_ring_ctx *ctx) {io_sq_thread_finish (ctx); - -if (ctx->mm_account) { -mmdrop (ctx->mm_account); - ctx->mm_account =NULL ; - } -io_rsrc_refs_drop (ctx);/* __io_rsrc_put_work() may need uring_lock to progress, wait w/o it */ io_wait_rsrc_data (ctx->buf_data);
@@ -2470,6 +2464,10 @@ static __cold void io_ring_ctx_free(struWARN_ON_ONCE (!list_empty (&ctx->ltimeout_list));WARN_ON_ONCE (ctx->notif_slots || ctx->nr_notif_slots); +if (ctx->mm_account) { +mmdrop (ctx->mm_account); + ctx->mm_account =NULL ; + }io_mem_free (ctx->rings);io_mem_free (ctx->sq_sqes);
Greg Kroah-Hartman
maintainerPATCH 22/862 cifs: destage dirty pages before re-reading them for cache=none
In reply to Greg Kroah-HartmanFrom: Ronnie Sahlberg <[email protected]>
commit bb44c31cdcac107344dd2fcc3bd0504a53575c51 upstream.
This is the opposite case of kernel bugzilla 216301.
If we mmap a file using cache=none and then proceed to update the mmapped area these updates are not reflected in a later pread() of that part of the file.
To fix this we must first destage any dirty pages in the range before we allow the pread() to proceed.
--- fs/cifs/file.c | 9 +++++++++ 1 file changed, 9 insertions(+)
fs/cifs/file.c +9 -0
@@ -4271,6 +4271,15 @@ static ssize_t __cifs_readv( len = ctx->len; } +if (direct) { + rc =filemap_write_and_wait_range (file->f_inode->i_mapping, + offset, offset + len -1 ); +if (rc) { +kref_put (&ctx->refcount, cifs_aio_ctx_release); +return -EAGAIN ; + } + } +/* grab a lock here due to read response handlers can access ctx */ mutex_lock (&ctx->aio_mutex);
Greg Kroah-Hartman
maintainerPATCH 25/862 iio: ltc2497: Fix reading conversion results
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
commit 7f4f1096d5921f5d90547596f9ce80e0b924f887 upstream.
After the result of the previous conversion is read the chip automatically starts a new conversion and doesn't accept new i2c transfers until this conversion is completed which makes the function return failure.
So add an early return iff the programming of the new address isn't needed. Note this will not fix the problem in general, but all cases that are currently used. Once this changes we get the failure back, but this can be addressed when the need arises.
--- drivers/iio/adc/ltc2497.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/iio/adc/ltc2497.c +13 -0
@@ -41,6 +41,19 @@ static int ltc2497_result_and_measure(st } *val = (be32_to_cpu (st->buf) >>14 ) - (1 <<17 ); + +/* +* The part started a new conversion at the end of the above i2c +* transfer, so if the address didn't change since the last call +* everything is fine and we can return early. +* If not (which should only happen when some sort of bulk +* conversion is implemented) we have to program the new +* address. Note that this probably fails as the conversion that +* was triggered above is like not complete yet and the two +* operations have to be done in a single transfer. +*/ +if (ddata->addr_prev == address) +return 0 ; } ret = i2c_smbus_write_byte(st->client,
Greg Kroah-Hartman
maintainerPATCH 4/862 ALSA: usb-audio: Fix NULL dererence at error path
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 568be8aaf8a535f79c4db76cabe17b035aa2584d upstream.
At an error path to release URB buffers and contexts, the driver might hit a NULL dererence for u->urb pointer, when u->buffer_size has been already set but the actual URB allocation failed.
Fix it by adding the NULL check of urb. Also, make sure that buffer_size is cleared after the error path or the close.
--- sound/usb/endpoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/usb/endpoint.c +2 -1
@@ -93,12 +93,13 @@ static inline unsigned get_usb_high_spee*/ static void release_urb_ctx (struct snd_urb_ctx *u) { -if (u->buffer_size) +if (u->urb && u->buffer_size)usb_free_coherent (u->ep->chip->dev, u->buffer_size, u->urb->transfer_buffer, u->urb->transfer_dma);usb_free_urb (u->urb); u->urb =NULL ; + u->buffer_size =0 ; }static const char *usb_error_string (int err)
Greg Kroah-Hartman
maintainerPATCH 5/862 ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
In reply to Greg Kroah-HartmanFrom: Callum Osmotherly <[email protected]>
commit 417b9c51f59734d852e47252476fadc293ad994a upstream.
After some feedback from users with Dell Precision 5530 machines, this patch reverts the previous change to add ALC289_FIXUP_DUAL_SPK. While it improved the speaker output quality, it caused the headphone jack to have an audible "pop" sound when power saving was toggled.
--- sound/pci/hda/patch_realtek.c | 1 - 1 file changed, 1 deletion(-)
sound/pci/hda/patch_realtek.c +0 -1
@@ -9186,7 +9186,6 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1028 ,0x0871 ,"Dell Precision 3630" ,ALC255_FIXUP_DELL_HEADSET_MIC ),SND_PCI_QUIRK (0x1028 ,0x0872 ,"Dell Precision 3630" ,ALC255_FIXUP_DELL_HEADSET_MIC ),SND_PCI_QUIRK (0x1028 ,0x0873 ,"Dell Precision 3930" ,ALC255_FIXUP_DUMMY_LINEOUT_VERB ), -SND_PCI_QUIRK (0x1028 ,0x087d ,"Dell Precision 5530" ,ALC289_FIXUP_DUAL_SPK ),SND_PCI_QUIRK (0x1028 ,0x08ad ,"Dell WYSE AIO" ,ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x08ae ,"Dell WYSE NB" ,ALC225_FIXUP_DELL1_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
Greg Kroah-Hartman
maintainerPATCH 7/862 ALSA: hda/realtek: Add quirk for ASUS GV601R laptop
In reply to Greg Kroah-HartmanFrom: Luke D. Jones <[email protected]>
commit 2ea8e1297801f7b0220ebf6ae61a5b74ca83981e upstream.
The ASUS ROG X16 (GV601R) series laptop has the same node-to-DAC pairs as early models and the G14, this includes bass speakers which are by default mapped incorrectly to the 0x06 node.
Add a quirk to use the same DAC pairs as the G14.
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -9411,6 +9411,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1043 ,0x1e8e ,"ASUS Zephyrus G15" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x1c52 ,"ASUS Zephyrus G15 2022" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x1f11 ,"ASUS Zephyrus G14" ,ALC289_FIXUP_ASUS_GA401 ), +SND_PCI_QUIRK (0x1043 ,0x1f92 ,"ASUS ROG Flow X16" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x3030 ,"ASUS ZN270IE" ,ALC256_FIXUP_ASUS_AIO_GPIO2 ),SND_PCI_QUIRK (0x1043 ,0x831a ,"ASUS P901" ,ALC269_FIXUP_STEREO_DMIC ), SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
Greg Kroah-Hartman
maintainerPATCH 8/862 ALSA: hda/realtek: Add Intel Reference SSID to support headset keys
In reply to Greg Kroah-HartmanFrom: Saranya Gopal <[email protected]>
commit 4f2e56a59b9947b3e698d3cabcb858765c12b1e8 upstream.
This patch fixes the issue with 3.5mm headset keys on RPL-P platform.
[ Rearranged the entry in SSID order by tiwai ]
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -9433,6 +9433,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x10ec ,0x10f2 ,"Intel Reference board" ,ALC700_FIXUP_INTEL_REFERENCE ),SND_PCI_QUIRK (0x10ec ,0x118c ,"Medion EE4254 MD62100" ,ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE ),SND_PCI_QUIRK (0x10ec ,0x1230 ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ), +SND_PCI_QUIRK (0x10ec ,0x124c ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ),SND_PCI_QUIRK (0x10ec ,0x1252 ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ),SND_PCI_QUIRK (0x10ec ,0x1254 ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ), SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
Greg Kroah-Hartman
maintainerPATCH 9/862 mtd: rawnand: atmel: Unmap streaming DMA mappings
In reply to Greg Kroah-HartmanFrom: Tudor Ambarus <[email protected]>
commit 1161703c9bd664da5e3b2eb1a3bb40c210e026ea upstream.
Every dma_map_single() call should have its dma_unmap_single() counterpart, because the DMA address space is a shared resource and one could render the machine unusable by consuming all DMA addresses.
--- drivers/mtd/nand/raw/atmel/nand-controller.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/nand/raw/atmel/nand-controller.c +1 -0
@@ -405,6 +405,7 @@ static int atmel_nand_dma_transfer(strucdma_async_issue_pending (nc->dmac);wait_for_completion (&finished); +dma_unmap_single (nc->dev, buf_dma, len, dir);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 21/862 hv_netvsc: Fix race between VF offering and VF association message from host
In reply to Greg Kroah-HartmanFrom: Gaurav Kohli <[email protected]>
commit 365e1ececb2905f94cc10a5817c5b644a32a3ae2 upstream.
During vm boot, there might be possibility that vf registration call comes before the vf association from host to vm.
And this might break netvsc vf path, To prevent the same block vf registration until vf bind message comes from host.
--- drivers/net/hyperv/hyperv_net.h | 3 ++- drivers/net/hyperv/netvsc.c | 4 ++++ drivers/net/hyperv/netvsc_drv.c | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-)
drivers/net/hyperv/hyperv_net.h +2 -1
@@ -1051,7 +1051,8 @@ struct net_device_context {u32 vf_alloc;/* Serial number of the VF to team with */ u32 vf_serial; - +/* completion variable to confirm vf association */ +struct completion vf_add;/* Is the current data path through the VF NIC? */ bool data_path_is_vf;
drivers/net/hyperv/netvsc.c +4 -0
@@ -1580,6 +1580,10 @@ static void netvsc_send_vf(struct net_de net_device_ctx->vf_alloc = nvmsg->msg.v4_msg.vf_assoc.allocated; net_device_ctx->vf_serial = nvmsg->msg.v4_msg.vf_assoc.serial; + +if (net_device_ctx->vf_alloc) +complete (&net_device_ctx->vf_add); +netdev_info (ndev,"VF slot %u %s\n" , net_device_ctx->vf_serial, net_device_ctx->vf_alloc ?"added" :"removed" );
drivers/net/hyperv/netvsc_drv.c +19 -0
@@ -2313,6 +2313,18 @@ static struct net_device *get_netvsc_bys } +/* Fallback path to check synthetic vf with +* help of mac addr +*/ +list_for_each_entry (ndev_ctx, &netvsc_dev_list, list) { + ndev =hv_get_drvdata (ndev_ctx->device_ctx); +if (ether_addr_equal (vf_netdev->perm_addr, ndev->perm_addr)) { +netdev_notice (vf_netdev, +"falling back to mac addr based matching\n" ); +return ndev; + } + } +netdev_notice (vf_netdev,"no netdev found for vf serial:%u\n" , serial);return NULL ;
@@ -2409,6 +2421,11 @@ static int netvsc_vf_changed(struct net_if (net_device_ctx->data_path_is_vf == vf_is_up)return NOTIFY_OK ; +if (vf_is_up && !net_device_ctx->vf_alloc) { +netdev_info (ndev,"Waiting for the VF association from host\n" ); +wait_for_completion (&net_device_ctx->vf_add); + } + ret =netvsc_switch_datapath (ndev, vf_is_up);if (ret) {
@@ -2440,6 +2457,7 @@ static int netvsc_unregister_vf(struct nnetvsc_vf_setxdp (vf_netdev,NULL ); +reinit_completion (&net_device_ctx->vf_add);netdev_rx_handler_unregister (vf_netdev);netdev_upper_dev_unlink (vf_netdev, ndev);RCU_INIT_POINTER (net_device_ctx->vf_netdev,NULL );
@@ -2479,6 +2497,7 @@ static int netvsc_probe(struct hv_deviceINIT_DELAYED_WORK (&net_device_ctx->dwork, netvsc_link_change); +init_completion (&net_device_ctx->vf_add);spin_lock_init (&net_device_ctx->lock);INIT_LIST_HEAD (&net_device_ctx->reconfig_events);INIT_DELAYED_WORK (&net_device_ctx->vf_takeover, netvsc_vf_setup);
Greg Kroah-Hartman
maintainerPATCH 29/862 xhci: dbc: Fix memory leak in xhci_alloc_dbc()
In reply to Greg Kroah-HartmanFrom: Rafael Mendonca <[email protected]>
commit d591b32e519603524a35b172156db71df9116902 upstream.
If DbC is already in use, then the allocated memory for the xhci_dbc struct doesn't get freed before returning NULL, which leads to a memleak.
--- drivers/usb/host/xhci-dbgcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-dbgcap.c +1 -1
@@ -988,7 +988,7 @@ xhci_alloc_dbc(struct device *dev, void dbc->driver = driver;if (readl (&dbc->regs->control) &DBC_CTRL_DBC_ENABLE ) -return NULL ; + goto err;INIT_DELAYED_WORK (&dbc->event_work, xhci_dbc_handle_events);spin_lock_init (&dbc->lock);
Greg Kroah-Hartman
maintainercover 6.0.3-rc1 review
This is the start of the stable review cycle for the 6.0.3 release. There are 862 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 21 Oct 2022 08:30:19 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.0.3-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.0.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.0.3-rc1
Nathan Chancellor <[email protected]>
lib/Kconfig.debug: Add check for non-constant .{s,u}leb128 support to DWARF5
Masahiro Yamada <[email protected]>
Kconfig.debug: add toolchain checks for DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
Masahiro Yamada <[email protected]>
Kconfig.debug: simplify the dependency of DEBUG_INFO_DWARF4/5
Jens Axboe <[email protected]>
io_uring/rw: ensure kiocb_end_write() is always called
Pavel Begunkov <[email protected]>
io_uring: fix fdinfo sqe offsets calculation
Nathan Chancellor <[email protected]>
drm/amd/display: Fix build breakage with CONFIG_DEBUG_FS=n
Nicholas Piggin <[email protected]>
powerpc/64s/interrupt: Fix lost interrupts when returning to soft-masked context
Tetsuo Handa <[email protected]>
net/ieee802154: don't warn zero-sized raw_sendmsg()
Alexander Aring <[email protected]>
Revert "net/ieee802154: reject zero-sized raw_sendmsg()"
Aric Cyr <[email protected]>
Revert "drm/amd/display: correct hostvm flag"
Randy Dunlap <[email protected]>
net: ethernet: ti: davinci_mdio: fix build for mdio bitbang uses
Yu Kuai <[email protected]>
blk-wbt: fix that 'rwb->wc' is always set to 1 in wbt_init()
Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix last interface check for registration
Alexander Aring <[email protected]>
net: ieee802154: return -EINVAL for unknown addr type
Liu Shixin <[email protected]>
mm: hugetlb: fix UAF in hugetlb_handle_userfault
Pavel Begunkov <[email protected]>
io_uring/net: fix notif cqe reordering
Pavel Begunkov <[email protected]>
io_uring/net: don't skip notifs for failed requests
Pavel Begunkov <[email protected]>
io_uring/net: rename io_sendzc()
Pavel Begunkov <[email protected]>
io_uring/net: don't lose partial send_zc on fail
Pavel Begunkov <[email protected]>
io_uring/net: use io_sr_msg for sendzc
Pavel Begunkov <[email protected]>
io_uring/net: refactor io_sr_msg types
Adrian Hunter <[email protected]>
perf intel-pt: Fix system_wide dummy event for hybrid
Adrian Hunter <[email protected]>
perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc
Rob Herring <[email protected]>
perf: Skip and warn on unknown format 'configN' attrs
Ivan T. Ivanov <[email protected]>
clk: bcm2835: Round UART input clock up
Wayne Chang <[email protected]>
usb: typec: ucsi: Don't warn on probe deferral
Manivannan Sadhasivam <[email protected]>
dmaengine: dw-edma: Remove runtime PM support
Lv Ruyi <[email protected]>
fsi: master-ast-cf: Fix missing of_node_put in fsi_master_acf_probe
Eddie James <[email protected]>
fsi: occ: Prevent use after free
Eddie James <[email protected]>
hwmon (occ): Retry for checksum failure
Keith Busch <[email protected]>
blk-mq: use quiesced elevator switch when reinitializing queues
Dongliang Mu <[email protected]>
usb: idmouse: fix an uninit-value in idmouse_open
Varun Prakash <[email protected]>
nvmet-tcp: add bounds check on Transfer Tag
Keith Busch <[email protected]>
nvme: copy firmware_rev on each init
Keith Busch <[email protected]>
nvme: handle effects after freeing the request
Jan Kara <[email protected]>
ext2: Use kvmalloc() for group descriptor array
Arun Easi <[email protected]>
scsi: tracing: Fix compile error in trace_array calls when TRACING is disabled
Xiaoke Wang <[email protected]>
staging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv()
Xiaoke Wang <[email protected]>
staging: rtl8723bs: fix potential memory leak in rtw_init_drv_sw()
Pavel Begunkov <[email protected]>
io_uring: fix CQE reordering
sunghwan jung <[email protected]>
Revert "usb: storage: Add quirk for Samsung Fit flash"
Piyush Mehta <[email protected]>
usb: dwc3: core: Enable GUCTL1 bit 10 for fixing termination error after resume bug
Alexander Stein <[email protected]>
arm64: dts: imx8mp: Add snps,gfladj-refclk-lpm-sel quirk to USB nodes
Alexander Stein <[email protected]>
usb: dwc3: core: add gfladj_refclk_lpm_sel quirk
Robin Guo <[email protected]>
usb: musb: Fix musb_gadget.c rxstate overflow bug
Jianglei Nie <[email protected]>
usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info()
Logan Gunthorpe <[email protected]>
md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d
Johnothan King <[email protected]>
HID: nintendo: check analog user calibration for plausibility
Jianglei Nie <[email protected]>
HSI: ssi_protocol: fix potential resource leak in ssip_pn_open()
Hyunwoo Kim <[email protected]>
HID: roccat: Fix use-after-free in roccat_read()
Harry Stern <[email protected]>
hid: topre: Add driver fixing report descriptor
Pierre-Louis Bossart <[email protected]>
soundwire: intel: fix error handling on dai registration issues
Richard Fitzgerald <[email protected]>
soundwire: cadence: Don't overwrite msg->buf during write commands
Coly Li <[email protected]>
bcache: fix set_at_max_writeback_rate() for multiple attached devices
Serge Semin <[email protected]>
ata: libahci_platform: Sanity check the DT child nodes number
Yu Kuai <[email protected]>
blk-throttle: prevent overflow while calculating wait time
Nam Cao <[email protected]>
staging: vt6655: fix potential memory leak
Wei Yongjun <[email protected]>
power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type()
Michael Grzeschik <[email protected]>
usb: gadget: uvc: increase worker prio to WQ_HIGHPRI
Yicong Yang <[email protected]>
iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity
Shigeru Yoshida <[email protected]>
nbd: Fix hung when signal interrupts nbd_start_device_ioctl()
Letu Ren <[email protected]>
scsi: 3w-9xxx: Avoid disabling device if failing to enable it
Vaishnav Achath <[email protected]>
dmaengine: ti: k3-udma: Reset UDMA_CHAN_RT byte counters to prevent overflow
James Smart <[email protected]>
scsi: lpfc: Fix null ndlp ptr dereference in abnormal exit path for GFT_ID
Justin Chen <[email protected]>
usb: host: xhci-plat: suspend/resume clks for brcm
Justin Chen <[email protected]>
usb: host: xhci-plat: suspend and resume clocks
Daisuke Matsuda <[email protected]>
RDMA/rxe: Delete error messages triggered by incoming Read requests
Quanyang Wang <[email protected]>
clk: zynqmp: pll: rectify rate rounding in zynqmp_pll_round_rate
Hangyu Hua <[email protected]>
media: platform: fix some double free in meson-ge2d and mtk-jpeg and s5p-mfc
Zheyu Ma <[email protected]>
media: cx88: Fix a null-ptr-deref bug in buffer_prepare()
Ian Nam <[email protected]>
clk: zynqmp: Fix stack-out-of-bounds in strncpy`
Alex Sverdlin <[email protected]>
ARM: 9242/1: kasan: Only map modules if CONFIG_KASAN_VMALLOC=n
Li Huafei <[email protected]>
ARM: 9234/1: stacktrace: Avoid duplicate saving of exception PC value
Li Huafei <[email protected]>
ARM: 9233/1: stacktrace: Skip frame pointer boundary check for call_with_stack()
Kunihiko Hayashi <[email protected]>
arm64: dts: uniphier: Add USB-device support for PXs3 reference board
Josef Bacik <[email protected]>
btrfs: call __btrfs_remove_free_space_cache_locked on cache load failure
Maciej S. Szmigiero <[email protected]>
btrfs: don't print information about space cache or tree every remount
Qu Wenruo <[email protected]>
btrfs: scrub: try to fix super block errors
Qu Wenruo <[email protected]>
btrfs: scrub: properly report super block errors in system log
Qu Wenruo <[email protected]>
btrfs: dump extra info if one free space cache has more bitmaps than it should
Arnd Bergmann <[email protected]>
ARM: orion: fix include path
Sebastian Krzyszkowiak <[email protected]>
arm64: dts: imx8mq-librem5: Add bq25895 as max17055's power supply
Frieder Schrempf <[email protected]>
arm64: dts: imx8mm-kontron: Use the VSELECT signal to switch SD card IO voltage
Mark Brown <[email protected]>
kselftest/arm64: Fix validatation termination record after EXTRA_CONTEXT
Marcel Ziswiler <[email protected]>
ARM: dts: imx6sx-udoo-neo: don't use multiple blank lines
Marcel Ziswiler <[email protected]>
ARM: dts: imx6sl: use tabs for code indent
Alexander Stein <[email protected]>
ARM: dts: imx6sx: add missing properties for sram
Alexander Stein <[email protected]>
ARM: dts: imx6sll: add missing properties for sram
Alexander Stein <[email protected]>
ARM: dts: imx6sl: add missing properties for sram
Alexander Stein <[email protected]>
ARM: dts: imx6qp: add missing properties for sram
Alexander Stein <[email protected]>
ARM: dts: imx6dl: add missing properties for sram
Alexander Stein <[email protected]>
ARM: dts: imx6q: add missing properties for sram
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sc7280-idp: correct ADC channel node name and unit address
Haibo Chen <[email protected]>
ARM: dts: imx7d-sdb: config the max pressure for tsc2046
Alexander Stein <[email protected]>
ARM: dts: imx6: delete interrupts property if interrupts-extended is set
Felix Kuehling <[email protected]>
drm/amdkfd: Fix UBSAN shift-out-of-bounds warning
Wenjing Liu <[email protected]>
drm/amd/display: polling vid stream status in hpo dp blank
Aric Cyr <[email protected]>
drm/amd/display: Remove interface for periodic interrupt 1
Khaled Almahallawy <[email protected]>
drm/dp: Don't rewrite link config when setting phy test pattern
Richard Acayan <[email protected]>
mmc: sdhci-msm: add compatible string check for sdm670
Adrián Larumbe <[email protected]>
drm/meson: remove drm bridges at aggregate driver unbind time
Adrián Larumbe <[email protected]>
drm/meson: explicitly remove aggregate driver at module unload time
Adrián Larumbe <[email protected]>
drm/meson: reorder driver deinit sequence to fix use-after-free bug
Mario Limonciello <[email protected]>
ASoC: amd: yc: Add Lenovo Yoga Slim 7 Pro X to quirks table
Xiaoyan Li <[email protected]>
ASoC: amd: yc: Add ASUS UM5302TA into DMI table
hongao <[email protected]>
drm/amdgpu: fix initial connector audio value
Sherry Wang <[email protected]>
drm/amd/display: correct hostvm flag
George Shen <[email protected]>
drm/amd/display: Fix urgent latency override for DCN32/DCN321
Philip Yang <[email protected]>
drm/amdgpu: SDMA update use unlocked iterator
Pierre-Louis Bossart <[email protected]>
ASoC: SOF: add quirk to override topology mclk_id
Mikhail Rudenko <[email protected]>
ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component
Jairaj Arava <[email protected]>
ASoC: SOF: pci: Change DMI match info to support all Chrome platforms
Muralidhar Reddy <[email protected]>
ALSA: intel-dspconfig: add ES8336 support for AlderLake-PS
Hans de Goede <[email protected]>
platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading
Jorge Lopez <[email protected]>
platform/x86: hp-wmi: Setting thermal profile fails with 0x06
Jameson Thies <[email protected]>
platform/chrome: cros_ec: Notify the PM of wake events during resume
Maya Matuszczyk <[email protected]>
drm: panel-orientation-quirks: Add quirk for Aya Neo Air
Maya Matuszczyk <[email protected]>
drm: panel-orientation-quirks: Add quirk for Anbernic Win600
Mateusz Kwiatkowski <[email protected]>
drm/vc4: vec: Fix timings for VEC modes
Takashi Iwai <[email protected]>
ALSA: usb-audio: Register card at the last interface
Yifan Zha <[email protected]>
drm/admgpu: Skip CG/PG on SOC21 under SRIOV VF
Yifan Zha <[email protected]>
drm/amdgpu: Skip the program of MMMC_VM_AGP_* in SRIOV on MMHUB v3_0_0
sunliming <[email protected]>
drm/amd/display: Fix variable dereferenced before check
Lucas Stach <[email protected]>
drm: bridge: dw_hdmi: only trigger hotplug event on link change
Bernard Zhao <[email protected]>
drm/amd: fix potential memory leak
Andy Shevchenko <[email protected]>
platform/x86: pmc_atom: Improve quirk message to be less cryptic
Vivek Kasireddy <[email protected]>
udmabuf: Set ubuf->sg = NULL if the creation of sg table fails
Conner Knox <[email protected]>
ALSA: usb-audio: Add quirk to enable Avid Mbox 3 support
Cezary Rojewski <[email protected]>
ALSA: hda: Fix page fault in snd_hda_codec_shutdown()
David Gow <[email protected]>
drm/amd/display: fix overflow on MIN_I64 definition
Zeng Jingxiang <[email protected]>
gpu: lontium-lt9611: Fix NULL pointer dereference in lt9611_connector_init()
Liviu Dudau <[email protected]>
drm/komeda: Fix handling of atomic commits in the atomic_commit_tail hook
Javier Martinez Canillas <[email protected]>
drm: Prevent drm_copy_field() to attempt copying a NULL pointer
Javier Martinez Canillas <[email protected]>
drm: Use size_t type for len variable in drm_copy_field()
Jianglei Nie <[email protected]>
drm/nouveau/nouveau_bo: fix potential memory leak in nouveau_bo_alloc()
Andrew Gaul <[email protected]>
r8152: Rate limit overflow messages
Andy Shevchenko <[email protected]>
i2c: designware-pci: Group AMD NAVI quirk parts together
Xin Liu <[email protected]>
libbpf: Fix overrun in netlink attribute iteration
Kees Cook <[email protected]>
net: sched: cls_u32: Avoid memcpy() false-positive warning
Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix user-after-free
Song Liu <[email protected]>
bpf: use bpf_prog_pack for bpf_dispatcher
Jiri Olsa <[email protected]>
bpf: Adjust kprobe_multi entry_ip for CONFIG_X86_KERNEL_IBT
Liu Jian <[email protected]>
net: If sock is dead don't access sock's sk_wq in sk_stream_wait_memory
Jason A. Donenfeld <[email protected]>
hwmon: (sht4x) do not overflow clamping operation on 32-bit platforms
Daniel Golle <[email protected]>
wifi: rt2x00: correctly set BBP register 86 for MT7620
Daniel Golle <[email protected]>
wifi: rt2x00: set SoC wmac clock register
Daniel Golle <[email protected]>
wifi: rt2x00: set VGC gain for both chains of MT7620
Daniel Golle <[email protected]>
wifi: rt2x00: set correct TX_SW_CFG1 MAC register for MT7620
Daniel Golle <[email protected]>
wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620
Ziyang Xuan <[email protected]>
can: bcm: check the result of can_send() in bcm_can_tx()
Hou Tao <[email protected]>
selftests/bpf: Free the allocated resources after test case succeeds
Vadim Fedorenko <[email protected]>
bnxt_en: replace reset with config timestamps
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_event: Make sure ISO events don't affect non-ISO connections
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times
Tetsuo Handa <[email protected]>
Bluetooth: L2CAP: initialize delayed works at l2cap_chan_create()
Po-Hao Huang <[email protected]>
wifi: rtw89: fix rx filter after scan
Po-Hao Huang <[email protected]>
wifi: rtw89: free unused skb to prevent memory leak
Sean Wang <[email protected]>
wifi: mt76: mt7921: reset msta->airtime_ac while clearing up hw value
Jianglei Nie <[email protected]>
wifi: ath11k: mhi: fix potential memory leak in ath11k_mhi_register()
Patrick Rudolph <[email protected]>
regulator: core: Prevent integer underflow
Kiran K <[email protected]>
Bluetooth: btintel: Mark Intel controller to support LE_STATES quirk
Alexander Coffin <[email protected]>
wifi: brcmfmac: fix use-after-free bug in brcmf_netdev_start_xmit()
Michal Jaron <[email protected]>
iavf: Fix race between iavf_close and iavf_reset_task
Sergei Antonov <[email protected]>
net: ftmac100: fix endianness-related issues from 'sparse'
Zong-Zhe Yang <[email protected]>
rtw89: ser: leave lps with mutex
Manikanta Pubbisetty <[email protected]>
wifi: ath11k: Register shutdown handler for WCN6750
Khalid Masum <[email protected]>
xfrm: Update ipcomp_scratches with NULL when freed
Richard Gobert <[email protected]>
net-next: Fix IP_UNICAST_IF option behavior for connected sockets
Robert Hancock <[email protected]>
net: axienet: Switch to 64-bit RX/TX statistics
Daniel Sneddon <[email protected]>
x86/apic: Don't disable x2APIC if locked
Mika Westerberg <[email protected]>
thunderbolt: Add back Intel Falcon Ridge end-to-end flow control workaround
Tetsuo Handa <[email protected]>
wifi: ath9k: avoid uninit memory read in ath9k_htc_rx_msg()
Jane Chu <[email protected]>
x86/mce: Retrieve poison range from hardware
Johannes Berg <[email protected]>
wifi: mac80211: accept STA changes without link changes
Jerry Ray <[email protected]>
micrel: ksz8851: fixes struct pointer issue
Eric Dumazet <[email protected]>
tcp: annotate data-race around tcp_md5sig_pool_populated
Mike Pattrick <[email protected]>
openvswitch: Fix overreporting of drops in dropwatch
Mike Pattrick <[email protected]>
openvswitch: Fix double reporting of drops in dropwatch
Ravi Gunasekaran <[email protected]>
net: ethernet: ti: davinci_mdio: Add workaround for errata i2329
Quentin Monnet <[email protected]>
bpftool: Clear errno after libcap's checks
Wright Feng <[email protected]>
wifi: brcmfmac: fix invalid address access when enabling SCAN log level
Zong-Zhe Yang <[email protected]>
wifi: rtw88: phy: fix warning of possible buffer overflow
Hengqi Chen <[email protected]>
libbpf: Do not require executable permission for shared libraries
James Hilliard <[email protected]>
libbpf: Ensure functions with always_inline attribute are inline
Dai Ngo <[email protected]>
NFSD: fix use-after-free on source server when doing inter-server copy
Anna Schumaker <[email protected]>
NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
Kees Cook <[email protected]>
x86/entry: Work around Clang __bdos() bug
Mario Limonciello <[email protected]>
ACPI: x86: Add a quirk for Dell Inspiron 14 2-in-1 for StorageD3Enable
Kees Cook <[email protected]>
ARM: decompressor: Include .data.rel.ro.local
Srinivas Pandruvada <[email protected]>
thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash
Chao Qin <[email protected]>
powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
Kees Cook <[email protected]>
MIPS: BCM47XX: Cast memcmp() of function to (void *)
Doug Smythies <[email protected]>
cpufreq: intel_pstate: Add Tigerlake support in no-HWP mode
Hans de Goede <[email protected]>
ACPI: tables: FPDT: Don't call acpi_os_map_memory() on invalid phys address
Kees Cook <[email protected]>
fortify: Fix __compiletime_strlen() under UBSAN_BOUNDS_LOCAL
Arvid Norlander <[email protected]>
ACPI: video: Add Toshiba Satellite/Portege Z830 quirk
Perry Yuan <[email protected]>
cpufreq: amd_pstate: fix wrong lowest perf fetch
Paul E. McKenney <[email protected]>
rcu-tasks: Ensure RCU Tasks Trace loops have quiescent states
Zqiang <[email protected]>
rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()
Michal Hocko <[email protected]>
rcu: Back off upon fill_page_cache_func() allocation failure
Zqiang <[email protected]>
rcu: Avoid triggering strict-GP irq-work when RCU is idle
Alexander Aring <[email protected]>
fs: dlm: fix race in lowcomms
Aaron Tomlin <[email protected]>
module: tracking: Keep a record of tainted unloaded modules only
Christoph Hellwig <[email protected]>
ARM/dma-mappіng: don't override ->dma_coherent when set from a bus notifier
Stefan Berger <[email protected]>
selftest: tpm2: Add Client.__del__() to close /dev/tpm* handle
Zhang Rui <[email protected]>
tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domain
Chao Yu <[email protected]>
f2fs: fix to account FS_CP_DATA_IO correctly
Zhang Qilong <[email protected]>
f2fs: fix race condition on setting FI_NO_EXTENT flag
Shuai Xue <[email protected]>
ACPI: APEI: do not add task_work to kernel thread to avoid memory leak
Vincent Knecht <[email protected]>
thermal/drivers/qcom/tsens-v0_1: Fix MSM8939 fourth sensor hw_id
Jason A. Donenfeld <[email protected]>
random: schedule jitter credit for next jiffy, not in two jiffies
Dan Carpenter <[email protected]>
crypto: cavium - prevent integer overflow loading firmware
Dan Carpenter <[email protected]>
crypto: marvell/octeontx - prevent integer overflows
Janis Schoetterl-Glausch <[email protected]>
kbuild: rpm-pkg: fix breakage when V=1 is used
Masahiro Yamada <[email protected]>
linux/export: use inline assembler to populate symbol CRCs
Masahiro Yamada <[email protected]>
kbuild: remove the target in signal traps when interrupted
Song Liu <[email protected]>
ftrace: Fix recursive locking direct_mutex in ftrace_modify_direct_caller
Nico Pache <[email protected]>
tracing/osnoise: Fix possible recursive locking in stop_per_cpu_kthreads
Yipeng Zou <[email protected]>
tracing: kprobe: Make gen test module work in arm and riscv
Yipeng Zou <[email protected]>
tracing: kprobe: Fix kprobe event gen test module on exit
Robin Murphy <[email protected]>
iommu/iova: Fix module config properly
Enzo Matsumiya <[email protected]>
cifs: return correct error in ->calc_signature()
Lin Yujun <[email protected]>
clocksource/drivers/timer-gxp: Add missing error handling in gxp_timer_probe
Kunkun Jiang <[email protected]>
clocksource/drivers/arm_arch_timer: Fix handling of ARM erratum 858921
Damian Muszynski <[email protected]>
crypto: qat - fix DMA transfer direction
Peter Harliman Liem <[email protected]>
crypto: inside-secure - Change swab to swab32
Koba Ko <[email protected]>
crypto: ccp - Release dma channels before dmaengine unrgister
Ignat Korchagin <[email protected]>
crypto: akcipher - default implementation for setting a private key
Dan Carpenter <[email protected]>
iommu/omap: Fix buffer overflow in debugfs
Waiman Long <[email protected]>
cgroup/cpuset: Enable update_tasks_cpumask() on top_cpuset
Weili Qian <[email protected]>
crypto: hisilicon/qm - fix missing put dfx access
Lucas Segarra Fernandez <[email protected]>
crypto: qat - fix default value of WDT timer
Kshitiz Varshney <[email protected]>
hwrng: imx-rngc - Moving IRQ handler registering after imx_rngc_irq_mask_clear()
Martin Kaiser <[email protected]>
hwrng: imx-rngc - use devm_clk_get_enabled
Michal Koutný <[email protected]>
cgroup: Honor caller's cgroup NS when resolving path
Jacky Li <[email protected]>
crypto: ccp - Fail the PSP initialization when writing psp data file failed
James Cowgill <[email protected]>
hwrng: arm-smccc-trng - fix NO_ENTROPY handling
Ye Weihua <[email protected]>
crypto: hisilicon/zip - fix mismatch in get/set sgl_sge_nr
Zhengchao Shao <[email protected]>
crypto: sahara - don't sleep when in softirq
Haren Myneni <[email protected]>
powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL
Li Huafei <[email protected]>
powerpc/kprobes: Fix null pointer reference in arch_prepare_kprobe()
Pali Rohár <[email protected]>
powerpc: Fix SPE Power ISA properties for e500v1 platforms
Nicholas Piggin <[email protected]>
powerpc/64/interrupt: Fix return to masked context after hard-mask irq becomes pending
Nicholas Piggin <[email protected]>
powerpc/64: mark irqs hard disabled in boot paca
Nicholas Piggin <[email protected]>
powerpc/64/interrupt: Fix false warning in context tracking due to idle state
Nicholas Piggin <[email protected]>
powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5
Vitaly Kuznetsov <[email protected]>
x86/hyperv: Fix 'struct hv_enlightened_vmcs' definition
Rohan McLure <[email protected]>
powerpc: Fix fallocate and fadvise64_64 compat parameter combination
Pali Rohár <[email protected]>
powerpc: dts: turris1x.dts: Fix labels in DSA cpu port nodes
Pali Rohár <[email protected]>
powerpc: dts: turris1x.dts: Fix NOR partitions labels
Anup Patel <[email protected]>
cpuidle: riscv-sbi: Fix CPU_PM_CPU_IDLE_ENTER_xyz() macro usage
Zheng Yongjun <[email protected]>
powerpc/powernv: add missing of_node_put() in opal_export_attrs()
Liang He <[email protected]>
powerpc/pci_dn: Add missing of_node_put()
Liang He <[email protected]>
powerpc/sysdev/fsl_msi: Add missing of_node_put()
Nathan Chancellor <[email protected]>
powerpc/math_emu/efp: Include module.h
Michael Ellerman <[email protected]>
powerpc/configs: Properly enable PAPR_SCM in pseries_defconfig
Hangyu Hua <[email protected]>
ipc: mqueue: fix possible memory leak in init_mqueue_fs()
Jack Wang <[email protected]>
mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg
Conor Dooley <[email protected]>
mailbox: mpfs: account for mbox offsets while sending
Conor Dooley <[email protected]>
mailbox: mpfs: fix handling of the reg property
Peng Fan <[email protected]>
mailbox: imx: fix RST channel support
Joel Stanley <[email protected]>
clk: ast2600: BCLK comes from EPLL
Miaoqian Lin <[email protected]>
clk: ti: dra7-atl: Fix reference leak in of_dra7_atl_clk_probe
Liang He <[email protected]>
clk: ti: Balance of_node_get() calls for of_find_node_by_name()
Lin Yujun <[email protected]>
clk: imx: scu: fix memleak on platform_device_add() fails
Peng Fan <[email protected]>
clk: imx8mp: tune the order of enet_qos_root_clk
Stefan Wahren <[email protected]>
clk: bcm2835: fix bcm2835_clock_rate_from_divisor declaration
Maxime Ripard <[email protected]>
clk: bcm2835: Make peripheral PLLC critical
Serge Semin <[email protected]>
clk: baikal-t1: Add SATA internal ref clock buffer
Serge Semin <[email protected]>
clk: baikal-t1: Add shared xGMAC ref/ptp clocks internal parent
Serge Semin <[email protected]>
clk: baikal-t1: Fix invalid xGMAC PTP clock divider
Serge Semin <[email protected]>
clk: vc5: Fix 5P49V6901 outputs disabling when enabling FOD
David Collins <[email protected]>
spmi: pmic-arb: correct duplicate APID to PPID mapping logic
Chunfeng Yun <[email protected]>
usb: mtu3: fix failed runtime suspend in host only mode
Basavaraj Natikar <[email protected]>
HID: amd_sfh: Handle condition of "no sensors" for SFH1.1
Dave Jiang <[email protected]>
dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup()
Jens Axboe <[email protected]>
io_uring/rw: defer fsnotify calls to task context
Dmitry Baryshkov <[email protected]>
phy: qcom-qmp-pcie: fix resource mapping for SDM845 QHP PHY
Chen-Yu Tsai <[email protected]>
clk: mediatek: Migrate remaining clk_unregister_*() to clk_hw_unregister_*()
Chen-Yu Tsai <[email protected]>
clk: mediatek: fix unregister function in mtk_clk_register_dividers cleanup
AngeloGioacchino Del Regno <[email protected]>
clk: mediatek: clk-mt8195-mfg: Reparent mfg_bg3d and propagate rate changes
Chen-Yu Tsai <[email protected]>
clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent
Jens Hillenstedt <[email protected]>
mfd: da9061: Fix Failed to set Two-Wire Bus Mode.
Jiasheng Jiang <[email protected]>
mfd: sm501: Add check for platform_driver_register()
Dan Carpenter <[email protected]>
mfd: fsl-imx25: Fix check for platform_get_irq() errors
Christophe JAILLET <[email protected]>
mfd: lp8788: Fix an error handling path in lp8788_irq_init() and lp8788_irq_init()
Christophe JAILLET <[email protected]>
mfd: lp8788: Fix an error handling path in lp8788_probe()
Christophe JAILLET <[email protected]>
mfd: fsl-imx25: Fix an error handling path in mx25_tsadc_setup_irq()
Christophe JAILLET <[email protected]>
mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe()
Jiasheng Jiang <[email protected]>
fsi: core: Check error number after calling ida_simple_get
Bob Pearson <[email protected]>
RDMA/rxe: Fix resize_finish() in rxe_queue.c
Bob Pearson <[email protected]>
RDMA/rxe: Set pd early in mr alloc routines
Christoph Hellwig <[email protected]>
nvmet-auth: don't try to cancel a non-initialized work_struct
Adam Skladowski <[email protected]>
clk: qcom: gcc-sm6115: Override default Alpha PLL regs
Robert Marko <[email protected]>
clk: qcom: apss-ipq6018: mark apcs_alias0_core_clk as critical
Mike Christie <[email protected]>
scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()
John Garry <[email protected]>
scsi: pm8001: Fix running_req for internal abort commands
Duoming Zhou <[email protected]>
scsi: libsas: Fix use-after-free bug in smp_execute_task_sg()
Pali Rohár <[email protected]>
serial: 8250: Fix restoring termios speed after suspend
Guilherme G. Piccoli <[email protected]>
firmware: google: Test spinlock on panic path to avoid lockups
Lin Yujun <[email protected]>
slimbus: qcom-ngd: Add error handling in of_qcom_slim_ngd_register
Nam Cao <[email protected]>
staging: vt6655: fix some erroneous memory clean-up loops
Dongliang Mu <[email protected]>
phy: qualcomm: call clk_disable_unprepare in the error handling
Sherry Sun <[email protected]>
tty: serial: fsl_lpuart: disable dma rx/tx use flags in lpuart_dma_shutdown
Ilpo Järvinen <[email protected]>
serial: 8250: Toggle IER bits on only after irq has been set up
Dan Carpenter <[email protected]>
drivers: serial: jsm: fix some leaks in probe
Dan Carpenter <[email protected]>
usb: dwc3: core: fix some leaks in probe
Liang He <[email protected]>
usb: typec: anx7411: Use of_get_child_by_name() instead of of_find_node_by_name()
Albert Briscoe <[email protected]>
usb: gadget: function: fix dangling pnp_string in f_printer.c
Mario Limonciello <[email protected]>
xhci: Don't show warning for reinit on known broken suspend
Daisuke Matsuda <[email protected]>
IB: Set IOVA/LENGTH on IB_MR in core/uverbs layers
Mark Zhang <[email protected]>
RDMA/cm: Use SLID in the work completion as the DLID in responder side
Logan Gunthorpe <[email protected]>
md: Remove extra mddev_get() in md_seq_start()
David Sloan <[email protected]>
md/raid5: Remove unnecessary bio_put() in raid5_read_one_chunk()
Logan Gunthorpe <[email protected]>
md/raid5: Ensure stripe_fill happens on non-read IO with journal
Saurabh Sengar <[email protected]>
md: Replace snprintf with scnprintf
Jens Axboe <[email protected]>
io_uring/fdinfo: fix sqe dumping for IORING_SETUP_SQE128
Dylan Yudaken <[email protected]>
eventfd: guard wake_up in eventfd fs calls as well
Bart Van Assche <[email protected]>
block: Fix the enum blk_eh_timer_return documentation
Dan Carpenter <[email protected]>
mtd: rawnand: meson: fix bit map use in meson_nfc_ecc_correct()
Niklas Cassel <[email protected]>
ata: fix ata_id_has_dipm()
Niklas Cassel <[email protected]>
ata: fix ata_id_has_ncq_autosense()
Niklas Cassel <[email protected]>
ata: fix ata_id_has_devslp()
Niklas Cassel <[email protected]>
ata: fix ata_id_sense_reporting_enabled() and ata_id_has_sense_reporting()
Bernard Metzler <[email protected]>
RDMA/siw: Fix QP destroy to wait for all references dropped.
Bernard Metzler <[email protected]>
RDMA/siw: Always consume all skbuf data in sk_data_ready() upcall.
Bart Van Assche <[email protected]>
RDMA/srp: Fix srp_abort()
Shiraz Saleem <[email protected]>
RDMA/irdma: Validate udata inlen and outlen
Sindhu-Devale <[email protected]>
RDMA/irdma: Align AE id codes to correct flush code and event
Pali Rohár <[email protected]>
mtd: rawnand: fsl_elbc: Fix none ECC mode
Martin Blumenstingl <[email protected]>
mtd: rawnand: intel: Remove undocumented compatible string
Martin Blumenstingl <[email protected]>
mtd: rawnand: intel: Read the chip-select line from the correct OF node
Chunfeng Yun <[email protected]>
phy: phy-mtk-tphy: fix the phy type setting issue
Liang He <[email protected]>
phy: amlogic: phy-meson-axg-mipi-pcie-analog: Hold reference returned by of_get_parent()
Johan Hovold <[email protected]>
phy: qcom-qmp-usb: fix memleak on probe deferral
Johan Hovold <[email protected]>
phy: qcom-qmp-ufs: fix memleak on probe deferral
Johan Hovold <[email protected]>
phy: qcom-qmp-combo: fix memleak on probe deferral
Johan Hovold <[email protected]>
phy: qcom-qmp-pcie-msm8996: fix memleak on probe deferral
Johan Hovold <[email protected]>
phy: qcom-qmp-pcie: fix memleak on probe deferral
Johan Hovold <[email protected]>
phy: qcom-qmp-pcie: add pcs_misc sanity check
Johan Hovold <[email protected]>
phy: qcom-qmp-usb: disable runtime PM on unbind
Dan Carpenter <[email protected]>
remoteproc: Harden rproc_handle_vdev() against integer overflow
William Dean <[email protected]>
mtd: devices: docg3: check the return value of devm_ioremap() in the probe
James Smart <[email protected]>
scsi: lpfc: Fix various issues reported by tools
Dang Huynh <[email protected]>
clk: qcom: sm6115: Select QCOM_GDSC
Jan Kara <[email protected]>
sbitmap: Avoid leaving waitqueue in invalid state in __sbq_wake_up()
Jim Cromie <[email protected]>
dyndbg: drop EXPORTed dynamic_debug_exec_queries
Jim Cromie <[email protected]>
dyndbg: let query-modname override actual module name
Jim Cromie <[email protected]>
dyndbg: fix module.dyndbg handling
Jim Cromie <[email protected]>
dyndbg: fix static_branch manipulation
Dan Carpenter <[email protected]>
usb: gadget: f_fs: stricter integer overflow checks
Vincent Whitchurch <[email protected]>
iio: Use per-device lockdep class for mlock
Jie Hai <[email protected]>
dmaengine: hisilicon: Add multi-thread support for a DMA channel
Jie Hai <[email protected]>
dmaengine: hisilicon: Fix CQ head update
Jie Hai <[email protected]>
dmaengine: hisilicon: Disable channels when unregister hisi_dma
Jerry Snitselaar <[email protected]>
dmaengine: idxd: avoid deadlock in process_misc_interrupts()
Peter Geis <[email protected]>
phy: rockchip-inno-usb2: Return zero after otg sync
Dan Carpenter <[email protected]>
fpga: prevent integer overflow in dfl_feature_ioctl_set_irq()
Matthew Gerlach <[email protected]>
fpga: dfl-pci: Add IDs for Intel N6000, N6001 and C6100 cards
Hangyu Hua <[email protected]>
misc: ocxl: fix possible refcount leak in afu_ioctl()
AngeloGioacchino Del Regno <[email protected]>
clk: mediatek: mt8195-infra_ao: Set pwrmcu clocks as critical
AngeloGioacchino Del Regno <[email protected]>
clk: mediatek: clk-mt8195-vdo1: Reparent and set rate on vdo1_dpintf's parent
AngeloGioacchino Del Regno <[email protected]>
clk: mediatek: clk-mt8195-vdo0: Set rate on vdo0_dp_intf0_dp_intf's parent
Zhu Yanjun <[email protected]>
RDMA/rxe: Fix the error caused by qp->sk
Zhu Yanjun <[email protected]>
RDMA/rxe: Fix "kernel NULL pointer dereference" error
Miaoqian Lin <[email protected]>
media: xilinx: vipp: Fix refcount leak in xvip_graph_dma_init
Yunke Cao <[email protected]>
media: uvcvideo: Use entity get_cur in uvc_ctrl_set
José Expósito <[email protected]>
media: uvcvideo: Fix memory leak in uvc_gpio_parse
Xu Qiang <[email protected]>
media: meson: vdec: add missing clk_disable_unprepare on error in vdec_hevc_start()
Ming Qian <[email protected]>
media: amphion: fix a bug that vpu core may not resume after suspend
Ming Qian <[email protected]>
media: amphion: don't change the colorspace reported by decoder.
Ming Qian <[email protected]>
media: amphion: adjust the encoder's value range of gop size
Ming Qian <[email protected]>
media: amphion: insert picture startcode after seek for vc1g format
Hirokazu Honda <[email protected]>
media: mediatek: vcodec: Skip non CBR bitrate mode
Shubhrajyoti Datta <[email protected]>
tty: xilinx_uartps: Fix the ignore_status
Shubhrajyoti Datta <[email protected]>
tty: xilinx_uartps: Check clk_enable return value
Dongliang Mu <[email protected]>
media: airspy: fix memory leak in airspy probe
Liang He <[email protected]>
media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop
Marijn Suijten <[email protected]>
clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock
Jack Wang <[email protected]>
HSI: omap_ssi_port: Fix dma_map_sg error check
Miaoqian Lin <[email protected]>
HSI: omap_ssi: Fix refcount leak in ssi_probe
José Expósito <[email protected]>
HID: uclogic: Fix warning in uclogic_rdesc_template_apply
José Expósito <[email protected]>
HID: uclogic: Add missing suffix for digitalizers
Yu Kuai <[email protected]>
sbitmap: fix possible io hung due to lost wakeup
Chanho Park <[email protected]>
clk: samsung: exynosautov9: correct register offsets of peric0/c1
Miaoqian Lin <[email protected]>
clk: tegra20: Fix refcount leak in tegra20_clock_init
Miaoqian Lin <[email protected]>
clk: tegra: Fix refcount leak in tegra114_clock_init
Miaoqian Lin <[email protected]>
clk: tegra: Fix refcount leak in tegra210_clock_init
Christophe JAILLET <[email protected]>
coresight: docs: Fix a broken reference
Liang He <[email protected]>
clk: sprd: Hold reference returned by of_get_parent()
Liang He <[email protected]>
clk: berlin: Add of_node_put() for of_get_parent()
Liang He <[email protected]>
clk: qoriq: Hold reference returned by of_get_parent()
Liang He <[email protected]>
clk: oxnas: Hold reference returned by of_get_parent()
Liang He <[email protected]>
clk: st: Hold reference returned by of_get_parent()
Liang He <[email protected]>
clk: meson: Hold reference returned by of_get_parent()
Thinh Nguyen <[email protected]>
usb: common: debug: Check non-standard control requests
Christophe JAILLET <[email protected]>
usb: common: usb-conn-gpio: Simplify some error message
Aharon Landau <[email protected]>
RDMA/mlx5: Don't compare mkey tags in DEVX indirect mkey
Jakob Hauser <[email protected]>
iio: magnetometer: yas530: Change data type of hard_offsets to signed
Jonathan Cameron <[email protected]>
iio: ABI: Fix wrong format of differential capacitance channel ABI.
Nuno Sá <[email protected]>
iio: inkern: fix return value in devm_of_iio_channel_get_by_name()
Nuno Sá <[email protected]>
iio: inkern: only release the device node when done with it
Claudiu Beznea <[email protected]>
iio: adc: at91-sama5d2_adc: disable/prepare buffer on suspend/resume
Claudiu Beznea <[email protected]>
iio: adc: at91-sama5d2_adc: lock around oversampling and sample freq
Claudiu Beznea <[email protected]>
iio: adc: at91-sama5d2_adc: check return status for pressure and touch
Claudiu Beznea <[email protected]>
iio: adc: at91-sama5d2_adc: fix AT91_SAMA5D2_MR_TRACKTIM_MAX
Zhao Gongyi <[email protected]>
selftests/cpu-hotplug: Reserve one cpu online at least
Zhao Gongyi <[email protected]>
selftests/cpu-hotplug: Delete fault injection related code
Zhao Gongyi <[email protected]>
selftests/cpu-hotplug: Use return instead of exit
Darrick J. Wong <[email protected]>
iomap: iomap: fix memory corruption when recording errors during writeback
Dmitry Torokhov <[email protected]>
ARM: dts: exynos: fix polarity of VBUS GPIO of Origen
Dmitry Torokhov <[email protected]>
arm64: dts: exynos: fix polarity of "enable" line of NFC chip in TM2
Mark Rutland <[email protected]>
arm64: ftrace: fix module PLTs with mcount
Josh Triplett <[email protected]>
ext4: don't run ext4lazyinit for read-only filesystems
Jerry Lee 李修賢 <[email protected]>
ext4: continue to expand file system when the target size doesn't reach
Geert Uytterhoeven <[email protected]>
ARM: Drop CMDLINE_* dependency on ATAGS
Dmitry Torokhov <[email protected]>
ARM: dts: exynos: correct s5k6a3 reset polarity on Midas family
Matt Ranostay <[email protected]>
arm64: dts: ti: k3-j7200: fix main pinmux range
Johan Hovold <[email protected]>
arm64: dts: qcom: sm8450: fix UFS PHY serdes size
Johan Hovold <[email protected]>
arm64: dts: qcom: ipq8074: fix PCIe PHY serdes size
Dmitry Osipenko <[email protected]>
soc/tegra: fuse: Drop Kconfig dependency on TEGRA20_APB_DMA
Liang He <[email protected]>
soc/tegra: fuse: Add missing of_node_put() in tegra_init_fuse()
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8350-sagami: correct TS pin property
Randy Dunlap <[email protected]>
ia64: export memory_add_physaddr_to_nid to fix cxl build error
Bhupesh Sharma <[email protected]>
arm64: dts: qcom: sc8280xp-pmics: Remove reg entry & use correct node name for pmc8280c_lpg node
Chris Packham <[email protected]>
arm64: dts: marvell: 98dx25xx: use correct property for i2c gpios
Michael Walle <[email protected]>
ARM: dts: kirkwood: lsxl: remove first ethernet port
Michael Walle <[email protected]>
ARM: dts: kirkwood: lsxl: fix serial line
Marek Behún <[email protected]>
ARM: dts: turris-omnia: Fix mpp26 pin name and comment
Stephen Boyd <[email protected]>
arm64: dts: qcom: sc7180-trogdor: Keep pm6150_adc enabled for TZ
Bryan O'Donoghue <[email protected]>
arm64: dts: qcom: pm8350c: Drop PWM reg declaration
Johan Hovold <[email protected]>
arm64: dts: qcom: sa8295p-adp: disallow regulator mode switches
Johan Hovold <[email protected]>
arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disallow regulator mode switches
Johan Hovold <[email protected]>
arm64: dts: qcom: sc8280xp-crd: disallow regulator mode switches
Satya Priya <[email protected]>
arm64: dts: qcom: sc7280: Update lpasscore node
Satya Priya <[email protected]>
arm64: dts: qcom: sc7280: Cleanup the lpasscc node
Geert Uytterhoeven <[email protected]>
arm64: dts: qcom: sdm845-xiaomi-polaris: Fix sde_dsi_active pinctrl
Chanho Park <[email protected]>
dt-bindings: clock: exynosautov9: correct clock numbering of peric0/c1
Biju Das <[email protected]>
arm64: dts: renesas: r9a07g043: Fix SCI{Rx,Tx} interrupt types
Biju Das <[email protected]>
arm64: dts: renesas: r9a07g054: Fix SCI{Rx,Tx} interrupt types
Biju Das <[email protected]>
arm64: dts: renesas: r9a07g044: Fix SCI{Rx,Tx} interrupt types
Lucas Stach <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: hook up DDC i2c bus
Liang He <[email protected]>
soc: qcom: smem_state: Add refcounting for the 'state->of_node'
Liang He <[email protected]>
soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe()
Amir Goldstein <[email protected]>
locks: fix TOCTOU race when granting write lease
Liang He <[email protected]>
memory: of: Fix refcount leak bug in of_lpddr3_get_ddr_timings()
Liang He <[email protected]>
memory: of: Fix refcount leak bug in of_get_ddr_timings()
Liang He <[email protected]>
memory: pl353-smc: Fix refcount leak bug in pl353_smc_probe()
Takashi Iwai <[email protected]>
ALSA: hda/hdmi: Don't skip notification handling during PM operation
Judy Hsiao <[email protected]>
ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR
Zhang Qilong <[email protected]>
ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
Zhang Qilong <[email protected]>
ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
Zhang Qilong <[email protected]>
ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
Zhang Qilong <[email protected]>
ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
Krzysztof Kozlowski <[email protected]>
ASoC: wcd-mbhc-v2: Revert "ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()"
Zhang Qilong <[email protected]>
ASoC: stm: Fix PM disable depth imbalance in stm32_i2s_probe
Zhang Qilong <[email protected]>
ASoC: stm32: spdifrx: Fix PM disable depth imbalance in stm32_spdifrx_probe
Zhang Qilong <[email protected]>
ASoC: stm32: dfsdm: Fix PM disable depth imbalance in stm32_adfsdm_probe
Christophe JAILLET <[email protected]>
mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe()
Andreas Pape <[email protected]>
ALSA: dmaengine: increment buffer pointer atomically
Christophe JAILLET <[email protected]>
ASoC: da7219: Fix an error handling path in da7219_register_dai_clks()
Srinivas Kandagatla <[email protected]>
ASoC: codecs: tx-macro: fix kcontrol put
Dan Carpenter <[email protected]>
virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()
Rafael Mendonca <[email protected]>
drm/vmwgfx: Fix memory leak in vmw_mksstat_add_ioctl()
Peter Ujfalusi <[email protected]>
ASoC: SOF: ipc4-topology: Free the ida when IPC fails in sof_ipc4_widget_setup()
Takashi Iwai <[email protected]>
ALSA: usb-audio: Properly refcounting clock rate
Jaroslav Kysela <[email protected]>
ALSA: hda/hdmi: Fix the converter allocation for the silent stream
Jaroslav Kysela <[email protected]>
ALSA: hda/hdmi: change type for the 'assigned' variable
Kuogee Hsieh <[email protected]>
drm/msm/dp: correct 1.62G link rate at dp_catalog_ctrl_config_msa()
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: index dpu_kms->hw_vbif using vbif_idx
Dmitry Baryshkov <[email protected]>
drm/msm: lookup the ICC paths in both mdp5/dpu and mdss devices
Liang He <[email protected]>
ASoC: eureka-tlv320: Hold reference returned from of_find_xxx API
Christophe JAILLET <[email protected]>
mmc: au1xmmc: Fix an error handling path in au1xmmc_probe()
Judy Hsiao <[email protected]>
ASoC: rockchip: i2s: use regmap_read_poll_timeout to poll I2S_CLR
Rafael Mendonca <[email protected]>
drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()
Liang He <[email protected]>
drm/omap: dss: Fix refcount leak bugs
AngeloGioacchino Del Regno <[email protected]>
ASoC: SOF: mediatek: mt8195: Import namespace SND_SOC_SOF_MTK_COMMON
AngeloGioacchino Del Regno <[email protected]>
ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF
Gerd Hoffmann <[email protected]>
drm/bochs: fix blanking
Chia-I Wu <[email protected]>
drm/virtio: set fb_modifiers_not_supported
Takashi Iwai <[email protected]>
ALSA: hda: beep: Simplify keep-power-at-enable behavior
Cristian Ciocaltea <[email protected]>
ASoC: wm_adsp: Handle optional legacy support
Jiasheng Jiang <[email protected]>
ASoC: rsnd: Add check for rsnd_mod_power_on
Pin-yen Lin <[email protected]>
drm/bridge: it6505: Fix the order of DP_SET_POWER commands
Zheyu Ma <[email protected]>
drm/bridge: megachips: Fix a null pointer dereference bug
Yang Yingliang <[email protected]>
drm/amdgpu: add missing pci_disable_device() in amdgpu_pmops_runtime_resume()
Prashant Malani <[email protected]>
platform/chrome: cros_ec_typec: Correct alt mode index
Prashant Malani <[email protected]>
platform/chrome: cros_ec_typec: Add bit offset for DP VDO
Randy Dunlap <[email protected]>
drm: fix drm_mipi_dbi build errors
Randy Dunlap <[email protected]>
drm/panel: use 'select' for Ili9341 panel driver helpers
Hans de Goede <[email protected]>
platform/x86: msi-laptop: Fix resource cleanup
Hans de Goede <[email protected]>
platform/x86: msi-laptop: Fix old-ec check for backlight registering
Martin Povišer <[email protected]>
ASoC: tas2764: Fix mute/unmute
Martin Povišer <[email protected]>
ASoC: tas2764: Drop conflicting set_bias_level power setting
Martin Povišer <[email protected]>
ASoC: tas2764: Allow mono streams
Kuninori Morimoto <[email protected]>
ASoC: soc-pcm.c: call __soc_pcm_close() in soc_pcm_close()
Rob Clark <[email protected]>
drm/virtio: Fix same-context optimization
Stanislav Lisovskiy <[email protected]>
drm/i915/dg2: Bump up CDCLK for DG2
Dan Carpenter <[email protected]>
platform/chrome: fix memory corruption in ioctl
Rustam Subkhankulov <[email protected]>
platform/chrome: fix double-free in chromeos_laptop_prepare()
Javier Martinez Canillas <[email protected]>
drm/msm: Make .remove and .shutdown HW shutdown consistent
Yang Yingliang <[email protected]>
ASoC: amd: acp: add missing platform_device_unregister() in acp_pci_probe()
Dan Carpenter <[email protected]>
ASoC: mt6359: fix tests for platform_get_irq() failure
Liang He <[email protected]>
drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node()
Simon Ser <[email protected]>
drm/dp_mst: fix drm_dp_dpcd_read return value checks
José Expósito <[email protected]>
drm/format-helper: Fix test on big endian architectures
Chen-Yu Tsai <[email protected]>
drm/bridge: parade-ps8640: Fix regulator supply order
Liang He <[email protected]>
drm/bridge: tc358767: Add of_node_put() when breaking out of loop
Liang He <[email protected]>
drm/bridge: anx7625: Fix refcount bug in anx7625_parse_dt()
Dmitry Osipenko <[email protected]>
drm/virtio: Correct drm_gem_shmem_get_sg_table() error handling
Thomas Zimmermann <[email protected]>
video/aperture: Disable and unregister sysfb devices via aperture helpers
Pin-Yen Lin <[email protected]>
drm/bridge: it6505: Power on downstream device in .atomic_enable
Maxime Ripard <[email protected]>
drm/vc4: drv: Call component_unbind_all()
Maxime Ripard <[email protected]>
drm/mipi-dsi: Detach devices when removing the host
Dan Carpenter <[email protected]>
drm/bridge: Avoid uninitialized variable warning
Alvin Šipraga <[email protected]>
drm: bridge: adv7511: unregister cec i2c device after cec adapter
Alvin Šipraga <[email protected]>
drm: bridge: adv7511: fix CEC power down control register offset
Russell King (Oracle) <[email protected]>
net: mvpp2: fix mvpp2 debugfs leak
Eric Dumazet <[email protected]>
once: add DO_ONCE_SLOW() for sleepable contexts
Tetsuo Handa <[email protected]>
net/ieee802154: reject zero-sized raw_sendmsg()
Maxim Mikityanskiy <[email protected]>
net: wwan: iosm: Call mutex_init before locking it
Zheng Wang <[email protected]>
eth: sp7021: fix use after free bug in spl2sw_nvmem_get_mac_address
Jianglei Nie <[email protected]>
bnx2x: fix potential memory leak in bnx2x_tpa_stop()
Raju Lakkaraju <[email protected]>
eth: lan743x: reject extts for non-pci11x1x devices
Jiasheng Jiang <[email protected]>
net: prestera: acl: Add check for kmemdup
Kuniyuki Iwashima <[email protected]>
af_unix: Fix memory leaks of the whole sk due to OOB skb.
Tetsuo Handa <[email protected]>
net: rds: don't hold sock lock when cancelling work from rds_tcp_reset_callbacks()
Oleksandr Shamray <[email protected]>
hwmon: (pmbus/mp2888) Fix sensors readouts for MPS Multi-phase mp2888 controller
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_sync: Fix not indicating power state
Marek Szyprowski <[email protected]>
spi: Ensure that sg_table won't be used after being freed
Neal Cardwell <[email protected]>
tcp: fix tcp_cwnd_validate() to not forget is_cwnd_limited
Xin Long <[email protected]>
sctp: handle the error returned from sctp_auth_asoc_init_active_key
Duoming Zhou <[email protected]>
mISDN: fix use-after-free bugs in l1oip timer handlers
Jakub Kicinski <[email protected]>
eth: alx: take rtnl_lock on resume
Junichi Uekawa <[email protected]>
vhost/vsock: Use kvmalloc/kvfree for larger packets.
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Fix AIFS written to REG_EDCA_*_PARAM
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: gen2: Enable 40 MHz channel width
Abhishek Pandit-Subedi <[email protected]>
Bluetooth: Prevent double register of suspend
Vincent Whitchurch <[email protected]>
spi: s3c64xx: Fix large transfers with DMA
Phil Sutter <[email protected]>
netfilter: nft_fib: Fix for rpath check with VRF devices
Liu Jian <[email protected]>
xfrm: Reinject transport-mode packets through workqueue
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_core: Fix not handling link timeouts propertly
Asmaa Mnebhi <[email protected]>
i2c: mlxbf: support lock mechanism
Andrii Nakryiko <[email protected]>
libbpf: Don't require full struct enum64 in UAPI headers
Xiaomeng Tong <[email protected]>
cw1200: fix incorrect check to determine if no element is found in list
Liu Jian <[email protected]>
skmsg: Schedule psock work if the cached skb exists on the psock
Zhang Qilong <[email protected]>
spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe
Zhang Qilong <[email protected]>
spi: dw: Fix PM disable depth imbalance in dw_spi_bt1_probe
Zhang Qilong <[email protected]>
spi: cadence-quadspi: Fix PM disable depth imbalance in cqspi_probe
Luciano Leão <[email protected]>
x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype
Christian Marangi <[email protected]>
wifi: ath11k: fix peer addition/deletion error on sta band migration
Andrii Nakryiko <[email protected]>
libbpf: restore memory layout of bpf_object_open_opts
Kees Cook <[email protected]>
x86/microcode/AMD: Track patch allocation size explicitly
Arınç ÜNAL <[email protected]>
mips: dts: ralink: mt7621: fix external phy on GB-PC2
Jesus Fernandez Manzano <[email protected]>
wifi: ath11k: fix number of VHT beamformee spatial streams
Wen Gong <[email protected]>
wifi: ath11k: fix failed to find the peer with peer_id 0 when disconnected
Duoming Zhou <[email protected]>
mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv
Qingqing Yang <[email protected]>
flow_dissector: Do not count vlan tags inside tunnel payload
Pu Lehui <[email protected]>
selftests/bpf: Adapt cgroup effective query uapi change
Pu Lehui <[email protected]>
bpftool: Fix wrong cgroup attach flags being assigned to effective progs
Pu Lehui <[email protected]>
bpf, cgroup: Reject prog_attach_flags array when effective query
Antoine Tenart <[email protected]>
netfilter: conntrack: revisit the gc initial rescheduling bias
Antoine Tenart <[email protected]>
netfilter: conntrack: fix the gc rescheduling delay
Xin Liu <[email protected]>
libbpf: Fix NULL pointer exception in API btf_dump__dump_type_data
Tetsuo Handa <[email protected]>
Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure
Baochen Qiang <[email protected]>
wifi: ath11k: Include STA_KEEPALIVE_ARP_RESPONSE TLV header by default
Andrii Nakryiko <[email protected]>
libbpf: Fix crash if SEC("freplace") programs don't have attach_prog_fd set
Lee Jones <[email protected]>
bpf: Ensure correct locking around vulnerable function find_vpid()
Zheng Yongjun <[email protected]>
net: fs_enet: Fix wrong check in do_pd_setup
Luiz Augusto von Dentz <[email protected]>
Bluetooth: RFCOMM: Fix possible deadlock on socket shutdown/release
Deren Wu <[email protected]>
wifi: mt76: mt7921e: fix rmmod crash in driver reload test
Howard Hsu <[email protected]>
wifi: mt76: mt7915: do not check state before configuring implicit beamform
Lorenzo Bianconi <[email protected]>
wifi: mt76: fix uninitialized pointer in mt7921_mac_fill_rx
Howard Hsu <[email protected]>
wifi: mt76: mt7915: fix mcs value in ht mode
Sean Wang <[email protected]>
wifi: mt76: mt7921: fix the firmware version report
Sean Wang <[email protected]>
wifi: mt76: mt7921: add mt7921_mutex_acquire at mt7921_sta_set_decap_offload
Sean Wang <[email protected]>
wifi: mt76: mt7921: add mt7921_mutex_acquire at mt7921_[start, stop]_ap
Lorenzo Bianconi <[email protected]>
wifi: mt76: connac: fix possible unaligned access in mt76_connac_mcu_add_nested_tlv
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7915: fix possible unaligned access in mt7915_mac_add_twt_setup
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7615: add mt7615_mutex_acquire/release in mt7615_sta_set_decap_offload
YN Chen <[email protected]>
wifi: mt76: sdio: fix transmitting packet hangs
Dan Carpenter <[email protected]>
wifi: mt76: mt7921: fix use after free in mt7921_acpi_read()
Dan Carpenter <[email protected]>
wifi: mt76: mt7915: fix an uninitialized variable bug
Sean Wang <[email protected]>
wifi: mt76: sdio: poll sta stat when device transmits data
Sean Wang <[email protected]>
wifi: mt76: sdio: fix the deadlock caused by sdio->stat_work
Sean Wang <[email protected]>
wifi: mt76: mt7921u: fix race issue between reset and suspend/resume
Sean Wang <[email protected]>
wifi: mt76: mt7921s: fix race issue between reset and suspend/resume
Sean Wang <[email protected]>
wifi: mt76: mt7921e: fix race issue between reset and suspend/resume
Tetsuo Handa <[email protected]>
Bluetooth: avoid hci_dev_test_and_set_flag() in mgmt_init_hdev()
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Remove copy-paste leftover in gen2_update_rate_mask
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: gen2: Fix mistake in path B IQ calibration
Lorenz Bauer <[email protected]>
bpf: btf: fix truncated last_member_type_id in btf_struct_resolve
Neil Armstrong <[email protected]>
spi: meson-spicc: do not rely on busy flag in pow2 clk ops
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Fix skb misuse in TX queue selection
Xu Qiang <[email protected]>
spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime()
Xu Qiang <[email protected]>
spi: qup: add missing clk_disable_unprepare on error in spi_qup_resume()
Johannes Berg <[email protected]>
wifi: mac80211: mlme: assign link address correctly
Ian Rogers <[email protected]>
selftests/xsk: Avoid use-after-free on ctx
Yang Yingliang <[email protected]>
wifi: rtw88: add missing destroy_workqueue() on error path in rtw_core_init()
Dan Carpenter <[email protected]>
wifi: wfx: prevent underflow in wfx_send_pds()
Dan Carpenter <[email protected]>
wifi: rtl8xxxu: tighten bounds checking in rtl8xxxu_read_efuse()
Ping-Ke Shih <[email protected]>
wifi: rtw89: pci: correct TX resource checking in low power mode
Ping-Ke Shih <[email protected]>
wifi: rtw89: pci: fix interrupt stuck after leaving low power mode
Hou Tao <[email protected]>
bpf: Only add BTF IDs for socket security hooks when CONFIG_SECURITY_NETWORK is on
Sean Wang <[email protected]>
Bluetooth: btusb: mediatek: fix WMT failure during runtime suspend
Hou Tao <[email protected]>
bpf: Use this_cpu_{inc_return|dec} for prog->activeHou Tao <[email protected]>
bpf: Use this_cpu_{inc|dec|inc_return} for bpf_task_storage_busy
Manikanta Pubbisetty <[email protected]>
wifi: ath11k: Fix incorrect QMI message ID mappings
Hou Tao <[email protected]>
bpf: Propagate error from htab_lock_bucket() to userspace
Hou Tao <[email protected]>
bpf: Disable preemption when increasing per-cpu map_locked
Maciej Fijalkowski <[email protected]>
selftests/xsk: Add missing close() on netns fd
Maciej Fijalkowski <[email protected]>
xsk: Fix backpressure mechanism on Tx
Kohei Tarumizu <[email protected]>
x86/resctrl: Fix to restore to original value when re-enabling hardware prefetch register
Christophe JAILLET <[email protected]>
spi: mt7621: Fix an error message in mt7621_spi_probe()
Sabrina Dubroca <[email protected]>
esp: choose the correct inner protocol for GSO on inter address family tunnels
Richard Guy Briggs <[email protected]>
audit: free audit_proctitle only on task exit
Richard Guy Briggs <[email protected]>
audit: explicitly check audit_context->context enum value
Jacob Keller <[email protected]>
ice: set tx_tstamps when creating new Tx rings via ethtool
Lam Thai <[email protected]>
bpftool: Fix a wrong type cast in btf_dumper_int
Hari Chandrakanthan <[email protected]>
wifi: mac80211: allow bw change during channel switch in mesh
Johannes Berg <[email protected]>
wifi: mac80211_hwsim: fix link change handling
Mordechay Goodstein <[email protected]>
wifi: mac80211: mlme: don't add empty EML capabilities
Johannes Berg <[email protected]>
wifi: mac80211: fix use-after-free
Shaul Triebitz <[email protected]>
wifi: cfg80211: get correct AP link chandef
Shaul Triebitz <[email protected]>
wifi: mac80211: properly set old_links when removing a link
Kumar Kartikeya Dwivedi <[email protected]>
bpf: Fix reference state management for synchronous callbacks
Maksym Glubokiy <[email protected]>
net: prestera: cache port state for non-phylink ports too
Gerhard Engleder <[email protected]>
tsnep: Fix TSNEP_INFO_TX_TIME register define
Uwe Kleine-König <[email protected]>
leds: lm3601x: Don't use mutex after it was destroyed
Joanne Koong <[email protected]>
bpf: Fix ref_obj_id for dynptr data slices in verifier
Dave Marchevsky <[email protected]>
bpf: Cleanup check_refcount_ok
Wen Gong <[email protected]>
wifi: ath10k: add peer map clean up for peer delete in ath10k_sta_state()
Youghandhar Chintala <[email protected]>
wifi: ath10k: Set tx credit to one for WCN3990 snoc based devices
Ping-Ke Shih <[email protected]>
wifi: rtlwifi: 8192de: correct checking of IQK reload
Florian Fainelli <[email protected]>
libbpf: Initialize err in probe_map_create
Jason A. Donenfeld <[email protected]>
m68k: Process bootinfo records before saving them
Bill Wendling <[email protected]>
x86/paravirt: add extra clobbers with ZERO_CALL_USED_REGS enabled
Chuck Lever <[email protected]>
NFSD: Fix handling of oversized NFSv4 COMPOUND requests
Chuck Lever <[email protected]>
NFSD: Protect against send buffer overflow in NFSv2 READDIR
Chuck Lever <[email protected]>
SUNRPC: Fix svcxdr_init_encode's buflen calculation
Chuck Lever <[email protected]>
SUNRPC: Fix svcxdr_init_decode's end-of-buffer calculation
Christophe JAILLET <[email protected]>
nfsd: Fix a memory leak in an error handling path
Sami Tolvanen <[email protected]>
objtool: Preserve special st_shndx indexes in elf_update_symbol
Huisong Li <[email protected]>
ACPI: PCC: Fix Tx acknowledge in the PCC address space handler
Huisong Li <[email protected]>
ACPI: PCC: replace wait_for_completion()
Rafael Mendonca <[email protected]>
ACPI: PCC: Release resources on address space setup failure path
Wang Kefeng <[email protected]>
ARM: 9247/1: mm: set readonly for MT_MEMORY_RO with ARM_LPAE
Wang Kefeng <[email protected]>
ARM: 9244/1: dump: Fix wrong pg_level in walk_pmd()
Bart Van Assche <[email protected]>
ARM: 9243/1: riscpc: Unbreak the build
Jia Zhu <[email protected]>
erofs: use kill_anon_super() to kill super in fscache mode
Gao Xiang <[email protected]>
erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
Lin Yujun <[email protected]>
MIPS: SGI-IP27: Fix platform-device leak in bridge_platform_create()
Lin Yujun <[email protected]>
MIPS: SGI-IP30: Fix platform-device leak in bridge_platform_create()
Kees Cook <[email protected]>
sh: machvec: Use char[] for section boundaries
Perry Yuan <[email protected]>
cpufreq: amd-pstate: Fix initial highest_perf value
Xuewen Yan <[email protected]>
thermal: cpufreq_cooling: Check the policy first in cpufreq_cooling_register()
Christian Brauner <[email protected]>
acl: return EOPNOTSUPP in posix_acl_fix_xattr_common()
Christian Brauner <[email protected]>
ntfs3: rework xattr handlers and switch to POSIX ACL VFS helpers
Ondrej Mosnacek <[email protected]>
userfaultfd: open userfaultfds with O_RDONLY
Mimi Zohar <[email protected]>
ima: fix blocking of security.ima xattrs of unsupported algorithms
Greg Kroah-Hartman <[email protected]>
selinux: use "grep -E" instead of "egrep"
Steve French <[email protected]>
smb3: must initialize two ACL struct fields to zero
Ruili Ji <[email protected]>
drm/amdgpu: Enable F32_WPTR_POLL_ENABLE in mqd
Sonny Jiang <[email protected]>
drm/amdgpu: Enable VCN PG on GC11_0_1
Shirish S <[email protected]>
drm/amd/display: explicitly disable psr_feature_enable appropriately
Aurabindo Pillai <[email protected]>
drm/amd/display: Add HUBP surface flip interrupt handler
Yunxiang Li <[email protected]>
drm/amd/display: Fix vblank refcount in vrr transition
Rodrigo Siqueira <[email protected]>
drm/amd/display: Enable 2 to 1 ODM policy if supported
Roman Li <[email protected]>
drm/amd/display: Enable dpia support for dcn314
Fangzhi Zuo <[email protected]>
drm/amd/display: Validate DSC After Enable All New CRTCs
Martin Leung <[email protected]>
drm/amd/display: zeromem mypipe heap struct before using it
Nicholas Kazlauskas <[email protected]>
drm/amd/display: Update PMFW z-state interface for DCN314
Alvin Lee <[email protected]>
drm/amd/display: Fix watermark calculation
Thomas Hellström <[email protected]>
drm/i915: Fix display problems after resume
Ville Syrjälä <[email protected]>
drm/i915: Fix watermark calculations for DG2 CCS+CC modifier
Ville Syrjälä <[email protected]>
drm/i915: Fix watermark calculations for DG2 CCS modifiers
Ville Syrjälä <[email protected]>
drm/i915: Fix watermark calculations for gen12+ CCS+CC modifier
Ville Syrjälä <[email protected]>
drm/i915: Fix watermark calculations for gen12+ MC CCS modifier
Ville Syrjälä <[email protected]>
drm/i915: Fix watermark calculations for gen12+ RC CCS modifier
Tvrtko Ursulin <[email protected]>
drm/i915/guc: Fix revocation of non-persistent contexts
Chris Wilson <[email protected]>
drm/i915/gt: Use i915_vm_put on ppgtt_create error paths
Jianglei Nie <[email protected]>
drm/nouveau: fix a use-after-free in nouveau_gem_prime_import_sg_table()
Lyude Paul <[email protected]>
drm/nouveau/kms/nv140-: Disable interlacing
Greg Kroah-Hartman <[email protected]>
staging: greybus: audio_helper: remove unused and wrong debugfs usage
Sean Christopherson <[email protected]>
KVM: VMX: Drop bits 31:16 when shoving exception error code into VMCS
Sean Christopherson <[email protected]>
KVM: x86: Treat #DBs from the emulator as fault-like (code and DR7.GD=1)
Sean Christopherson <[email protected]>
KVM: nVMX: Don't propagate vmcs12's PERF_GLOBAL_CTRL settings to vmcs02
Sean Christopherson <[email protected]>
KVM: nVMX: Unconditionally purge queued/injected events on nested "exit"
Michal Luczaj <[email protected]>
KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility
Yu Kuai <[email protected]>
blk-wbt: call rq_qos_add() after wb_normal is initialized
Yu Kuai <[email protected]>
blk-throttle: fix that io throttle can only work for single bio
Dmitry Osipenko <[email protected]>
media: cedrus: Fix endless loop in cedrus_h265_skip_bits()
Dmitry Osipenko <[email protected]>
media: cedrus: Set the platform driver data earlier
Nicolas Dufresne <[email protected]>
media: cedrus: Fix watchdog race condition
Ard Biesheuvel <[email protected]>
efi: libstub: drop pointless get_memory_map() call
Mario Limonciello <[email protected]>
thunderbolt: Explicitly enable lane adapter hotplug events at startup
Shengjiu Wang <[email protected]>
rpmsg: char: Avoid double destroy of default endpoint
Steven Rostedt (Google) <[email protected]>
tracing: Fix reading strings from synthetic events
Steven Rostedt (Google) <[email protected]>
tracing: Add "(fault)" name injection to kernel probes
Steven Rostedt (Google) <[email protected]>
tracing: Move duplicate code of trace_kprobe/eprobe.c into header
Steven Rostedt (Google) <[email protected]>
tracing: Do not free snapshot if tracer is on cmdline
Steven Rostedt (Google) <[email protected]>
tracing: Add ioctl() to force ring buffer waiters to wake up
Steven Rostedt (Google) <[email protected]>
tracing: Wake up waiters when tracing is disabled
Steven Rostedt (Google) <[email protected]>
tracing: Wake up ring buffer waiters on closing of the file
Waiman Long <[email protected]>
tracing: Disable interrupt or preemption before acquiring arch_spinlock_t
Tao Chen <[email protected]>
tracing/eprobe: Fix alloc event dir failed when event name no set
Steven Rostedt (Google) <[email protected]>
ring-buffer: Fix race between reset page and reading page
Steven Rostedt (Google) <[email protected]>
ring-buffer: Add ring_buffer_wake_waiters()
Steven Rostedt (Google) <[email protected]>
ring-buffer: Check pending waiters when doing wake ups as well
Steven Rostedt (Google) <[email protected]>
ring-buffer: Have the shortest_full queue be the shortest not longest
Steven Rostedt (Google) <[email protected]>
ring-buffer: Allow splice to read previous partially read pages
Steven Rostedt (Google) <[email protected]>
ftrace: Still disable enabled records marked as disabled
Zheng Yejian <[email protected]>
ftrace: Properly unset FTRACE_HASH_FL_MOD
Rik van Riel <[email protected]>
livepatch: fix race between fork and KLP transition
Ye Bin <[email protected]>
ext4: update 'state->fc_regions_size' after successful memory allocation
Ye Bin <[email protected]>
ext4: fix potential memory leak in ext4_fc_record_regions()
Ye Bin <[email protected]>
ext4: fix potential memory leak in ext4_fc_record_modified_inode()
Ye Bin <[email protected]>
ext4: fix miss release buffer head in ext4_fc_write_inode
Zhihao Cheng <[email protected]>
ext4: fix dir corruption when ext4_dx_add_entry() fails
Jeff Layton <[email protected]>
ext4: fix i_version handling in ext4
Jinke Han <[email protected]>
ext4: place buffer head allocation before handle start
Zhang Yi <[email protected]>
ext4: ext4_read_bh_lock() should submit IO if the buffer isn't uptodate
Jeff Layton <[email protected]>
ext4: unconditionally enable the i_version counter
Lukas Czerner <[email protected]>
ext4: don't increase iversion counter for ea_inodes
Jan Kara <[email protected]>
ext4: fix check for block being out of directory size
Lalith Rajendran <[email protected]>
ext4: make ext4_lazyinit_thread freezable
Baokun Li <[email protected]>
ext4: fix null-ptr-deref in ext4_write_info
Jan Kara <[email protected]>
ext4: avoid crash when inline data creation follows DIO write
Jan Kara <[email protected]>
ext2: Add sanity checks for group and filesystem size
Ye Bin <[email protected]>
jbd2: add miss release buffer head in fc_do_one_pass()
Ye Bin <[email protected]>
jbd2: fix potential use-after-free in jbd2_fc_wait_bufs
Ye Bin <[email protected]>
jbd2: fix potential buffer head reference count leak
Andrew Perepechko <[email protected]>
jbd2: wake up journal waiters in FIFO order, not LIFO
Jaegeuk Kim <[email protected]>
f2fs: allow direct read for zoned device
Chao Yu <[email protected]>
f2fs: fix to do sanity check on summary info
Chao Yu <[email protected]>
f2fs: fix to do sanity check on destination blkaddr during recovery
Jaegeuk Kim <[email protected]>
f2fs: increase the limit for reserve_root
Jaegeuk Kim <[email protected]>
f2fs: flush pending checkpoints when freezing super
Jaegeuk Kim <[email protected]>
f2fs: complete checkpoints during remount
Jaegeuk Kim <[email protected]>
f2fs: fix wrong continue condition in GC
Tetsuo Handa <[email protected]>
btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer
Filipe Manana <[email protected]>
btrfs: fix missed extent on fsync after dropping extent maps
Filipe Manana <[email protected]>
btrfs: fix race between quota enable and quota rescan ioctl
Qu Wenruo <[email protected]>
btrfs: enhance unsupported compat RO flags handling
Alexander Zhu <[email protected]>
btrfs: fix alignment of VMA for memory mapped files on THP
Lukas Czerner <[email protected]>
fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE
Mickaël Salaün <[email protected]>
ksmbd: Fix user namespace mapping
Zhang Xiaoxu <[email protected]>
ksmbd: Fix wrong return value and message length check in smb2_ioctl()
Namjae Jeon <[email protected]>
ksmbd: fix endless loop when encryption for response fails
Namjae Jeon <[email protected]>
ksmbd: fix incorrect handling of iterate_dir
Steve French <[email protected]>
smb3: do not log confusing message when server returns no network interfaces
Jason A. Donenfeld <[email protected]>
hwrng: core - let sleep be interrupted when unregistering hwrng
Hyunwoo Kim <[email protected]>
fbdev: smscufx: Fix use-after-free in ufx_ops_open()
Quentin Schulz <[email protected]>
pinctrl: rockchip: add pinmux_ops.gpio_set_direction callback
Quentin Schulz <[email protected]>
gpio: rockchip: request GPIO mux to pinctrl when setting direction
Saurav Kashyap <[email protected]>
scsi: qedf: Populate sysfs attributes for vport
James Smart <[email protected]>
scsi: lpfc: Rework MIB Rx Monitor debug info logic
Krzysztof Kozlowski <[email protected]>
slimbus: qcom-ngd: cleanup in probe error path
Krzysztof Kozlowski <[email protected]>
slimbus: qcom-ngd: use correct error in message of pdr_add_lookup() failure
Pali Rohár <[email protected]>
powerpc/boot: Explicitly disable usage of SPE instructions
Christophe Leroy <[email protected]>
powerpc/Kconfig: Fix non existing CONFIG_PPC_FSL_BOOKE
Zhang Rui <[email protected]>
powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
Matthias Kaehlcke <[email protected]>
LoadPin: Fix Kconfig doc about format of file with verity digests
Viresh Kumar <[email protected]>
cpufreq: qcom-cpufreq-hw: Fix uninitialized throttled_freq warning
Chuck Lever <[email protected]>
NFSD: Protect against send buffer overflow in NFSv3 READ
Chuck Lever <[email protected]>
NFSD: Protect against send buffer overflow in NFSv2 READ
Chuck Lever <[email protected]>
NFSD: Protect against send buffer overflow in NFSv3 READDIR
Maciej W. Rozycki <[email protected]>
serial: 8250: Request full 16550A feature probing for OxSemi PCIe devices
Maciej W. Rozycki <[email protected]>
serial: 8250: Let drivers request full 16550A feature probing
Lukas Wunner <[email protected]>
serial: ar933x: Deassert Transmit Enable on ->rs485_config()
Lukas Wunner <[email protected]>
serial: Deassert Transmit Enable on probe in driver-specific way
Lukas Wunner <[email protected]>
serial: stm32: Deassert Transmit Enable on ->rs485_config()
Christophe Leroy <[email protected]>
serial: cpm_uart: Don't request IRQ too early for console port
Maciej W. Rozycki <[email protected]>
PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge
M. Vefa Bicakci <[email protected]>
xen/gntdev: Accommodate VMA splitting
M. Vefa Bicakci <[email protected]>
xen/gntdev: Prevent leaking grants
Carlos Llamas <[email protected]>
mm/mmap: undo ->mmap() when arch_validate_flags() fails
Peter Xu <[email protected]>
mm/uffd: fix warning without PTE_MARKER_UFFD_WP compiled in
Baolin Wang <[email protected]>
mm/damon: validate if the pmd entry is present before accessing
Baolin Wang <[email protected]>
mm/hugetlb: fix races when looking up a CONT-PTE/PMD size hugetlb page
Yang Guo <[email protected]>
clocksource/drivers/arm_arch_timer: Fix CNTPCT_LO and CNTVCT_LO value
James Morse <[email protected]>
arm64: errata: Add Cortex-A55 to the repeat tlbi list
Catalin Marinas <[email protected]>
arm64: mte: Avoid setting PG_mte_tagged if no tags cleared or restored
Peter Collingbourne <[email protected]>
arm64: mte: move register initialization to C
Takashi Iwai <[email protected]>
drm/udl: Restore display mode on resume
Dmitry Osipenko <[email protected]>
drm/virtio: Use appropriate atomic state in virtio_gpu_plane_cleanup_fb()
Dmitry Osipenko <[email protected]>
drm/virtio: Unlock reservations on dma_resv_reserve_fences() error
Dmitry Osipenko <[email protected]>
drm/virtio: Unlock reservations on virtio_gpu_object_shmem_init() error
Dmitry Osipenko <[email protected]>
drm/virtio: Check whether transferred 2D BO is shmem
Christian Marangi <[email protected]>
dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg
Christian Marangi <[email protected]>
dmaengine: qcom-adm: fix wrong sizeof config in slave_config
Dario Binacchi <[email protected]>
dmaengine: mxs: use platform_driver_register
Matthias Kaehlcke <[email protected]>
dm: verity-loadpin: Only trust verity targets with enforcement
Hamza Mahfooz <[email protected]>
Revert "drm/amdgpu: use dirty framebuffer helper"
Sagi Grimberg <[email protected]>
nvme-multipath: fix possible hang in live ns resize with ANA access
Gaosheng Cui <[email protected]>
nvmem: core: Fix memleak in nvmem_register()
Huacai Chen <[email protected]>
UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
Fangrui Song <[email protected]>
riscv: Pass -mno-relax only on lld < 15.0.0
Wenting Zhang <[email protected]>
riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb
Andrew Bresticker <[email protected]>
riscv: Make VM_WRITE imply VM_READ
Andrew Bresticker <[email protected]>
riscv: Allow PROT_WRITE-only mmap()
Jisheng Zhang <[email protected]>
riscv: vdso: fix NULL deference in vdso_join_timens() when vfork
Helge Deller <[email protected]>
parisc: Fix userspace graphics card breakage due to pgtable special bit
Helge Deller <[email protected]>
parisc: fbdev/stifb: Align graphics memory size to 4MB
Maciej W. Rozycki <[email protected]>
RISC-V: Make port I/O string accessors actually work
Palmer Dabbelt <[email protected]>
RISC-V: Re-enable counter access from userspace
Conor Dooley <[email protected]>
riscv: topology: fix default topology reporting
Conor Dooley <[email protected]>
arm64: topology: move store_cpu_topology() to shared code
Linus Walleij <[email protected]>
regulator: qcom_rpm: Fix circular deferral regression
Mika Westerberg <[email protected]>
net: thunderbolt: Enable DMA paths only after rings are enabled
Liang He <[email protected]>
hwmon: (gsc-hwmon) Call of_node_get() before of_find_xxx API
Krzysztof Kozlowski <[email protected]>
ASoC: wcd934x: fix order of Slimbus unprepare/disable
Krzysztof Kozlowski <[email protected]>
ASoC: wcd9335: fix order of Slimbus unprepare/disable
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm845-mtp: correct ADC settle time
Patryk Duda <[email protected]>
platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure
Zhihao Cheng <[email protected]>
quota: Check next/prev free block number after reading from quota file
Andri Yngvason <[email protected]>
HID: multitouch: Add memory barriers
Jan Kara <[email protected]>
mbcache: Avoid nesting of cache->c_list_lock under bit locks
Roberto Sassu <[email protected]>
btf: Export bpf_dynptr definition
Alexander Aring <[email protected]>
fs: dlm: fix invalid derefence of sb_lvbptr
Alexander Aring <[email protected]>
fs: dlm: handle -EBUSY first in lock arg validation
Alexander Aring <[email protected]>
fs: dlm: fix race between test_bit() and queue_work()
Jarkko Nikula <[email protected]>
i2c: designware: Fix handling of real but unexpected device interrupts
Wenchao Chen <[email protected]>
mmc: sdhci-sprd: Fix minimum clock limit
Prathamesh Shete <[email protected]>
mmc: sdhci-tegra: Use actual clock rate for SW tuning correction
Biju Das <[email protected]>
mmc: renesas_sdhi: Fix rounding errors
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix CAN state after restart
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix TX queue out of sync after restart
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix overread with an invalid command
Anssi Hannula <[email protected]>
can: kvaser_usb: Fix use of uninitialized completion
Avri Altman <[email protected]>
mmc: core: Add SD card quirk for broken discard
Jean-Francois Le Fillatre <[email protected]>
usb: add quirks for Lenovo OneLink+ Dock
Nathan Chancellor <[email protected]>
usb: gadget: uvc: Fix argument to sizeof() in uvc_register_video()
Rafael Mendonca <[email protected]>
xhci: dbc: Fix memory leak in xhci_alloc_dbc()
Eddie James <[email protected]>
iio: pressure: dps310: Reset chip after timeout
Eddie James <[email protected]>
iio: pressure: dps310: Refactor startup procedure
Nuno Sá <[email protected]>
iio: adc: ad7923: fix channel readings for some variants
Uwe Kleine-König <[email protected]>
iio: ltc2497: Fix reading conversion results
Michael Hennerich <[email protected]>
iio: dac: ad5593r: Fix i2c read protocol requirements
Zhang Xiaoxu <[email protected]>
cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message
Ronnie Sahlberg <[email protected]>
cifs: destage dirty pages before re-reading them for cache=none
Gaurav Kohli <[email protected]>
hv_netvsc: Fix race between VF offering and VF association message from host
Pavel Begunkov <[email protected]>
io_uring: correct pinned_vm accounting
Pavel Begunkov <[email protected]>
io_uring/af_unix: defer registered files gc to io_uring release
Jens Axboe <[email protected]>
io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT
Pavel Begunkov <[email protected]>
io_uring: limit registration w/ SINGLE_ISSUER
Pavel Begunkov <[email protected]>
io_uring/net: don't update msg_name if not provided
Stefan Metzmacher <[email protected]>
io_uring/net: fix fast_iov assignment in io_setup_async_msg()
Pavel Begunkov <[email protected]>
io_uring/rw: don't lose short results on io_setup_async_rw()
Pavel Begunkov <[email protected]>
io_uring/rw: fix unexpected link breakage
Pavel Begunkov <[email protected]>
io_uring/net: don't lose partial send/recv on fail
Pavel Begunkov <[email protected]>
io_uring/rw: don't lose partial IO result on fail
Pavel Begunkov <[email protected]>
io_uring: add custom opcode hooks on fail
Tudor Ambarus <[email protected]>
mtd: rawnand: atmel: Unmap streaming DMA mappings
Saranya Gopal <[email protected]>
ALSA: hda/realtek: Add Intel Reference SSID to support headset keys
Luke D. Jones <[email protected]>
ALSA: hda/realtek: Add quirk for ASUS GV601R laptop
Luke D. Jones <[email protected]>
ALSA: hda/realtek: Correct pin configs for ASUS G533Z
Callum Osmotherly <[email protected]>
ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix NULL dererence at error path
Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix potential memory leaks
Takashi Iwai <[email protected]>
ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
Takashi Iwai <[email protected]>
ALSA: oss: Fix potential deadlock at unregistration
-------------
Diffstat:
Documentation/ABI/testing/sysfs-bus-iio | 2 +- Documentation/admin-guide/kernel-parameters.txt | 4 + Documentation/arm64/silicon-errata.rst | 2 + Documentation/filesystems/vfs.rst | 3 + .../trace/coresight/coresight-cpu-debug.rst | 3 +- Makefile | 4 +- arch/arm/Kconfig | 1 - arch/arm/boot/compressed/misc.c | 2 + arch/arm/boot/compressed/vmlinux.lds.S | 2 + arch/arm/boot/dts/armada-385-turris-omnia.dts | 4 +- arch/arm/boot/dts/exynos4412-midas.dtsi | 2 +- arch/arm/boot/dts/exynos4412-origen.dts | 2 +- arch/arm/boot/dts/imx6dl-riotboard.dts | 1 + arch/arm/boot/dts/imx6dl.dtsi | 3 + arch/arm/boot/dts/imx6q-arm2.dts | 1 + arch/arm/boot/dts/imx6q-evi.dts | 1 + arch/arm/boot/dts/imx6q-mccmon6.dts | 1 + arch/arm/boot/dts/imx6q.dtsi | 3 + arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 6 +- arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi | 1 + arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 1 + arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 1 + arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 1 + arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 1 + arch/arm/boot/dts/imx6qdl-tqma6a.dtsi | 1 + arch/arm/boot/dts/imx6qdl-ts7970.dtsi | 1 + arch/arm/boot/dts/imx6qp.dtsi | 6 + arch/arm/boot/dts/imx6sl.dtsi | 23 +- arch/arm/boot/dts/imx6sll.dtsi | 3 + arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 14 +- arch/arm/boot/dts/imx6sx.dtsi | 6 + arch/arm/boot/dts/imx7d-sdb.dts | 7 +- arch/arm/boot/dts/kirkwood-lsxl.dtsi | 16 +- arch/arm/boot/dts/uniphier-pinctrl.dtsi | 10 + arch/arm/include/asm/stacktrace.h | 6 + arch/arm/kernel/return_address.c | 1 + arch/arm/kernel/stacktrace.c | 84 +++-- arch/arm/lib/call_with_stack.S | 2 + arch/arm/mm/dma-mapping.c | 12 +- arch/arm/mm/dump.c | 2 +- arch/arm/mm/kasan_init.c | 9 +- arch/arm/mm/mmu.c | 4 + arch/arm/plat-orion/Makefile | 2 +- arch/arm64/Kconfig | 17 + .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 +- .../boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 3 + .../dts/freescale/imx8mm-kontron-n801x-som.dtsi | 2 - arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 +- arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 + arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi | 8 +- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 +- arch/arm64/boot/dts/qcom/pm8350c.dtsi | 3 +- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 11 - .../boot/dts/qcom/sc7180-trogdor-coachz-r1.dts | 2 - arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 2 - arch/arm64/boot/dts/qcom/sc7280-idp.dts | 2 +- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280.dtsi | 9 +- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 - .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 10 - arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 3 +- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 12 +- arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 2 +- .../boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 8 +- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 8 +- arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 8 +- arch/arm64/boot/dts/socionext/Makefile | 4 +- .../dts/socionext/uniphier-pxs3-ref-gadget0.dts | 41 +++ .../dts/socionext/uniphier-pxs3-ref-gadget1.dts | 40 +++ .../boot/dts/ti/k3-j7200-common-proc-board.dts | 10 +- arch/arm64/boot/dts/ti/k3-j7200-main.dtsi | 11 +- arch/arm64/include/asm/mte.h | 5 + arch/arm64/kernel/cpu_errata.c | 5 + arch/arm64/kernel/cpufeature.c | 3 +- arch/arm64/kernel/ftrace.c | 17 +- arch/arm64/kernel/mte.c | 60 +++- arch/arm64/kernel/suspend.c | 2 + arch/arm64/kernel/topology.c | 40 --- arch/arm64/mm/mteswap.c | 7 +- arch/arm64/mm/proc.S | 46 +-- arch/ia64/mm/numa.c | 1 + arch/m68k/kernel/setup_mm.c | 5 +- arch/mips/bcm47xx/prom.c | 4 +- arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts | 6 +- arch/mips/sgi-ip27/ip27-xtalk.c | 70 +++-- arch/mips/sgi-ip30/ip30-xtalk.c | 70 +++-- arch/parisc/include/asm/pgtable.h | 7 +- arch/parisc/kernel/entry.S | 8 + arch/powerpc/Kconfig | 2 +- arch/powerpc/Makefile | 2 +- arch/powerpc/boot/Makefile | 1 + arch/powerpc/boot/dts/fsl/e500v1_power_isa.dtsi | 51 +++ arch/powerpc/boot/dts/fsl/mpc8540ads.dts | 2 +- arch/powerpc/boot/dts/fsl/mpc8541cds.dts | 2 +- arch/powerpc/boot/dts/fsl/mpc8555cds.dts | 2 +- arch/powerpc/boot/dts/fsl/mpc8560ads.dts | 2 +- arch/powerpc/boot/dts/turris1x.dts | 14 +- arch/powerpc/configs/pseries_defconfig | 1 + arch/powerpc/include/asm/interrupt.h | 3 +- arch/powerpc/include/asm/syscalls.h | 12 + arch/powerpc/kernel/interrupt.c | 10 - arch/powerpc/kernel/interrupt_64.S | 45 ++- arch/powerpc/kernel/kprobes.c | 8 +- arch/powerpc/kernel/pci_dn.c | 1 + arch/powerpc/kernel/setup_64.c | 4 +- arch/powerpc/kernel/sys_ppc32.c | 14 +- arch/powerpc/kernel/syscalls.c | 4 +- arch/powerpc/math-emu/math_efp.c | 1 + arch/powerpc/platforms/powernv/opal.c | 1 + arch/powerpc/platforms/pseries/vas.c | 2 +- arch/powerpc/sysdev/fsl_msi.c | 2 + arch/riscv/Kconfig | 2 +- arch/riscv/Makefile | 2 + arch/riscv/include/asm/io.h | 16 +- arch/riscv/include/asm/mmu.h | 1 - arch/riscv/kernel/setup.c | 4 +- arch/riscv/kernel/smpboot.c | 3 +- arch/riscv/kernel/sys_riscv.c | 3 - arch/riscv/kernel/vdso.c | 13 +- arch/riscv/mm/fault.c | 3 +- arch/sh/include/asm/sections.h | 2 +- arch/sh/kernel/machvec.c | 10 +- arch/um/kernel/um_arch.c | 2 +- arch/x86/Kconfig | 7 +- arch/x86/include/asm/cpu.h | 2 + arch/x86/include/asm/hyperv-tlfs.h | 4 +- arch/x86/include/asm/microcode.h | 1 + arch/x86/include/asm/msr-index.h | 13 + arch/x86/include/asm/paravirt_types.h | 11 +- arch/x86/kernel/apic/apic.c | 44 ++- arch/x86/kernel/cpu/feat_ctl.c | 2 +- arch/x86/kernel/cpu/mce/apei.c | 13 +- arch/x86/kernel/cpu/microcode/amd.c | 3 +- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 12 +- arch/x86/kvm/emulate.c | 2 +- arch/x86/kvm/vmx/nested.c | 37 ++- arch/x86/kvm/vmx/vmx.c | 12 +- arch/x86/kvm/x86.c | 27 +- arch/x86/net/bpf_jit_comp.c | 16 +- arch/x86/xen/enlighten_pv.c | 3 +- block/bio.c | 2 - block/blk-mq.c | 6 +- block/blk-throttle.c | 28 +- block/blk-throttle.h | 2 +- block/blk-wbt.c | 10 +- block/blk.h | 3 +- block/elevator.c | 4 +- crypto/akcipher.c | 8 + drivers/acpi/acpi_fpdt.c | 22 ++ drivers/acpi/acpi_pcc.c | 28 +- drivers/acpi/acpi_video.c | 16 + drivers/acpi/apei/ghes.c | 2 +- drivers/acpi/x86/utils.c | 19 +- drivers/ata/libahci_platform.c | 14 +- drivers/base/arch_topology.c | 19 ++ drivers/block/nbd.c | 6 +- drivers/bluetooth/btintel.c | 17 +- drivers/bluetooth/btusb.c | 14 + drivers/bluetooth/hci_ldisc.c | 7 +- drivers/bluetooth/hci_serdev.c | 10 +- drivers/char/hw_random/arm_smccc_trng.c | 4 +- drivers/char/hw_random/core.c | 19 +- drivers/char/hw_random/imx-rngc.c | 37 +-- drivers/char/random.c | 4 +- drivers/clk/baikal-t1/ccu-div.c | 65 ++++ drivers/clk/baikal-t1/ccu-div.h | 10 + drivers/clk/baikal-t1/clk-ccu-div.c | 26 +- drivers/clk/bcm/clk-bcm2835.c | 43 ++- drivers/clk/berlin/bg2.c | 5 +- drivers/clk/berlin/bg2q.c | 6 +- drivers/clk/clk-ast2600.c | 2 +- drivers/clk/clk-oxnas.c | 6 +- drivers/clk/clk-qoriq.c | 10 +- drivers/clk/clk-versaclock5.c | 2 +- drivers/clk/imx/clk-imx8mp.c | 2 +- drivers/clk/imx/clk-scu.c | 6 +- drivers/clk/mediatek/clk-mt8183-mfgcfg.c | 6 +- drivers/clk/mediatek/clk-mt8195-infra_ao.c | 13 +- drivers/clk/mediatek/clk-mt8195-mfg.c | 6 +- drivers/clk/mediatek/clk-mt8195-vdo0.c | 7 +- drivers/clk/mediatek/clk-mt8195-vdo1.c | 6 +- drivers/clk/mediatek/clk-mtk.c | 12 +- drivers/clk/meson/meson-aoclk.c | 5 +- drivers/clk/meson/meson-eeclk.c | 5 +- drivers/clk/meson/meson8b.c | 5 +- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/apss-ipq6018.c | 2 +- drivers/clk/qcom/gcc-sdm660.c | 2 +- drivers/clk/qcom/gcc-sm6115.c | 46 ++- drivers/clk/samsung/clk-exynosautov9.c | 20 +- drivers/clk/sprd/common.c | 9 +- drivers/clk/st/clkgen-fsyn.c | 5 +- drivers/clk/st/clkgen-mux.c | 5 +- drivers/clk/tegra/clk-tegra114.c | 1 + drivers/clk/tegra/clk-tegra20.c | 1 + drivers/clk/tegra/clk-tegra210.c | 1 + drivers/clk/ti/clk-dra7-atl.c | 9 +- drivers/clk/ti/clk.c | 5 +- drivers/clk/zynqmp/clkc.c | 7 + drivers/clk/zynqmp/pll.c | 31 +- drivers/clocksource/arm_arch_timer.c | 6 +- drivers/clocksource/timer-gxp.c | 7 +- drivers/cpufreq/amd-pstate.c | 16 +- drivers/cpufreq/intel_pstate.c | 1 + drivers/cpufreq/qcom-cpufreq-hw.c | 10 +- drivers/cpuidle/cpuidle-riscv-sbi.c | 7 +- drivers/crypto/cavium/cpt/cptpf_main.c | 6 +- drivers/crypto/ccp/ccp-dmaengine.c | 6 +- drivers/crypto/ccp/sev-dev.c | 26 +- drivers/crypto/hisilicon/qm.c | 6 +- drivers/crypto/hisilicon/zip/zip_crypto.c | 4 +- drivers/crypto/inside-secure/safexcel_hash.c | 8 +- drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c | 18 +- drivers/crypto/qat/qat_common/adf_gen4_hw_data.h | 2 +- drivers/crypto/qat/qat_common/qat_algs.c | 18 +- drivers/crypto/sahara.c | 18 +- drivers/dma-buf/udmabuf.c | 9 +- drivers/dma/dw-edma/dw-edma-core.c | 12 - drivers/dma/hisi_dma.c | 28 +- drivers/dma/idxd/irq.c | 2 - drivers/dma/ioat/dma.c | 6 +- drivers/dma/mxs-dma.c | 11 +- drivers/dma/qcom/qcom_adm.c | 22 +- drivers/dma/ti/k3-udma.c | 25 +- drivers/firmware/efi/libstub/fdt.c | 8 - drivers/firmware/google/gsmi.c | 9 + drivers/fpga/dfl-pci.c | 18 ++ drivers/fpga/dfl.c | 2 +- drivers/fsi/fsi-core.c | 3 + drivers/fsi/fsi-master-ast-cf.c | 2 + drivers/fsi/fsi-occ.c | 18 +- drivers/gpio/gpio-rockchip.c | 7 + drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 9 +- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 3 +- drivers/gpu/drm/amd/amdgpu/soc21.c | 5 + .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 45 ++- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c | 3 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 83 ++--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 8 +- .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 11 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 16 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 6 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 6 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 35 +-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 3 +- .../display/dc/dcn31/dcn31_hpo_dp_stream_encoder.c | 6 +- .../drm/amd/display/dc/dcn314/dcn314_resource.c | 4 +- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 + .../gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c | 6 +- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 1 + .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2 + .../gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 8 +- drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 4 +- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 21 +- drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 2 + drivers/gpu/drm/bridge/adv7511/adv7511.h | 5 +- drivers/gpu/drm/bridge/adv7511/adv7511_cec.c | 4 +- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 5 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 1 + drivers/gpu/drm/bridge/ite-it6505.c | 5 +- drivers/gpu/drm/bridge/lontium-lt9611.c | 3 +- .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 4 +- drivers/gpu/drm/bridge/parade-ps8640.c | 4 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 13 +- drivers/gpu/drm/bridge/tc358767.c | 5 +- drivers/gpu/drm/display/drm_dp_helper.c | 9 - drivers/gpu/drm/display/drm_dp_mst_topology.c | 6 +- drivers/gpu/drm/drm_bridge.c | 4 +- drivers/gpu/drm/drm_ioctl.c | 8 +- drivers/gpu/drm/drm_mipi_dsi.c | 1 + drivers/gpu/drm/drm_panel_orientation_quirks.c | 18 ++ drivers/gpu/drm/i915/display/intel_cdclk.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 +- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 16 +- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 58 ++-- drivers/gpu/drm/i915/gt/intel_context.c | 5 +- drivers/gpu/drm/i915/gt/intel_context.h | 3 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 8 +- drivers/gpu/drm/i915/gt/intel_gtt.c | 3 + drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 26 +- drivers/gpu/drm/i915/intel_pm.c | 16 +- drivers/gpu/drm/meson/meson_drv.c | 14 +- drivers/gpu/drm/meson/meson_drv.h | 7 + drivers/gpu/drm/meson/meson_encoder_cvbs.c | 13 + drivers/gpu/drm/meson/meson_encoder_cvbs.h | 1 + drivers/gpu/drm/meson/meson_encoder_hdmi.c | 13 + drivers/gpu/drm/meson/meson_encoder_hdmi.h | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 19 +- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 29 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 9 +- drivers/gpu/drm/msm/dp/dp_catalog.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 13 +- drivers/gpu/drm/msm/msm_drv.h | 2 + drivers/gpu/drm/msm/msm_io_utils.c | 22 ++ drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +- drivers/gpu/drm/nouveau/nouveau_prime.c | 1 - drivers/gpu/drm/omapdrm/dss/dss.c | 3 + drivers/gpu/drm/panel/Kconfig | 4 +- drivers/gpu/drm/pl111/pl111_versatile.c | 1 + drivers/gpu/drm/tests/drm_format_helper_test.c | 23 +- drivers/gpu/drm/tiny/bochs.c | 2 + drivers/gpu/drm/udl/udl_modeset.c | 3 - drivers/gpu/drm/vc4/vc4_drv.c | 14 +- drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_vec.c | 4 +- drivers/gpu/drm/virtio/virtgpu_display.c | 2 + drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 +- drivers/gpu/drm/virtio/virtgpu_object.c | 3 + drivers/gpu/drm/virtio/virtgpu_plane.c | 6 +- drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 1 + drivers/hid/Kconfig | 6 + drivers/hid/Makefile | 1 + drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 2 + drivers/hid/hid-ids.h | 3 + drivers/hid/hid-multitouch.c | 8 +- drivers/hid/hid-nintendo.c | 55 ++-- drivers/hid/hid-roccat.c | 4 + drivers/hid/hid-topre.c | 49 +++ drivers/hid/hid-uclogic-core.c | 1 + drivers/hid/hid-uclogic-rdesc.c | 2 +- drivers/hsi/clients/ssi_protocol.c | 1 + drivers/hsi/controllers/omap_ssi_core.c | 1 + drivers/hsi/controllers/omap_ssi_port.c | 8 +- drivers/hwmon/gsc-hwmon.c | 1 + drivers/hwmon/occ/p9_sbe.c | 17 +- drivers/hwmon/pmbus/mp2888.c | 13 +- drivers/hwmon/sht4x.c | 2 +- drivers/i2c/busses/i2c-designware-core.h | 7 +- drivers/i2c/busses/i2c-designware-master.c | 13 + drivers/i2c/busses/i2c-designware-pcidrv.c | 30 +- drivers/i2c/busses/i2c-mlxbf.c | 44 ++- drivers/iio/adc/ad7923.c | 4 +- drivers/iio/adc/at91-sama5d2_adc.c | 28 +- drivers/iio/adc/ltc2497.c | 13 + drivers/iio/dac/ad5593r.c | 46 +-- drivers/iio/industrialio-core.c | 5 + drivers/iio/inkern.c | 8 +- drivers/iio/magnetometer/yamaha-yas530.c | 2 +- drivers/iio/pressure/dps310.c | 262 ++++++++++------ drivers/infiniband/core/cm.c | 14 +- drivers/infiniband/core/uverbs_cmd.c | 5 +- drivers/infiniband/core/verbs.c | 2 + drivers/infiniband/hw/hns/hns_roce_mr.c | 1 - drivers/infiniband/hw/irdma/defs.h | 1 + drivers/infiniband/hw/irdma/hw.c | 51 +-- drivers/infiniband/hw/irdma/type.h | 1 + drivers/infiniband/hw/irdma/user.h | 1 + drivers/infiniband/hw/irdma/utils.c | 3 + drivers/infiniband/hw/irdma/verbs.c | 69 ++++- drivers/infiniband/hw/mlx4/mr.c | 1 - drivers/infiniband/hw/mlx5/main.c | 3 + drivers/infiniband/hw/mlx5/odp.c | 3 +- drivers/infiniband/sw/rxe/rxe_loc.h | 6 +- drivers/infiniband/sw/rxe/rxe_mr.c | 11 +- drivers/infiniband/sw/rxe/rxe_qp.c | 10 +- drivers/infiniband/sw/rxe/rxe_queue.c | 12 +- drivers/infiniband/sw/rxe/rxe_resp.c | 10 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 12 +- drivers/infiniband/sw/siw/siw.h | 1 + drivers/infiniband/sw/siw/siw_qp.c | 2 +- drivers/infiniband/sw/siw/siw_qp_rx.c | 27 +- drivers/infiniband/sw/siw/siw_verbs.c | 3 + drivers/infiniband/ulp/srp/ib_srp.c | 4 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 21 ++ drivers/iommu/omap-iommu-debug.c | 6 +- drivers/isdn/mISDN/l1oip.h | 1 + drivers/isdn/mISDN/l1oip_core.c | 13 +- drivers/leds/flash/leds-lm3601x.c | 2 - drivers/mailbox/bcm-flexrm-mailbox.c | 8 +- drivers/mailbox/imx-mailbox.c | 10 +- drivers/mailbox/mailbox-mpfs.c | 25 +- drivers/md/bcache/writeback.c | 73 +++-- drivers/md/dm-verity-loadpin.c | 8 + drivers/md/dm-verity-target.c | 16 + drivers/md/dm-verity.h | 1 + drivers/md/md.c | 1 - drivers/md/raid0.c | 2 +- drivers/md/raid5.c | 15 +- drivers/media/pci/cx88/cx88-vbi.c | 9 +- drivers/media/pci/cx88/cx88-video.c | 43 +-- drivers/media/platform/amlogic/meson-ge2d/ge2d.c | 1 - drivers/media/platform/amphion/vdec.c | 16 +- drivers/media/platform/amphion/venc.c | 2 +- drivers/media/platform/amphion/vpu.h | 1 - drivers/media/platform/amphion/vpu_core.c | 84 ++--- drivers/media/platform/amphion/vpu_core.h | 1 + drivers/media/platform/amphion/vpu_dbg.c | 9 +- drivers/media/platform/amphion/vpu_malone.c | 2 +- .../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 1 - .../platform/mediatek/vcodec/mtk_vcodec_enc.c | 3 +- .../media/platform/samsung/exynos4-is/fimc-is.c | 1 + drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 3 +- drivers/media/platform/xilinx/xilinx-vipp.c | 9 +- drivers/media/usb/airspy/airspy.c | 4 + drivers/media/usb/uvc/uvc_ctrl.c | 83 ++--- drivers/media/usb/uvc/uvc_driver.c | 8 +- drivers/memory/of_memory.c | 2 + drivers/memory/pl353-smc.c | 1 + drivers/mfd/da9062-core.c | 1 + drivers/mfd/fsl-imx25-tsadc.c | 34 +- drivers/mfd/intel_soc_pmic_core.c | 1 + drivers/mfd/lp8788-irq.c | 3 + drivers/mfd/lp8788.c | 12 +- drivers/mfd/sm501.c | 7 +- drivers/misc/ocxl/file.c | 2 + drivers/mmc/core/block.c | 6 +- drivers/mmc/core/card.h | 6 + drivers/mmc/core/quirks.h | 6 + drivers/mmc/host/au1xmmc.c | 3 +- drivers/mmc/host/renesas_sdhi_core.c | 21 +- drivers/mmc/host/sdhci-msm.c | 1 + drivers/mmc/host/sdhci-sprd.c | 2 +- drivers/mmc/host/sdhci-tegra.c | 2 +- drivers/mmc/host/wmt-sdmmc.c | 5 +- drivers/mtd/devices/docg3.c | 7 +- drivers/mtd/nand/raw/atmel/nand-controller.c | 1 + drivers/mtd/nand/raw/fsl_elbc_nand.c | 28 +- drivers/mtd/nand/raw/intel-nand-controller.c | 12 +- drivers/mtd/nand/raw/meson_nand.c | 4 +- drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 2 + drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 3 +- drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 2 +- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 79 +++++ drivers/net/ethernet/atheros/alx/main.c | 5 + drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 10 +- drivers/net/ethernet/engleder/tsnep_hw.h | 3 +- drivers/net/ethernet/faraday/ftmac100.h | 12 +- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 177 ++++++++--- drivers/net/ethernet/intel/ice/ice_ethtool.c | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | 10 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 13 +- .../net/ethernet/marvell/prestera/prestera_acl.c | 8 +- .../net/ethernet/marvell/prestera/prestera_acl.h | 4 +- .../ethernet/marvell/prestera/prestera_flower.c | 6 +- .../net/ethernet/marvell/prestera/prestera_main.c | 36 +-- drivers/net/ethernet/micrel/ks8851_spi.c | 5 +- drivers/net/ethernet/microchip/lan743x_ptp.c | 7 + drivers/net/ethernet/sunplus/spl2sw_driver.c | 2 +- drivers/net/ethernet/ti/Kconfig | 1 + drivers/net/ethernet/ti/davinci_mdio.c | 242 ++++++++++++++- drivers/net/ethernet/xilinx/xilinx_axienet.h | 12 + drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 37 ++- drivers/net/hyperv/hyperv_net.h | 3 +- drivers/net/hyperv/netvsc.c | 4 + drivers/net/hyperv/netvsc_drv.c | 19 ++ drivers/net/thunderbolt.c | 28 +- drivers/net/usb/r8152.c | 4 +- drivers/net/wireless/ath/ath10k/core.c | 16 + drivers/net/wireless/ath/ath10k/htc.c | 11 +- drivers/net/wireless/ath/ath10k/hw.h | 2 + drivers/net/wireless/ath/ath10k/mac.c | 54 ++-- drivers/net/wireless/ath/ath11k/ahb.c | 58 +++- drivers/net/wireless/ath/ath11k/core.c | 2 + drivers/net/wireless/ath/ath11k/dp_rx.c | 3 +- drivers/net/wireless/ath/ath11k/mac.c | 25 +- drivers/net/wireless/ath/ath11k/mhi.c | 17 +- drivers/net/wireless/ath/ath11k/peer.c | 30 +- drivers/net/wireless/ath/ath11k/qmi.c | 38 ++- drivers/net/wireless/ath/ath11k/qmi.h | 10 +- drivers/net/wireless/ath/ath11k/wmi.c | 9 +- drivers/net/wireless/ath/ath11k/wmi.h | 2 +- drivers/net/wireless/ath/ath9k/htc_hst.c | 43 ++- drivers/net/wireless/ath/ath9k/rng.c | 3 +- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 3 +- .../net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 12 +- drivers/net/wireless/mac80211_hwsim.c | 7 +- drivers/net/wireless/marvell/mwifiex/init.c | 9 +- drivers/net/wireless/marvell/mwifiex/main.h | 3 +- drivers/net/wireless/marvell/mwifiex/sta_event.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 + .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 10 +- .../net/wireless/mediatek/mt76/mt7915/debugfs.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 12 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 10 +- .../net/wireless/mediatek/mt76/mt7921/acpi_sar.c | 5 +- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 7 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 26 +- drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 15 +- drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 13 +- drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 28 +- drivers/net/wireless/mediatek/mt76/sdio.c | 8 +- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 34 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 6 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 96 ++++-- .../net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 9 +- drivers/net/wireless/realtek/rtw88/main.c | 8 +- drivers/net/wireless/realtek/rtw88/phy.c | 21 +- drivers/net/wireless/realtek/rtw89/core.c | 1 + drivers/net/wireless/realtek/rtw89/fw.c | 12 +- drivers/net/wireless/realtek/rtw89/pci.c | 5 +- drivers/net/wireless/realtek/rtw89/ser.c | 3 + drivers/net/wireless/silabs/wfx/main.c | 2 +- drivers/net/wireless/st/cw1200/queue.c | 18 +- drivers/net/wwan/iosm/iosm_ipc_wwan.c | 5 +- drivers/nvme/host/core.c | 20 +- drivers/nvme/host/ioctl.c | 9 +- drivers/nvme/host/multipath.c | 1 + drivers/nvme/host/nvme.h | 4 +- drivers/nvme/target/core.c | 1 + drivers/nvme/target/fabrics-cmd-auth.c | 13 +- drivers/nvme/target/fabrics-cmd.c | 6 +- drivers/nvme/target/nvmet.h | 7 +- drivers/nvme/target/passthru.c | 7 +- drivers/nvme/target/tcp.c | 11 +- drivers/nvmem/core.c | 15 +- drivers/pci/setup-res.c | 11 + drivers/perf/riscv_pmu_sbi.c | 7 +- .../phy/amlogic/phy-meson-axg-mipi-pcie-analog.c | 6 +- drivers/phy/mediatek/phy-mtk-tphy.c | 7 +- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 32 +- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 23 +- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 39 ++- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 30 +- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 64 ++-- drivers/phy/qualcomm/phy-qcom-usb-hsic.c | 6 +- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 10 +- drivers/pinctrl/pinctrl-rockchip.c | 13 + drivers/platform/chrome/chromeos_laptop.c | 24 +- drivers/platform/chrome/cros_ec.c | 8 +- drivers/platform/chrome/cros_ec_chardev.c | 3 + drivers/platform/chrome/cros_ec_proto.c | 32 ++ drivers/platform/chrome/cros_ec_typec.c | 5 +- drivers/platform/x86/hp-wmi.c | 11 +- drivers/platform/x86/msi-laptop.c | 14 +- drivers/platform/x86/pmc_atom.c | 2 +- drivers/power/supply/adp5061.c | 6 +- drivers/powercap/intel_rapl_common.c | 4 +- drivers/regulator/core.c | 2 +- drivers/regulator/qcom_rpm-regulator.c | 24 +- drivers/remoteproc/remoteproc_core.c | 5 +- drivers/rpmsg/rpmsg_char.c | 4 +- drivers/scsi/3w-9xxx.c | 2 +- drivers/scsi/iscsi_tcp.c | 73 +++-- drivers/scsi/iscsi_tcp.h | 3 + drivers/scsi/libsas/sas_expander.c | 2 +- drivers/scsi/lpfc/lpfc.h | 14 +- drivers/scsi/lpfc/lpfc_crtn.h | 8 + drivers/scsi/lpfc/lpfc_ct.c | 7 +- drivers/scsi/lpfc/lpfc_debugfs.c | 61 +--- drivers/scsi/lpfc/lpfc_debugfs.h | 2 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +- drivers/scsi/lpfc/lpfc_init.c | 332 ++++++++++---------- drivers/scsi/lpfc/lpfc_mem.c | 9 +- drivers/scsi/lpfc/lpfc_sli.c | 193 +++++++++++- drivers/scsi/lpfc/lpfc_sli4.h | 4 +- drivers/scsi/lpfc/lpfc_vmid.c | 4 +- drivers/scsi/pm8001/pm8001_hwi.c | 4 + drivers/scsi/qedf/qedf_main.c | 21 ++ drivers/slimbus/qcom-ngd-ctrl.c | 22 +- drivers/soc/qcom/smem_state.c | 3 +- drivers/soc/qcom/smsm.c | 20 +- drivers/soc/tegra/Kconfig | 1 - drivers/soc/tegra/fuse/fuse-tegra.c | 1 + drivers/soundwire/cadence_master.c | 9 +- drivers/soundwire/intel.c | 1 - drivers/spi/spi-cadence-quadspi.c | 3 +- drivers/spi/spi-dw-bt1.c | 4 +- drivers/spi/spi-meson-spicc.c | 6 +- drivers/spi/spi-mt7621.c | 8 +- drivers/spi/spi-omap-100k.c | 1 + drivers/spi/spi-qup.c | 21 +- drivers/spi/spi-s3c64xx.c | 9 + drivers/spi/spi.c | 2 + drivers/spmi/spmi-pmic-arb.c | 13 +- drivers/staging/greybus/audio_helper.c | 11 - drivers/staging/media/meson/vdec/vdec_hevc.c | 6 +- drivers/staging/media/sunxi/cedrus/cedrus.c | 4 +- drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 4 +- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 5 +- drivers/staging/rtl8723bs/core/rtw_cmd.c | 16 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 60 ++-- drivers/staging/vt6655/device_main.c | 8 +- drivers/thermal/cpufreq_cooling.c | 10 +- drivers/thermal/intel/intel_powerclamp.c | 6 +- drivers/thermal/qcom/tsens-v0_1.c | 2 +- drivers/thunderbolt/nhi.c | 49 ++- drivers/thunderbolt/switch.c | 24 ++ drivers/thunderbolt/tb.h | 1 + drivers/thunderbolt/tb_regs.h | 1 + drivers/thunderbolt/usb4.c | 20 ++ drivers/tty/serial/8250/8250_core.c | 16 +- drivers/tty/serial/8250/8250_omap.c | 3 + drivers/tty/serial/8250/8250_pci.c | 14 +- drivers/tty/serial/8250/8250_port.c | 30 +- drivers/tty/serial/ar933x_uart.c | 7 + drivers/tty/serial/cpm_uart/cpm_uart_core.c | 22 +- drivers/tty/serial/fsl_lpuart.c | 12 +- drivers/tty/serial/imx.c | 8 +- drivers/tty/serial/jsm/jsm_driver.c | 3 +- drivers/tty/serial/serial_core.c | 36 ++- drivers/tty/serial/stm32-usart.c | 100 +++--- drivers/tty/serial/xilinx_uartps.c | 14 +- drivers/usb/common/debug.c | 96 ++++-- drivers/usb/common/usb-conn-gpio.c | 6 +- drivers/usb/core/quirks.c | 4 + drivers/usb/dwc3/core.c | 83 +++-- drivers/usb/dwc3/core.h | 6 + drivers/usb/gadget/function/f_fs.c | 4 +- drivers/usb/gadget/function/f_printer.c | 12 +- drivers/usb/gadget/function/f_uvc.c | 6 +- drivers/usb/gadget/function/uvc.h | 1 + drivers/usb/gadget/function/uvc_v4l2.c | 2 +- drivers/usb/gadget/function/uvc_video.c | 9 +- drivers/usb/host/xhci-dbgcap.c | 2 +- drivers/usb/host/xhci-mem.c | 7 +- drivers/usb/host/xhci-plat.c | 18 +- drivers/usb/host/xhci.c | 3 +- drivers/usb/host/xhci.h | 1 + drivers/usb/misc/idmouse.c | 8 +- drivers/usb/mtu3/mtu3_core.c | 2 - drivers/usb/mtu3/mtu3_plat.c | 2 + drivers/usb/musb/musb_gadget.c | 3 + drivers/usb/storage/unusual_devs.h | 6 - drivers/usb/typec/anx7411.c | 4 +- drivers/usb/typec/ucsi/ucsi.c | 8 +- drivers/vhost/vsock.c | 2 +- drivers/video/aperture.c | 14 + drivers/video/fbdev/core/fbmem.c | 12 - drivers/video/fbdev/smscufx.c | 14 +- drivers/video/fbdev/stifb.c | 2 +- drivers/xen/gntdev-common.h | 3 +- drivers/xen/gntdev.c | 80 ++--- fs/btrfs/block-group.c | 11 +- fs/btrfs/extent-tree.c | 3 + fs/btrfs/file.c | 59 +++- fs/btrfs/free-space-cache.c | 59 ++-- fs/btrfs/qgroup.c | 15 + fs/btrfs/scrub.c | 69 +++-- fs/btrfs/super.c | 20 +- fs/cifs/cifsproto.h | 2 +- fs/cifs/connect.c | 2 +- fs/cifs/file.c | 9 + fs/cifs/smb2ops.c | 23 +- fs/cifs/smb2pdu.c | 7 +- fs/cifs/smb2transport.c | 10 +- fs/dlm/ast.c | 6 +- fs/dlm/lock.c | 20 +- fs/dlm/lowcomms.c | 4 + fs/erofs/inode.c | 2 +- fs/erofs/super.c | 2 +- fs/eventfd.c | 10 +- fs/ext2/super.c | 22 +- fs/ext4/fast_commit.c | 40 ++- fs/ext4/file.c | 6 + fs/ext4/inode.c | 17 +- fs/ext4/ioctl.c | 4 + fs/ext4/namei.c | 17 +- fs/ext4/resize.c | 2 +- fs/ext4/super.c | 47 +-- fs/ext4/xattr.c | 1 + fs/f2fs/checkpoint.c | 47 ++- fs/f2fs/data.c | 4 +- fs/f2fs/extent_cache.c | 3 +- fs/f2fs/f2fs.h | 16 +- fs/f2fs/gc.c | 22 +- fs/f2fs/recovery.c | 23 +- fs/f2fs/segment.c | 2 +- fs/f2fs/super.c | 15 +- fs/file_table.c | 7 +- fs/fs-writeback.c | 37 ++- fs/internal.h | 10 + fs/iomap/buffered-io.c | 2 +- fs/jbd2/commit.c | 2 +- fs/jbd2/journal.c | 10 +- fs/jbd2/recovery.c | 1 + fs/jbd2/transaction.c | 6 +- fs/ksmbd/server.c | 4 +- fs/ksmbd/smb2pdu.c | 27 +- fs/ksmbd/smb_common.c | 6 +- fs/mbcache.c | 17 +- fs/nfsd/nfs3proc.c | 11 +- fs/nfsd/nfs4proc.c | 19 +- fs/nfsd/nfs4recover.c | 4 +- fs/nfsd/nfs4state.c | 5 + fs/nfsd/nfs4xdr.c | 14 +- fs/nfsd/nfsproc.c | 6 +- fs/nfsd/xdr4.h | 3 +- fs/ntfs3/inode.c | 2 - fs/ntfs3/xattr.c | 102 +----- fs/open.c | 11 +- fs/posix_acl.c | 25 +- fs/quota/quota_tree.c | 38 +++ fs/userfaultfd.c | 4 +- fs/xfs/xfs_super.c | 10 +- include/dt-bindings/clock/samsung,exynosautov9.h | 56 ++-- include/linux/ata.h | 39 +-- include/linux/bio.h | 2 +- include/linux/blk-mq.h | 11 +- include/linux/blk_types.h | 2 +- include/linux/bpf.h | 3 +- include/linux/bpf_verifier.h | 11 + include/linux/dynamic_debug.h | 11 +- include/linux/eventfd.h | 2 +- include/linux/export-internal.h | 6 +- include/linux/filter.h | 5 + include/linux/fortify-string.h | 3 +- include/linux/fs.h | 9 +- include/linux/hugetlb.h | 8 +- include/linux/hw_random.h | 3 + include/linux/iio/iio-opaque.h | 2 + include/linux/iova.h | 2 +- include/linux/mmc/card.h | 1 + include/linux/once.h | 28 ++ include/linux/ring_buffer.h | 2 +- include/linux/sched.h | 2 +- include/linux/serial_8250.h | 1 + include/linux/serial_core.h | 4 +- include/linux/skbuff.h | 2 + include/linux/sunrpc/svc.h | 19 +- include/linux/tcp.h | 2 +- include/linux/trace.h | 36 ++- include/linux/trace_events.h | 1 + include/net/ieee802154_netdev.h | 12 +- include/net/tcp.h | 5 +- include/uapi/linux/bpf.h | 7 +- include/uapi/rdma/mlx5-abi.h | 1 + io_uring/fdinfo.c | 32 +- io_uring/io_uring.c | 29 +- io_uring/io_uring.h | 12 +- io_uring/net.c | 107 ++++--- io_uring/net.h | 9 +- io_uring/opdef.c | 17 +- io_uring/opdef.h | 1 + io_uring/rsrc.c | 1 + io_uring/rw.c | 47 ++- io_uring/rw.h | 1 + ipc/mqueue.c | 1 + kernel/auditsc.c | 4 +- kernel/bpf/bpf_local_storage.c | 4 +- kernel/bpf/bpf_lsm.c | 6 + kernel/bpf/bpf_task_storage.c | 8 +- kernel/bpf/btf.c | 2 +- kernel/bpf/cgroup.c | 28 +- kernel/bpf/core.c | 9 +- kernel/bpf/dispatcher.c | 27 +- kernel/bpf/hashtab.c | 30 +- kernel/bpf/helpers.c | 2 + kernel/bpf/syscall.c | 2 + kernel/bpf/trampoline.c | 8 +- kernel/bpf/verifier.c | 146 +++++---- kernel/cgroup/cgroup.c | 6 +- kernel/cgroup/cpuset.c | 18 +- kernel/livepatch/transition.c | 18 +- kernel/module/tracking.c | 3 + kernel/rcu/tasks.h | 5 +- kernel/rcu/tree.c | 17 +- kernel/rcu/tree_plugin.h | 3 +- kernel/trace/bpf_trace.c | 20 +- kernel/trace/ftrace.c | 34 +- kernel/trace/kprobe_event_gen_test.c | 49 ++- kernel/trace/ring_buffer.c | 87 +++++- kernel/trace/trace.c | 76 ++++- kernel/trace/trace_eprobe.c | 63 +--- kernel/trace/trace_events_synth.c | 23 +- kernel/trace/trace_kprobe.c | 60 +--- kernel/trace/trace_osnoise.c | 3 +- kernel/trace/trace_probe_kernel.h | 115 +++++++ lib/Kconfig.debug | 10 +- lib/dynamic_debug.c | 45 +-- lib/once.c | 30 ++ lib/sbitmap.c | 69 +++-- mm/damon/vaddr.c | 10 + mm/gup.c | 14 +- mm/hugetlb.c | 68 ++-- mm/memory.c | 2 + mm/mmap.c | 5 +- mm/mprotect.c | 2 + net/bluetooth/hci_core.c | 38 ++- net/bluetooth/hci_event.c | 14 + net/bluetooth/hci_sock.c | 3 - net/bluetooth/hci_sync.c | 1 + net/bluetooth/hci_sysfs.c | 3 + net/bluetooth/l2cap_core.c | 17 +- net/bluetooth/mgmt.c | 4 +- net/bluetooth/rfcomm/sock.c | 3 + net/can/bcm.c | 7 +- net/core/flow_dissector.c | 4 +- net/core/skmsg.c | 12 +- net/core/stream.c | 3 +- net/ieee802154/socket.c | 4 + net/ipv4/datagram.c | 2 + net/ipv4/esp4_offload.c | 5 +- net/ipv4/inet_hashtables.c | 4 +- net/ipv4/netfilter/nft_fib_ipv4.c | 3 + net/ipv4/tcp.c | 16 +- net/ipv4/tcp_output.c | 19 +- net/ipv6/esp6_offload.c | 5 +- net/ipv6/netfilter/nft_fib_ipv6.c | 6 +- net/mac80211/cfg.c | 17 +- net/mac80211/mlme.c | 20 +- net/mac80211/sta_info.c | 4 +- net/netfilter/nf_conntrack_core.c | 18 +- net/openvswitch/datapath.c | 18 +- net/rds/tcp.c | 2 +- net/sched/cls_u32.c | 6 +- net/sctp/auth.c | 18 +- net/unix/af_unix.c | 13 +- net/unix/garbage.c | 20 ++ net/vmw_vsock/virtio_transport_common.c | 2 +- net/wireless/reg.c | 4 + net/xdp/xsk.c | 22 +- net/xdp/xsk_queue.h | 22 +- net/xfrm/xfrm_input.c | 18 +- net/xfrm/xfrm_ipcomp.c | 1 + scripts/Kbuild.include | 23 +- scripts/package/mkspec | 4 +- scripts/selinux/install_policy.sh | 2 +- security/integrity/ima/ima_appraise.c | 12 +- security/loadpin/Kconfig | 2 +- sound/core/pcm_dmaengine.c | 8 +- sound/core/rawmidi.c | 2 - sound/core/sound_oss.c | 13 +- sound/hda/intel-dsp-config.c | 5 + sound/pci/hda/hda_beep.c | 15 +- sound/pci/hda/hda_beep.h | 1 + sound/pci/hda/hda_codec.c | 41 ++- sound/pci/hda/patch_hdmi.c | 36 +-- sound/pci/hda/patch_realtek.c | 11 +- sound/pci/hda/patch_sigmatel.c | 25 +- sound/soc/amd/acp/acp-pci.c | 1 + sound/soc/amd/yc/acp6x-mach.c | 14 + sound/soc/codecs/da7219.c | 5 +- sound/soc/codecs/lpass-tx-macro.c | 13 +- sound/soc/codecs/mt6359-accdet.c | 6 +- sound/soc/codecs/mt6660.c | 8 +- sound/soc/codecs/tas2764.c | 78 ++--- sound/soc/codecs/wcd-mbhc-v2.c | 10 +- sound/soc/codecs/wcd9335.c | 2 +- sound/soc/codecs/wcd934x.c | 2 +- sound/soc/codecs/wm5102.c | 6 +- sound/soc/codecs/wm5110.c | 6 +- sound/soc/codecs/wm8997.c | 6 +- sound/soc/codecs/wm_adsp.c | 4 +- sound/soc/fsl/eukrea-tlv320.c | 8 +- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 6 + sound/soc/rockchip/rockchip_i2s.c | 41 +-- sound/soc/sh/rcar/ctu.c | 6 +- sound/soc/sh/rcar/dvc.c | 6 +- sound/soc/sh/rcar/mix.c | 6 +- sound/soc/sh/rcar/src.c | 5 +- sound/soc/sh/rcar/ssi.c | 4 +- sound/soc/soc-pcm.c | 2 +- sound/soc/sof/intel/hda.c | 11 + sound/soc/sof/ipc3-topology.c | 7 + sound/soc/sof/ipc4-topology.c | 9 +- sound/soc/sof/mediatek/mt8195/mt8195.c | 1 + sound/soc/sof/sof-pci-dev.c | 2 +- sound/soc/sof/sof-priv.h | 4 + sound/soc/stm/stm32_adfsdm.c | 8 +- sound/soc/stm/stm32_i2s.c | 4 +- sound/soc/stm/stm32_spdifrx.c | 4 +- sound/soc/sunxi/sun4i-codec.c | 3 + sound/usb/card.c | 32 +- sound/usb/endpoint.c | 17 +- sound/usb/quirks-table.h | 76 +++++ sound/usb/quirks.c | 344 ++++++++++++++++++--- sound/usb/quirks.h | 2 - sound/usb/usbaudio.h | 1 + tools/bpf/bpftool/btf_dumper.c | 2 +- tools/bpf/bpftool/cgroup.c | 54 +++- tools/bpf/bpftool/main.c | 10 + tools/include/uapi/linux/bpf.h | 7 +- tools/lib/bpf/bpf_tracing.h | 14 +- tools/lib/bpf/btf.h | 25 +- tools/lib/bpf/btf_dump.c | 2 +- tools/lib/bpf/libbpf.c | 21 +- tools/lib/bpf/libbpf.h | 4 +- tools/lib/bpf/libbpf_probes.c | 2 +- tools/lib/bpf/nlattr.c | 2 +- tools/lib/bpf/usdt.bpf.h | 4 +- tools/objtool/elf.c | 7 +- tools/perf/arch/x86/util/intel-pt.c | 2 +- tools/perf/util/intel-pt.c | 9 +- tools/perf/util/parse-events.c | 3 + tools/perf/util/pmu.c | 17 + tools/perf/util/pmu.h | 2 + tools/perf/util/pmu.l | 2 - tools/perf/util/pmu.y | 15 +- tools/power/x86/turbostat/turbostat.c | 1 - .../selftests/arm64/signal/testcases/testcases.c | 2 +- .../selftests/bpf/map_tests/array_map_batch_ops.c | 2 + .../selftests/bpf/map_tests/htab_map_batch_ops.c | 2 + .../bpf/map_tests/lpm_trie_map_batch_ops.c | 2 + .../testing/selftests/bpf/prog_tests/cgroup_link.c | 11 +- tools/testing/selftests/bpf/progs/kprobe_multi.c | 4 +- tools/testing/selftests/bpf/test_maps.c | 24 +- tools/testing/selftests/bpf/xsk.c | 6 +- tools/testing/selftests/bpf/xskxceiver.c | 4 + tools/testing/selftests/cpu-hotplug/config | 1 - .../selftests/cpu-hotplug/cpu-on-off-test.sh | 138 +++------ tools/testing/selftests/net/fcnal-test.sh | 30 ++ tools/testing/selftests/net/nettest.c | 16 +- tools/testing/selftests/tpm2/tpm2.py | 4 + 908 files changed, 8789 insertions(+), 4121 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 38/862 mmc: sdhci-tegra: Use actual clock rate for SW tuning correction
From: Prathamesh Shete <[email protected]>
commit b78870e7f41534cc719c295d1f8809aca93aeeab upstream.
Ensure tegra_host member "curr_clk_rate" holds the actual clock rate instead of requested clock rate for proper use during tuning correction algorithm. Actual clk rate may not be the same as the requested clk frequency depending on the parent clock source set. Tuning correction algorithm depends on certain parameters which are sensitive to current clk rate. If the host clk is selected instead of the actual clock rate, tuning correction algorithm may end up applying invalid correction, which could result in errors
--- drivers/mmc/host/sdhci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-tegra.c +1 -1
@@ -773,7 +773,7 @@ static void tegra_sdhci_set_clock(structdev_err (dev,"failed to set clk rate to %luHz: %d\n" , host_clk, err); - tegra_host->curr_clk_rate = host_clk; + tegra_host->curr_clk_rate =clk_get_rate (pltfm_host->clk);if (tegra_host->ddr_signaling) host->max_clk = host_clk;else
Greg Kroah-Hartman
maintainerPATCH 26/862 iio: adc: ad7923: fix channel readings for some variants
In reply to Greg Kroah-HartmanFrom: Nuno Sá <[email protected]>
commit f4f43f01cff2f29779343ade755191afd2581c77 upstream.
Some of the supported devices have 4 or 2 LSB trailing bits that should not be taken into account. Hence we need to shift these bits out which fits perfectly on the scan type shift property. This change fixes both raw and buffered reads.
--- drivers/iio/adc/ad7923.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/adc/ad7923.c +3 -1
@@ -93,6 +93,7 @@ enum ad7923_id { .sign = 'u', \ .realbits = (bits), \ .storagebits = 16, \ + .shift = 12 - (bits), \ .endianness = IIO_BE, \ }, \ }
@@ -268,7 +269,8 @@ static int ad7923_read_raw(struct iio_dereturn ret;if (chan->address ==EXTRACT (ret,12 ,4 )) - *val =EXTRACT (ret,0 ,12 ); + *val =EXTRACT (ret, chan->scan_type.shift, + chan->scan_type.realbits);else return -EIO ;
Greg Kroah-Hartman
maintainerPATCH 23/862 cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message
In reply to Greg Kroah-HartmanFrom: Zhang Xiaoxu <[email protected]>
commit e98ecc6e94f4e6d21c06660b0f336df02836694f upstream.
Commit d5c7076b772a ("smb3: add smb3.1.1 to default dialect list") extend the dialects from 3 to 4, but forget to decrease the extended length when specific the dialect, then the message length is larger than expected.
This maybe leak some info through network because not initialize the message body.
After apply this patch, the VALIDATE_NEGOTIATE_INFO message length is reduced from 28 bytes to 26 bytes.
--- fs/cifs/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/cifs/smb2pdu.c +2 -2
@@ -1169,9 +1169,9 @@ int smb3_validate_negotiate(const unsign pneg_inbuf->Dialects[0 ] =cpu_to_le16 (server->vals->protocol_id); pneg_inbuf->DialectCount =cpu_to_le16 (1 ); -/* structure is big enough for 3 dialects, sending only 1 */ +/* structure is big enough for 4 dialects, sending only 1 */ inbuflen =sizeof (*pneg_inbuf) - -sizeof (pneg_inbuf->Dialects[0 ]) *2 ; +sizeof (pneg_inbuf->Dialects[0 ]) *3 ; } rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID,
Greg Kroah-Hartman
maintainerPATCH 3/862 ALSA: usb-audio: Fix potential memory leaks
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 6382da0828995af87aa8b8bef28cc61aceb4aff3 upstream.
When the driver hits -ENOMEM at allocating a URB or a buffer, it aborts and goes to the error path that releases the all previously allocated resources. However, when -ENOMEM hits at the middle of the sync EP URB allocation loop, the partially allocated URBs might be left without released, because ep->nurbs is still zero at that point.
Fix it by setting ep->nurbs at first, so that the error handler loops over the full URB list.
--- sound/usb/endpoint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/usb/endpoint.c +1 -2
@@ -1261,6 +1261,7 @@ static int sync_ep_set_params(struct sndif (!ep->syncbuf)return -ENOMEM ; + ep->nurbs =SYNC_URBS ;for (i =0 ; i <SYNC_URBS ; i++) {struct snd_urb_ctx *u = &ep->urb[i]; u->index = i;
@@ -1280,8 +1281,6 @@ static int sync_ep_set_params(struct snd u->urb->complete = snd_complete_urb; } - ep->nurbs =SYNC_URBS ; -return 0 ; out_of_memory:
Greg Kroah-Hartman
maintainerPATCH 24/862 iio: dac: ad5593r: Fix i2c read protocol requirements
In reply to Greg Kroah-HartmanFrom: Michael Hennerich <[email protected]>
commit 558a25f903b4af6361b7fbeea08a6446a0745653 upstream.
For reliable operation across the full range of supported interface rates, the AD5593R needs a STOP condition between address write, and data read (like show in the datasheet Figure 40) so in turn i2c_smbus_read_word_swapped cannot be used.
While at it, a simple helper was added to make the code simpler.
--- drivers/iio/dac/ad5593r.c | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-)
drivers/iio/dac/ad5593r.c +27 -19
@@ -13,6 +13,8 @@#include <linux/module.h> #include <linux/mod_devicetable.h> +#include <asm/unaligned.h> +#define AD5593R_MODE_CONF (0 << 4)#define AD5593R_MODE_DAC_WRITE (1 << 4)#define AD5593R_MODE_ADC_READBACK (4 << 4)
@@ -20,6 +22,24 @@#define AD5593R_MODE_GPIO_READBACK (6 << 4)#define AD5593R_MODE_REG_READBACK (7 << 4) +static int ad5593r_read_word (struct i2c_client *i2c,u8 reg,u16 *value) +{ +int ret; +u8 buf[2 ]; + + ret =i2c_smbus_write_byte (i2c, reg); +if (ret <0 ) +return ret; + + ret =i2c_master_recv (i2c, buf,sizeof (buf)); +if (ret <0 ) +return ret; + + *value =get_unaligned_be16 (buf); + +return 0 ; +} +static int ad5593r_write_dac (struct ad5592r_state *st,unsigned chan,u16 value) {struct i2c_client *i2c =to_i2c_client (st->dev);
@@ -38,13 +58,7 @@ static int ad5593r_read_adc(struct ad559if (val <0 )return (int ) val; - val =i2c_smbus_read_word_swapped (i2c,AD5593R_MODE_ADC_READBACK ); -if (val <0 ) -return (int ) val; - - *value = (u16 ) val; - -return 0 ; +return ad5593r_read_word (i2c,AD5593R_MODE_ADC_READBACK , value); }static int ad5593r_reg_write (struct ad5592r_state *st,u8 reg,u16 value)
@@ -58,25 +72,19 @@ static int ad5593r_reg_write(struct ad55static int ad5593r_reg_read (struct ad5592r_state *st,u8 reg,u16 *value) {struct i2c_client *i2c =to_i2c_client (st->dev); -s32 val; - - val =i2c_smbus_read_word_swapped (i2c,AD5593R_MODE_REG_READBACK | reg); -if (val <0 ) -return (int ) val; - *value = (u16 ) val; - -return 0 ; +return ad5593r_read_word (i2c,AD5593R_MODE_REG_READBACK | reg, value); }static int ad5593r_gpio_read (struct ad5592r_state *st,u8 *value) {struct i2c_client *i2c =to_i2c_client (st->dev); -s32 val; +u16 val; +int ret; - val =i2c_smbus_read_word_swapped (i2c,AD5593R_MODE_GPIO_READBACK ); -if (val <0 ) -return (int ) val; + ret =ad5593r_read_word (i2c,AD5593R_MODE_GPIO_READBACK , &val); +if (ret) +return ret; *value = (u8 ) val;
Greg Kroah-Hartman
maintainerPATCH 27/862 iio: pressure: dps310: Refactor startup procedure
In reply to Greg Kroah-HartmanFrom: Eddie James <[email protected]>
commit c2329717bdd3fa62f8a2f3d8d85ad0bee4556bd7 upstream.
Move the startup procedure into a function, and correct a missing check on the return code for writing the PRS_CFG register.
--- drivers/iio/pressure/dps310.c | 188 ++++++++++++++++++++++-------------------- 1 file changed, 99 insertions(+), 89 deletions(-)
drivers/iio/pressure/dps310.c +99 -89
@@ -159,6 +159,102 @@ static int dps310_get_coefs(struct dps31return 0 ; } +/* +* Some versions of the chip will read temperatures in the ~60C range when +* it's actually ~20C. This is the manufacturer recommended workaround +* to correct the issue. The registers used below are undocumented. +*/ +static int dps310_temp_workaround (struct dps310_data *data) +{ +int rc; +int reg; + + rc =regmap_read (data->regmap,0x32 , ®); +if (rc) +return rc; + +/* +* If bit 1 is set then the device is okay, and the workaround does not +* need to be applied +*/ +if (reg &BIT (1 )) +return 0 ; + + rc =regmap_write (data->regmap,0x0e ,0xA5 ); +if (rc) +return rc; + + rc =regmap_write (data->regmap,0x0f ,0x96 ); +if (rc) +return rc; + + rc =regmap_write (data->regmap,0x62 ,0x02 ); +if (rc) +return rc; + + rc =regmap_write (data->regmap,0x0e ,0x00 ); +if (rc) +return rc; + +return regmap_write (data->regmap,0x0f ,0x00 ); +} + +static int dps310_startup (struct dps310_data *data) +{ +int rc; +int ready; + +/* +* Set up pressure sensor in single sample, one measurement per second +* mode +*/ + rc =regmap_write (data->regmap,DPS310_PRS_CFG ,0 ); +if (rc) +return rc; + +/* +* Set up external (MEMS) temperature sensor in single sample, one +* measurement per second mode +*/ + rc =regmap_write (data->regmap,DPS310_TMP_CFG ,DPS310_TMP_EXT ); +if (rc) +return rc; + +/* Temp and pressure shifts are disabled when PRC <= 8 */ + rc =regmap_write_bits (data->regmap,DPS310_CFG_REG , +DPS310_PRS_SHIFT_EN |DPS310_TMP_SHIFT_EN ,0 ); +if (rc) +return rc; + +/* MEAS_CFG doesn't update correctly unless first written with 0 */ + rc =regmap_write_bits (data->regmap,DPS310_MEAS_CFG , +DPS310_MEAS_CTRL_BITS ,0 ); +if (rc) +return rc; + +/* Turn on temperature and pressure measurement in the background */ + rc =regmap_write_bits (data->regmap,DPS310_MEAS_CFG , +DPS310_MEAS_CTRL_BITS ,DPS310_PRS_EN | +DPS310_TEMP_EN |DPS310_BACKGROUND ); +if (rc) +return rc; + +/* +* Calibration coefficients required for reporting temperature. +* They are available 40ms after the device has started +*/ + rc =regmap_read_poll_timeout (data->regmap,DPS310_MEAS_CFG , ready, + ready &DPS310_COEF_RDY ,10000 ,40000 ); +if (rc) +return rc; + + rc =dps310_get_coefs (data); +if (rc) +return rc; + +return dps310_temp_workaround (data); +} +static int dps310_get_pres_precision (struct dps310_data *data) {int rc;
@@ -677,52 +773,12 @@ static const struct iio_info dps310_info .write_raw = dps310_write_raw, }; -/* -* Some verions of chip will read temperatures in the ~60C range when -* its actually ~20C. This is the manufacturer recommended workaround -* to correct the issue. The registers used below are undocumented. -*/ -static int dps310_temp_workaround (struct dps310_data *data) -{ -int rc; -int reg; - - rc =regmap_read (data->regmap,0x32 , ®); -if (rc <0 ) -return rc; - -/* -* If bit 1 is set then the device is okay, and the workaround does not -* need to be applied -*/ -if (reg &BIT (1 )) -return 0 ; - - rc =regmap_write (data->regmap,0x0e ,0xA5 ); -if (rc <0 ) -return rc; - - rc =regmap_write (data->regmap,0x0f ,0x96 ); -if (rc <0 ) -return rc; - - rc =regmap_write (data->regmap,0x62 ,0x02 ); -if (rc <0 ) -return rc; - - rc =regmap_write (data->regmap,0x0e ,0x00 ); -if (rc <0 ) -return rc; - -return regmap_write (data->regmap,0x0f ,0x00 ); -} -static int dps310_probe (struct i2c_client *client,const struct i2c_device_id *id) {struct dps310_data *data;struct iio_dev *iio; -int rc, ready; +int rc; iio =devm_iio_device_alloc (&client->dev,sizeof (*data));if (!iio)
@@ -747,54 +803,8 @@ static int dps310_probe(struct i2c_clienif (rc)return rc; -/* -* Set up pressure sensor in single sample, one measurement per second -* mode -*/ - rc =regmap_write (data->regmap,DPS310_PRS_CFG ,0 ); - -/* -* Set up external (MEMS) temperature sensor in single sample, one -* measurement per second mode -*/ - rc =regmap_write (data->regmap,DPS310_TMP_CFG ,DPS310_TMP_EXT ); -if (rc <0 ) -return rc; - -/* Temp and pressure shifts are disabled when PRC <= 8 */ - rc =regmap_write_bits (data->regmap,DPS310_CFG_REG , -DPS310_PRS_SHIFT_EN |DPS310_TMP_SHIFT_EN ,0 ); -if (rc <0 ) -return rc; - -/* MEAS_CFG doesn't update correctly unless first written with 0 */ - rc =regmap_write_bits (data->regmap,DPS310_MEAS_CFG , -DPS310_MEAS_CTRL_BITS ,0 ); -if (rc <0 ) -return rc; - -/* Turn on temperature and pressure measurement in the background */ - rc =regmap_write_bits (data->regmap,DPS310_MEAS_CFG , -DPS310_MEAS_CTRL_BITS ,DPS310_PRS_EN | -DPS310_TEMP_EN |DPS310_BACKGROUND ); -if (rc <0 ) -return rc; - -/* -* Calibration coefficients required for reporting temperature. -* They are available 40ms after the device has started -*/ - rc =regmap_read_poll_timeout (data->regmap,DPS310_MEAS_CFG , ready, - ready &DPS310_COEF_RDY ,10000 ,40000 ); -if (rc <0 ) -return rc; - - rc =dps310_get_coefs (data); -if (rc <0 ) -return rc; - - rc =dps310_temp_workaround (data); -if (rc <0 ) + rc =dps310_startup (data); +if (rc)return rc; rc =devm_iio_device_register (&client->dev, iio);
Greg Kroah-Hartman
maintainerPATCH 42/862 fs: dlm: handle -EBUSY first in lock arg validation
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 44637ca41d551d409a481117b07fa209b330fca9 upstream.
During lock arg validation, first check for -EBUSY cases, then for -EINVAL cases. The -EINVAL checks look at lkb state variables which are not stable when an lkb is busy and would cause an -EBUSY result, e.g. lkb->lkb_grmode.
--- fs/dlm/lock.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
fs/dlm/lock.c +9 -9
@@ -2864,17 +2864,9 @@ static int set_unlock_args(uint32_t flagstatic int validate_lock_args (struct dlm_ls *ls,struct dlm_lkb *lkb,struct dlm_args *args) { -int rv = -EINVAL ; +int rv = -EBUSY ;if (args->flags &DLM_LKF_CONVERT ) { -if (lkb->lkb_flags &DLM_IFL_MSTCPY ) - goto out; - -if (args->flags &DLM_LKF_QUECVT && - !__quecvt_compat_matrix[lkb->lkb_grmode+1 ][args->mode+1 ]) - goto out; - - rv = -EBUSY ;if (lkb->lkb_status !=DLM_LKSTS_GRANTED ) goto out;
@@ -2884,6 +2876,14 @@ static int validate_lock_args(struct dlmif (is_overlap (lkb)) goto out; + + rv = -EINVAL ; +if (lkb->lkb_flags &DLM_IFL_MSTCPY ) + goto out; + +if (args->flags &DLM_LKF_QUECVT && + !__quecvt_compat_matrix[lkb->lkb_grmode+1 ][args->mode+1 ]) + goto out; } lkb->lkb_exflags = args->flags;
Greg Kroah-Hartman
maintainerPATCH 6/862 ALSA: hda/realtek: Correct pin configs for ASUS G533Z
In reply to Greg Kroah-HartmanFrom: Luke D. Jones <[email protected]>
commit 66ba7c88507344dee68ad1acbdb630473ab36114 upstream.
The initial fix for ASUS G533Z was based on faulty information. This fixes the pincfg to values that have been verified with no existing module options or other hacks enabled.
Enables headphone jack, and 5.1 surround.
[ corrected the indent level by tiwai ]
--- sound/pci/hda/patch_realtek.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
sound/pci/hda/patch_realtek.c +5 -3
@@ -8427,11 +8427,13 @@ static const struct hda_fixup alc269_fix [ALC285_FIXUP_ASUS_G533Z_PINS] = { .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl []) { - {0x14 ,0x90170120 }, + {0x14 ,0x90170152 },/* Speaker Surround Playback Switch */ + {0x19 ,0x03a19020 },/* Mic Boost Volume */ + {0x1a ,0x03a11c30 },/* Mic Boost Volume */ + {0x1e ,0x90170151 },/* Rear jack, IN OUT EAPD Detect */ + {0x21 ,0x03211420 }, { } }, - .chained = true, - .chain_id = ALC294_FIXUP_ASUS_G513_PINS, }, [ALC294_FIXUP_ASUS_COEF_1B] = { .type = HDA_FIXUP_VERBS,
Greg Kroah-Hartman
maintainerPATCH 39/862 mmc: sdhci-sprd: Fix minimum clock limit
In reply to Greg Kroah-HartmanFrom: Wenchao Chen <[email protected]>
commit 6e141772e6465f937458b35ddcfd0a981b6f5280 upstream.
The Spreadtrum controller supports 100KHz minimal clock rate, which means that the current value 400KHz is wrong.
Unfortunately this has also lead to fail to initialize some cards, which are allowed to require 100KHz to work. So, let's fix the problem by changing the minimal supported clock rate to 100KHz.
--- drivers/mmc/host/sdhci-sprd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-sprd.c +1 -1
@@ -309,7 +309,7 @@ static unsigned int sdhci_sprd_get_max_cstatic unsigned int sdhci_sprd_get_min_clock (struct sdhci_host *host) { -return 400000 ; +return 100000 ; } static void sdhci_sprd_set_uhs_signaling(struct sdhci_host *host,
Greg Kroah-Hartman
maintainerPATCH 40/862 i2c: designware: Fix handling of real but unexpected device interrupts
In reply to Greg Kroah-HartmanFrom: Jarkko Nikula <[email protected]>
commit 301c8f5c32c8fb79c67539bc23972dc3ef48024c upstream.
Commit c7b79a752871 ("mfd: intel-lpss: Add Intel Alder Lake PCH-S PCI IDs") caused a regression on certain Gigabyte motherboards for Intel Alder Lake-S where system crashes to NULL pointer dereference in i2c_dw_xfer_msg() when system resumes from S3 sleep state ("deep").
I was able to debug the issue on Gigabyte Z690 AORUS ELITE and made following notes:
- Issue happens when resuming from S3 but not when resuming from "s2idle"
- PCI device 00:15.0 == i2c_designware.0 is already in D0 state when system enters into pci_pm_resume_noirq() while all other i2c_designware PCI devices are in D3. Devices were runtime suspended and in D3 prior entering into suspend
- Interrupt comes after pci_pm_resume_noirq() when device interrupts are re-enabled
- According to register dump the interrupt really comes from the i2c_designware.0. Controller is enabled, I2C target address register points to a one detectable I2C device address 0x60 and the DW_IC_RAW_INTR_STAT register START_DET, STOP_DET, ACTIVITY and TX_EMPTY bits are set indicating completed I2C transaction.
My guess is that the firmware uses this controller to communicate with an on-board I2C device during resume but does not disable the controller before giving control to an operating system.
I was told the UEFI update fixes this but never the less it revealed the driver is not ready to handle TX_EMPTY (or RX_FULL) interrupt when device is supposed to be idle and state variables are not set (especially the dev->msgs pointer which may point to NULL or stale old data).
Introduce a new software status flag STATUS_ACTIVE indicating when the controller is active in driver point of view. Now treat all interrupts that occur when is not set as unexpected and mask all interrupts from the controller.
--- drivers/i2c/busses/i2c-designware-core.h | 7 +++++-- drivers/i2c/busses/i2c-designware-master.c | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-designware-core.h +5 -2
@@ -126,8 +126,9 @@* status codes */ #define STATUS_IDLE 0x0 -#define STATUS_WRITE_IN_PROGRESS 0x1 -#define STATUS_READ_IN_PROGRESS 0x2 +#define STATUS_ACTIVE 0x1 +#define STATUS_WRITE_IN_PROGRESS 0x2 +#define STATUS_READ_IN_PROGRESS 0x4/* * operation modes
@@ -334,12 +335,14 @@ void i2c_dw_disable_int(struct dw_i2c_destatic inline void __i2c_dw_enable (struct dw_i2c_dev *dev) { + dev->status |=STATUS_ACTIVE ;regmap_write (dev->map,DW_IC_ENABLE ,1 ); }static inline void __i2c_dw_disable_nowait (struct dw_i2c_dev *dev) {regmap_write (dev->map,DW_IC_ENABLE ,0 ); + dev->status &= ~STATUS_ACTIVE ; }void __i2c_dw_disable (struct dw_i2c_dev *dev);
drivers/i2c/busses/i2c-designware-master.c +13 -0
@@ -716,6 +716,19 @@ static int i2c_dw_irq_handler_master(stru32 stat; stat =i2c_dw_read_clear_intrbits (dev); + +if (!(dev->status &STATUS_ACTIVE )) { +/* +* Unexpected interrupt in driver point of view. State +* variables are either unset or stale so acknowledge and +* disable interrupts for suppressing further interrupts if +* interrupt really came from this HW (E.g. firmware has left +* the HW active). +*/ +regmap_write (dev->map,DW_IC_INTR_MASK ,0 ); +return 0 ; + } +if (stat &DW_IC_INTR_TX_ABRT ) { dev->cmd_err |=DW_IC_ERR_TX_ABRT ; dev->status =STATUS_IDLE ;
Greg Kroah-Hartman
maintainerPATCH 41/862 fs: dlm: fix race between test_bit() and queue_work()
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit eef6ec9bf390e836a6c4029f3620fe49528aa1fe upstream.
This patch fixes a race by using ls_cb_mutex around the bit operations and conditional code blocks for LSFL_CB_DELAY.
The function dlm_callback_stop() expects to stop all callbacks and flush all currently queued onces. The set_bit() is not enough because there can still be queue_work() after the workqueue was flushed. To avoid queue_work() after set_bit(), surround both by ls_cb_mutex.
--- fs/dlm/ast.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
fs/dlm/ast.c +4 -2
@@ -200,13 +200,13 @@ void dlm_add_cb(struct dlm_lkb *lkb, uinif (!prev_seq) {kref_get (&lkb->lkb_ref); +mutex_lock (&ls->ls_cb_mutex);if (test_bit (LSFL_CB_DELAY , &ls->ls_flags)) { -mutex_lock (&ls->ls_cb_mutex);list_add (&lkb->lkb_cb_list, &ls->ls_cb_delay); -mutex_unlock (&ls->ls_cb_mutex); }else {queue_work (ls->ls_callback_wq, &lkb->lkb_cb_work); } +mutex_unlock (&ls->ls_cb_mutex); } out:mutex_unlock (&lkb->lkb_cb_mutex);
@@ -288,7 +288,9 @@ void dlm_callback_stop(struct dlm_ls *lsvoid dlm_callback_suspend (struct dlm_ls *ls) { +mutex_lock (&ls->ls_cb_mutex);set_bit (LSFL_CB_DELAY , &ls->ls_flags); +mutex_unlock (&ls->ls_cb_mutex);if (ls->ls_callback_wq)flush_workqueue (ls->ls_callback_wq);
Greg Kroah-Hartman
maintainerPATCH 43/862 fs: dlm: fix invalid derefence of sb_lvbptr
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 7175e131ebba47afef47e6ac4d5bab474d1e6e49 upstream.
I experience issues when putting a lkbsb on the stack and have sb_lvbptr field to a dangled pointer while not using DLM_LKF_VALBLK. It will crash with the following kernel message, the dangled pointer is here 0xdeadbeef as example:
[ 102.749317] BUG: unable to handle page fault for address: 00000000deadbeef [ 102.749320] #PF: supervisor read access in kernel mode [ 102.749323] #PF: error_code(0x0000) - not-present page [ 102.749325] PGD 0 P4D 0 [ 102.749332] Oops: 0000 [#1] PREEMPT SMP PTI [ 102.749336] CPU: 0 PID: 1567 Comm: lock_torture_wr Tainted: G W 5.19.0-rc3+ #1565 [ 102.749343] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.16.0-2.module+el8.7.0+15506+033991b0 04/01/2014 [ 102.749344] RIP: 0010:memcpy_erms+0x6/0x10 [ 102.749353] Code: cc cc cc cc eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe [ 102.749355] RSP: 0018:ffff97a58145fd08 EFLAGS: 00010202 [ 102.749358] RAX: ffff901778b77070 RBX: 0000000000000000 RCX: 0000000000000040 [ 102.749360] RDX: 0000000000000040 RSI: 00000000deadbeef RDI: ffff901778b77070 [ 102.749362] RBP: ffff97a58145fd10 R08: ffff901760b67a70 R09: 0000000000000001 [ 102.749364] R10: ffff9017008e2cb8 R11: 0000000000000001 R12: ffff901760b67a70 [ 102.749366] R13: ffff901760b78f00 R14: 0000000000000003 R15: 0000000000000001 [ 102.749368] FS: 0000000000000000(0000) GS:ffff901876e00000(0000) knlGS:0000000000000000 [ 102.749372] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 102.749374] CR2: 00000000deadbeef CR3: 000000017c49a004 CR4: 0000000000770ef0 [ 102.749376] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 102.749378] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 102.749379] PKRU: 55555554 [ 102.749381] Call Trace: [ 102.749382] <TASK> [ 102.749383] ? send_args+0xb2/0xd0 [ 102.749389] send_common+0xb7/0xd0 [ 102.749395] _unlock_lock+0x2c/0x90 [ 102.749400] unlock_lock.isra.56+0x62/0xa0 [ 102.749405] dlm_unlock+0x21e/0x330 [ 102.749411] ? lock_torture_stats+0x80/0x80 [dlm_locktorture] [ 102.749416] torture_unlock+0x5a/0x90 [dlm_locktorture] [ 102.749419] ? preempt_count_sub+0xba/0x100 [ 102.749427] lock_torture_writer+0xbd/0x150 [dlm_locktorture] [ 102.786186] kthread+0x10a/0x130 [ 102.786581] ? kthread_complete_and_exit+0x20/0x20 [ 102.787156] ret_from_fork+0x22/0x30 [ 102.787588] </TASK> [ 102.787855] Modules linked in: dlm_locktorture torture rpcsec_gss_krb5 intel_rapl_msr intel_rapl_common kvm_intel iTCO_wdt iTCO_vendor_support kvm vmw_vsock_virtio_transport qxl irqbypass vmw_vsock_virtio_transport_common drm_ttm_helper crc32_pclmul joydev crc32c_intel ttm vsock virtio_scsi virtio_balloon snd_pcm drm_kms_helper virtio_console snd_timer snd drm soundcore syscopyarea i2c_i801 sysfillrect sysimgblt i2c_smbus pcspkr fb_sys_fops lpc_ich serio_raw [ 102.792536] CR2: 00000000deadbeef [ 102.792930] ---[ end trace 0000000000000000 ]---
This patch fixes the issue by checking also on DLM_LKF_VALBLK on exflags is set when copying the lvbptr array instead of if it's just null which fixes for me the issue.
I think this patch can fix other dlm users as well, depending how they handle the init, freeing memory handling of sb_lvbptr and don't set DLM_LKF_VALBLK for some dlm_lock() calls. It might a there could be a hidden issue all the time. However with checking on DLM_LKF_VALBLK the user always need to provide a sb_lvbptr non-null value. There might be more intelligent handling between per ls lvblen, DLM_LKF_VALBLK and non-null to report the user the way how DLM API is used is wrong but can be added for later, this will only fix the current behaviour.
--- fs/dlm/lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/dlm/lock.c +1 -1
@@ -3623,7 +3623,7 @@ static void send_args(struct dlm_rsb *r,case cpu_to_le32 (DLM_MSG_REQUEST_REPLY ):case cpu_to_le32 (DLM_MSG_CONVERT_REPLY ):case cpu_to_le32 (DLM_MSG_GRANT ): -if (!lkb->lkb_lvbptr) +if (!lkb->lkb_lvbptr || !(lkb->lkb_exflags &DLM_LKF_VALBLK ))break ;memcpy (ms->m_extra, lkb->lkb_lvbptr, r->res_ls->ls_lvblen);break ;
Greg Kroah-Hartman
maintainerPATCH 44/862 btf: Export bpf_dynptr definition
In reply to Greg Kroah-HartmanFrom: Roberto Sassu <[email protected]>
commit 00f146413ccb6c84308e559281449755c83f54c5 upstream.
eBPF dynamic pointers is a new feature recently added to upstream. It binds together a pointer to a memory area and its size. The internal kernel structure bpf_dynptr_kern is not accessible by eBPF programs in user space. They instead see bpf_dynptr, which is then translated to the internal kernel structure by the eBPF verifier.
The problem is that it is not possible to include at the same time the uapi include linux/bpf.h and the vmlinux BTF vmlinux.h, as they both contain the definition of some structures/enums. The compiler complains saying that the structures/enums are redefined.
As bpf_dynptr is defined in the uapi include linux/bpf.h, this makes it impossible to include vmlinux.h. However, in some cases, e.g. when using kfuncs, vmlinux.h has to be included. The only option until now was to include vmlinux.h and add the definition of bpf_dynptr directly in the eBPF program source code from linux/bpf.h.
Solve the problem by using the same approach as for bpf_timer (which also follows the same scheme with the _kern suffix for the internal kernel structure).
Add the following line in one of the dynamic pointer helpers, bpf_dynptr_from_mem():
BTF_TYPE_EMIT(struct bpf_dynptr);
--- kernel/bpf/helpers.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/bpf/helpers.c +2 -0
@@ -1468,6 +1468,8 @@ BPF_CALL_4(bpf_dynptr_from_mem, void *, {int err; +BTF_TYPE_EMIT (struct bpf_dynptr ); + err =bpf_dynptr_check_size (size);if (err) goto error;
Greg Kroah-Hartman
maintainerPATCH 45/862 mbcache: Avoid nesting of cache->c_list_lock under bit locks
In reply to Greg Kroah-HartmanFrom: Jan Kara <[email protected]>
commit 5fc4cbd9fde5d4630494fd6ffc884148fb618087 upstream.
Commit 307af6c87937 ("mbcache: automatically delete entries from cache on freeing") started nesting cache->c_list_lock under the bit locks protecting hash buckets of the mbcache hash table in mb_cache_entry_create(). This causes problems for real-time kernels because there spinlocks are sleeping locks while bitlocks stay atomic. Luckily the nesting is easy to avoid by holding entry reference until the entry is added to the LRU list. This makes sure we cannot race with entry deletion.
--- fs/mbcache.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
fs/mbcache.c +10 -7
@@ -90,8 +90,14 @@ int mb_cache_entry_create(struct mb_cache *cache, gfp_t mask, u32 key,return -ENOMEM ;INIT_LIST_HEAD (&entry->e_list); -/* Initial hash reference */ -atomic_set (&entry->e_refcnt,1 ); +/* +* We create entry with two references. One reference is kept by the +* hash table, the other reference is used to protect us from +* mb_cache_entry_delete_or_get() until the entry is fully setup. This +* avoids nesting of cache->c_list_lock into hash table bit locks which +* is problematic for RT. +*/ +atomic_set (&entry->e_refcnt,2 ); entry->e_key = key; entry->e_value = value; entry->e_reusable = reusable;
@@ -106,15 +112,12 @@ int mb_cache_entry_create(struct mb_cache *cache, gfp_t mask, u32 key, } }hlist_bl_add_head (&entry->e_hash_list, head); -/* -* Add entry to LRU list before it can be found by -* mb_cache_entry_delete() to avoid races -*/ +hlist_bl_unlock (head);spin_lock (&cache->c_list_lock);list_add_tail (&entry->e_list, &cache->c_list); cache->c_entry_count++;spin_unlock (&cache->c_list_lock); -hlist_bl_unlock (head); +mb_cache_entry_put (cache, entry);return 0 ; }
Signature · 1 line
2.38.0
Greg Kroah-Hartman
maintainerPATCH 46/862 HID: multitouch: Add memory barriers
In reply to Greg Kroah-HartmanFrom: Andri Yngvason <[email protected]>
commit be6e2b5734a425941fcdcdbd2a9337be498ce2cf upstream.
This fixes broken atomic checks which cause a race between the release-timer and processing of hid input.
I noticed that contacts were sometimes sticking, even with the "sticky fingers" quirk enabled. This fixes that problem.
--- drivers/hid/hid-multitouch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hid/hid-multitouch.c +4 -4
@@ -1186,7 +1186,7 @@ static void mt_touch_report(struct hid_dint contact_count =-1 ;/* sticky fingers release in progress, abort */ -if (test_and_set_bit (MT_IO_FLAGS_RUNNING , &td->mt_io_flags)) +if (test_and_set_bit_lock (MT_IO_FLAGS_RUNNING , &td->mt_io_flags))return ; scantime = *app->scantime;
@@ -1267,7 +1267,7 @@ static void mt_touch_report(struct hid_ddel_timer (&td->release_timer); } -clear_bit (MT_IO_FLAGS_RUNNING , &td->mt_io_flags); +clear_bit_unlock (MT_IO_FLAGS_RUNNING , &td->mt_io_flags); } static int mt_touch_input_configured(struct hid_device *hdev,
@@ -1699,11 +1699,11 @@ static void mt_expired_timeout(struct ti* An input report came in just before we release the sticky fingers, * it will take care of the sticky fingers. */ -if (test_and_set_bit (MT_IO_FLAGS_RUNNING , &td->mt_io_flags)) +if (test_and_set_bit_lock (MT_IO_FLAGS_RUNNING , &td->mt_io_flags))return ;if (test_bit (MT_IO_FLAGS_PENDING_SLOTS , &td->mt_io_flags))mt_release_contacts (hdev); -clear_bit (MT_IO_FLAGS_RUNNING , &td->mt_io_flags); +clear_bit_unlock (MT_IO_FLAGS_RUNNING , &td->mt_io_flags); }static int mt_probe (struct hid_device *hdev,const struct hid_device_id *id)
Greg Kroah-Hartman
maintainerPATCH 47/862 quota: Check next/prev free block number after reading from quota file
In reply to Greg Kroah-HartmanFrom: Zhihao Cheng <[email protected]>
commit 6c8ea8b8cd4722efd419f91ca46a2dc81b7d89a3 upstream.
Following process:
Init: v2_read_file_info: <3> dqi_free_blk 0 dqi_free_entry 5 dqi_blks 6
Step 1. chown bin f_a -> dquot_acquire -> v2_write_dquot:
qtree_write_dquot
do_insert_tree
find_free_dqentry
get_free_dqblk
write_blk(info->dqi_blocks) // info->dqi_blocks = 6, failure. The
content in physical block (corresponding to blk 6) is random.
Step 2. chown root f_a -> dquot_transfer -> dqput_all -> dqput ->
ext4_release_dquot -> v2_release_dquot -> qtree_delete_dquot:
dquot_release
remove_tree
free_dqentry
put_free_dqblk(6)
info->dqi_free_blk = blk // info->dqi_free_blk = 6Step 3. drop cache (buffer head for block 6 is released)
Step 4. chown bin f_b -> dquot_acquire -> commit_dqblk -> v2_write_dquot:
qtree_write_dquot
do_insert_tree
find_free_dqentry
get_free_dqblk
dh = (struct qt_disk_dqdbheader *)buf
blk = info->dqi_free_blk // 6
ret = read_blk(info, blk, buf) // The content of buf is random info->dqi_free_blk = le32_to_cpu(dh->dqdh_next_free) // random blk
Step 5. chown bin f_c -> notify_change -> ext4_setattr -> dquot_transfer:
dquot = dqget -> acquire_dquot -> ext4_acquire_dquot -> dquot_acquire ->
commit_dqblk -> v2_write_dquot -> dq_insert_tree:
do_insert_tree
find_free_dqentry
get_free_dqblk
blk = info->dqi_free_blk // If blk < 0 and blk is not an error
code, it will be returned as dquot
transfer_to[USRQUOTA] = dquot // A random negative value __dquot_transfer(transfer_to)
dquot_add_inodes(transfer_to[cnt])
spin_lock(&dquot->dq_dqb_lock) // page fault
, which will lead to kernel page fault:
Quota error (device sda): qtree_write_dquot: Error -8000 occurred while creating quota
BUG: unable to handle page fault for address: ffffffffffffe120 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page Oops: 0002 [#1] PREEMPT SMP CPU: 0 PID: 5974 Comm: chown Not tainted 6.0.0-rc1-00004 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) RIP: 0010:_raw_spin_lock+0x3a/0x90 Call Trace: dquot_add_inodes+0x28/0x270 __dquot_transfer+0x377/0x840 dquot_transfer+0xde/0x540 ext4_setattr+0x405/0x14d0 notify_change+0x68e/0x9f0 chown_common+0x300/0x430 __x64_sys_fchownat+0x29/0x40
In order to avoid accessing invalid quota memory address, this patch adds block number checking of next/prev free block read from quota file.
Fetch a reproducer in [Link].
--- fs/quota/quota_tree.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
fs/quota/quota_tree.c +38 -0
@@ -71,6 +71,35 @@ static ssize_t write_blk(struct qtree_mereturn ret; } +static inline int do_check_range (struct super_block *sb,const char *val_name, +uint val,uint min_val,uint max_val) +{ +if (val < min_val || val > max_val) { +quota_error (sb,"Getting %s %u out of range %u-%u" , + val_name, val, min_val, max_val); +return -EUCLEAN ; + } + +return 0 ; +} + +static int check_dquot_block_header (struct qtree_mem_dqinfo *info, +struct qt_disk_dqdbheader *dh) +{ +int err =0 ; + + err =do_check_range (info->dqi_sb,"dqdh_next_free" , +le32_to_cpu (dh->dqdh_next_free),0 , + info->dqi_blocks -1 ); +if (err) +return err; + err =do_check_range (info->dqi_sb,"dqdh_prev_free" , +le32_to_cpu (dh->dqdh_prev_free),0 , + info->dqi_blocks -1 ); + +return err; +} +/* Remove empty block from list and return it */ static int get_free_dqblk (struct qtree_mem_dqinfo *info) {
@@ -85,6 +114,9 @@ static int get_free_dqblk(struct qtree_m ret =read_blk (info, blk, buf);if (ret <0 ) goto out_buf; + ret =check_dquot_block_header (info, dh); +if (ret) + goto out_buf; info->dqi_free_blk =le32_to_cpu (dh->dqdh_next_free); }else {
@@ -232,6 +264,9 @@ static uint find_free_dqentry(struct qtr *err =read_blk (info, blk, buf);if (*err <0 ) goto out_buf; + *err =check_dquot_block_header (info, dh); +if (*err) + goto out_buf; }else { blk =get_free_dqblk (info);if ((int )blk <0 ) {
@@ -424,6 +459,9 @@ static int free_dqentry(struct qtree_mem goto out_buf; } dh = (struct qt_disk_dqdbheader *)buf; + ret =check_dquot_block_header (info, dh); +if (ret) + goto out_buf;le16_add_cpu (&dh->dqdh_entries,-1 );if (!le16_to_cpu (dh->dqdh_entries)) {/* Block got free? */ ret =remove_free_dqentry (info, buf, blk);
Greg Kroah-Hartman
maintainerPATCH 30/862 usb: gadget: uvc: Fix argument to sizeof() in uvc_register_video()
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
commit a15e17acce5aaae54243f55a7349c2225450b9bc upstream.
When building s390 allmodconfig after commit 9b91a6523078 ("usb: gadget:
uvc: increase worker prio to WQ_HIGHPRI"), the following error occurs:
In file included from ../include/linux/string.h:253,
from ../include/linux/bitmap.h:11,
from ../include/linux/cpumask.h:12,
from ../include/linux/smp.h:13,
from ../include/linux/lockdep.h:14,
from ../include/linux/rcupdate.h:29,
from ../include/linux/rculist.h:11,
from ../include/linux/pid.h:5,
from ../include/linux/sched.h:14,
from ../include/linux/ratelimit.h:6,
from ../include/linux/dev_printk.h:16,
from ../include/linux/device.h:15,
from ../drivers/usb/gadget/function/f_uvc.c:9:
In function ‘fortify_memset_chk’,
inlined from ‘uvc_register_video’ at ../drivers/usb/gadget/function/f_uvc.c:424:2:
../include/linux/fortify-string.h:301:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
301 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~This points to the memset() in uvc_register_video(). It is clear that the argument to sizeof() is incorrect, as uvc->vdev (a 'struct video_device') is being zeroed out but the size of uvc->video (a 'struct uvc_video') is being used as the third arugment to memset().
pahole shows that prior to commit 9b91a6523078 ("usb: gadget: uvc:
increase worker prio to WQ_HIGHPRI"), 'struct video_device' and 'struct ucv_video' had the same size, meaning that the argument to sizeof() is incorrect semantically but there is no visible issue:
$ pahole -s build/drivers/usb/gadget/function/f_uvc.o | grep -E "(uvc_video|video_device)\s+" video_device 1400 4 uvc_video 1400 3
After that change, uvc_video becomes slightly larger, meaning that the memset() will overwrite by 8 bytes:
$ pahole -s build/drivers/usb/gadget/function/f_uvc.o | grep -E "(uvc_video|video_device)\s+" video_device 1400 4 uvc_video 1408 3
Fix the arugment to sizeof() so that there is no overwrite.
--- drivers/usb/gadget/function/f_uvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_uvc.c +1 -1
@@ -421,7 +421,7 @@ uvc_register_video(struct uvc_device *uvint ret;/* TODO reference counting. */ -memset (&uvc->vdev,0 ,sizeof (uvc->video)); +memset (&uvc->vdev,0 ,sizeof (uvc->vdev)); uvc->vdev.v4l2_dev = &uvc->v4l2_dev; uvc->vdev.v4l2_dev->dev = &cdev->gadget->dev; uvc->vdev.fops = &uvc_v4l2_fops;
Greg Kroah-Hartman
maintainerPATCH 48/862 platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure
In reply to Greg Kroah-HartmanFrom: Patryk Duda <[email protected]>
commit f74c7557ed0d321947e8bb4e9d47c1013f8b2227 upstream.
Some EC based devices (e.g. Fingerpint MCU) can jump to RO part of the firmware (intentionally or due to device reboot). The RO part doesn't change during the device lifecycle, so it won't support newer version of EC_CMD_GET_NEXT_EVENT command.
Function cros_ec_query_all() is responsible for finding maximum supported MKBP event version. It's usually called when the device is running RW part of the firmware, so the command version can be potentially higher than version supported by the RO.
The problem was fixed by updating maximum supported version when the device returns EC_RES_INVALID_VERSION (mapped to -ENOPROTOOPT). That way the kernel will use highest common version supported by RO and RW.
--- drivers/platform/chrome/cros_ec_proto.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
drivers/platform/chrome/cros_ec_proto.c +32 -0
@@ -773,6 +773,7 @@ int cros_ec_get_next_event(struct cros_eu8 event_type;u32 host_event;int ret; +u32 ver_mask;/* * Default value for wake_event.
@@ -794,6 +795,37 @@ int cros_ec_get_next_event(struct cros_ereturn get_keyboard_state_event (ec_dev); ret =get_next_event (ec_dev); +/* +* -ENOPROTOOPT is returned when EC returns EC_RES_INVALID_VERSION. +* This can occur when EC based device (e.g. Fingerprint MCU) jumps to +* the RO image which doesn't support newer version of the command. In +* this case we will attempt to update maximum supported version of the +* EC_CMD_GET_NEXT_EVENT. +*/ +if (ret == -ENOPROTOOPT ) { +dev_dbg (ec_dev->dev, +"GET_NEXT_EVENT returned invalid version error.\n" ); + ret =cros_ec_get_host_command_version_mask (ec_dev, +EC_CMD_GET_NEXT_EVENT , + &ver_mask); +if (ret <0 || ver_mask ==0 ) +/* +* Do not change the MKBP supported version if we can't +* obtain supported version correctly. Please note that +* calling EC_CMD_GET_NEXT_EVENT returned +* EC_RES_INVALID_VERSION which means that the command +* is present. +*/ +return -ENOPROTOOPT ; + + ec_dev->mkbp_event_supported =fls (ver_mask); +dev_dbg (ec_dev->dev,"MKBP support version changed to %u\n" , + ec_dev->mkbp_event_supported -1 ); + +/* Try to get next event with new MKBP support version set. */ + ret =get_next_event (ec_dev); + } +if (ret <=0 )return ret;
Greg Kroah-Hartman
maintainerPATCH 50/862 ASoC: wcd9335: fix order of Slimbus unprepare/disable
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit ea8ef003aa53ad23e7705c5cab1c4e664faa6c79 upstream.
Slimbus streams are first prepared and then enabled, so the cleanup path should reverse it. The unprepare sets stream->num_ports to 0 and frees the stream->ports. Calling disable after unprepare was not really effective (channels was not deactivated) and could lead to further issues due to making transfers on unprepared stream.
--- sound/soc/codecs/wcd9335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wcd9335.c +1 -1
@@ -1974,8 +1974,8 @@ static int wcd9335_trigger(struct snd_pccase SNDRV_PCM_TRIGGER_STOP :case SNDRV_PCM_TRIGGER_SUSPEND :case SNDRV_PCM_TRIGGER_PAUSE_PUSH : -slim_stream_unprepare (dai_data->sruntime);slim_stream_disable (dai_data->sruntime); +slim_stream_unprepare (dai_data->sruntime);break ;default :break ;
Greg Kroah-Hartman
maintainerPATCH 49/862 arm64: dts: qcom: sdm845-mtp: correct ADC settle time
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit 209a04885ab5f76722a1671d0fbf0a5b4bccacec upstream.
The PMIC's VADC property for settle time is qcom,hw-settle-time, not qcom,hw-settle-time-us. The latter is used in PMIC's TM ADC.
qcom/sdm845-mtp.dtb: pmic@0: adc@3100:adc-chan@4c: 'qcom,hw-settle-time-us' does not match any of the regexes: 'pinctrl-[0-9]+'
--- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-mtp.dts +6 -6
@@ -536,42 +536,42 @@ reg = <ADC5_XO_THERM_100K_PU>; label = "xo_therm"; qcom,ratiometric; - qcom,hw-settle-time-us = <200>; + qcom,hw-settle-time = <200>; }; adc-chan@4d { reg = <ADC5_AMUX_THM1_100K_PU>; label = "msm_therm"; qcom,ratiometric; - qcom,hw-settle-time-us = <200>; + qcom,hw-settle-time = <200>; }; adc-chan@4f { reg = <ADC5_AMUX_THM3_100K_PU>; label = "pa_therm1"; qcom,ratiometric; - qcom,hw-settle-time-us = <200>; + qcom,hw-settle-time = <200>; }; adc-chan@51 { reg = <ADC5_AMUX_THM5_100K_PU>; label = "quiet_therm"; qcom,ratiometric; - qcom,hw-settle-time-us = <200>; + qcom,hw-settle-time = <200>; }; adc-chan@83 { reg = <ADC5_VPH_PWR>; label = "vph_pwr"; qcom,ratiometric; - qcom,hw-settle-time-us = <200>; + qcom,hw-settle-time = <200>; }; adc-chan@85 { reg = <ADC5_VCOIN>; label = "vcoin"; qcom,ratiometric; - qcom,hw-settle-time-us = <200>; + qcom,hw-settle-time = <200>; }; };
Greg Kroah-Hartman
maintainerPATCH 51/862 ASoC: wcd934x: fix order of Slimbus unprepare/disable
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit e96bca7eaa5747633ec638b065630ff83728982a upstream.
Slimbus streams are first prepared and then enabled, so the cleanup path should reverse it. The unprepare sets stream->num_ports to 0 and frees the stream->ports. Calling disable after unprepare was not really effective (channels was not deactivated) and could lead to further issues due to making transfers on unprepared stream.
--- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wcd934x.c +1 -1
@@ -1913,8 +1913,8 @@ static int wcd934x_trigger(struct snd_pccase SNDRV_PCM_TRIGGER_STOP :case SNDRV_PCM_TRIGGER_SUSPEND :case SNDRV_PCM_TRIGGER_PAUSE_PUSH : -slim_stream_unprepare (dai_data->sruntime);slim_stream_disable (dai_data->sruntime); +slim_stream_unprepare (dai_data->sruntime);break ;default :break ;
Greg Kroah-Hartman
maintainerPATCH 53/862 net: thunderbolt: Enable DMA paths only after rings are enabled
In reply to Greg Kroah-HartmanFrom: Mika Westerberg <[email protected]>
commit ff7cd07f306406493f7b78890475e85b6d0811ed upstream.
If the other host starts sending packets early on it is possible that we are still in the middle of populating the initial Rx ring packets to the ring. This causes the tbnet_poll() to mess over the queue and causes list corruption. This happens specifically when connected with macOS as it seems start sending various IP discovery packets as soon as its side of the paths are configured.
To prevent this we move the DMA path enabling to happen after we have primed the Rx ring. This makes sure no incoming packets can arrive before we are ready to handle them.
--- drivers/net/thunderbolt.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
drivers/net/thunderbolt.c +17 -11
@@ -612,18 +612,13 @@ static void tbnet_connected_work(structreturn ; } -/* Both logins successful so enable the high-speed DMA paths and -* start the network device queue. +/* Both logins successful so enable the rings, high-speed DMA +* paths and start the network device queue. +* +* Note we enable the DMA paths last to make sure we have primed +* the Rx ring before any incoming packets are allowed to +* arrive. */ - ret =tb_xdomain_enable_paths (net->xd, net->local_transmit_path, - net->rx_ring.ring->hop, - net->remote_transmit_path, - net->tx_ring.ring->hop); -if (ret) { -netdev_err (net->dev,"failed to enable DMA paths\n" ); -return ; - } -tb_ring_start (net->tx_ring.ring);tb_ring_start (net->rx_ring.ring);
@@ -635,10 +630,21 @@ static void tbnet_connected_work(structif (ret) goto err_free_rx_buffers; + ret =tb_xdomain_enable_paths (net->xd, net->local_transmit_path, + net->rx_ring.ring->hop, + net->remote_transmit_path, + net->tx_ring.ring->hop); +if (ret) { +netdev_err (net->dev,"failed to enable DMA paths\n" ); + goto err_free_tx_buffers; + } +netif_carrier_on (net->dev);netif_start_queue (net->dev);return ; +err_free_tx_buffers: +tbnet_free_buffers (&net->tx_ring); err_free_rx_buffers:tbnet_free_buffers (&net->rx_ring); err_stop_rings:
Greg Kroah-Hartman
maintainerPATCH 52/862 hwmon: (gsc-hwmon) Call of_node_get() before of_find_xxx API
In reply to Greg Kroah-HartmanFrom: Liang He <[email protected]>
commit 7f62cf781e6567d59c8935dc8c6068ce2bb904b7 upstream.
In gsc_hwmon_get_devtree_pdata(), we should call of_node_get() before the of_find_compatible_node() which will automatically call of_node_put() for the 'from' argument.
--- drivers/hwmon/gsc-hwmon.c | 1 + 1 file changed, 1 insertion(+)
drivers/hwmon/gsc-hwmon.c +1 -0
@@ -267,6 +267,7 @@ gsc_hwmon_get_devtree_pdata(struct devic pdata->nchannels = nchannels;/* fan controller base address */ +of_node_get (dev->parent->of_node); fan =of_find_compatible_node (dev->parent->of_node,NULL ,"gw,gsc-fan" );if (fan &&of_property_read_u32 (fan,"reg" , &pdata->fan_base)) {of_node_put (fan);
Greg Kroah-Hartman
maintainerPATCH 54/862 regulator: qcom_rpm: Fix circular deferral regression
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
commit 8478ed5844588703a1a4c96a004b1525fbdbdd5e upstream.
On recent kernels, the PM8058 L16 (or any other PM8058 LDO-regulator) does not come up if they are supplied by an SMPS-regulator. This is not very strange since the regulators are registered in a long array and the L-regulators are registered before the S-regulators, and if an L-regulator defers, it will never get around to registering the S-regulator that it needs.
See arch/arm/boot/dts/qcom-apq8060-dragonboard.dts:
pm8058-regulators {
(...)
vdd_l13_l16-supply = <&pm8058_s4>;
(...)Ooops.
Fix this by moving the PM8058 S-regulators first in the array.
Do the same for the PM8901 S-regulators (though this is currently not causing any problems with out device trees) so that the pattern of registration order is the same on all PMnnnn chips.
--- drivers/regulator/qcom_rpm-regulator.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/regulator/qcom_rpm-regulator.c +12 -12
@@ -802,6 +802,12 @@ static const struct rpm_regulator_data r };static const struct rpm_regulator_data rpm_pm8058_regulators[] = { + {"s0" ,QCOM_RPM_PM8058_SMPS0 , &pm8058_smps,"vdd_s0" }, + {"s1" ,QCOM_RPM_PM8058_SMPS1 , &pm8058_smps,"vdd_s1" }, + {"s2" ,QCOM_RPM_PM8058_SMPS2 , &pm8058_smps,"vdd_s2" }, + {"s3" ,QCOM_RPM_PM8058_SMPS3 , &pm8058_smps,"vdd_s3" }, + {"s4" ,QCOM_RPM_PM8058_SMPS4 , &pm8058_smps,"vdd_s4" }, + {"l0" ,QCOM_RPM_PM8058_LDO0 , &pm8058_nldo,"vdd_l0_l1_lvs" }, {"l1" ,QCOM_RPM_PM8058_LDO1 , &pm8058_nldo,"vdd_l0_l1_lvs" }, {"l2" ,QCOM_RPM_PM8058_LDO2 , &pm8058_pldo,"vdd_l2_l11_l12" },
@@ -829,12 +835,6 @@ static const struct rpm_regulator_data r { "l24", QCOM_RPM_PM8058_LDO24, &pm8058_nldo, "vdd_l23_l24_l25" }, { "l25", QCOM_RPM_PM8058_LDO25, &pm8058_nldo, "vdd_l23_l24_l25" }, - { "s0", QCOM_RPM_PM8058_SMPS0, &pm8058_smps, "vdd_s0" }, - { "s1", QCOM_RPM_PM8058_SMPS1, &pm8058_smps, "vdd_s1" }, - { "s2", QCOM_RPM_PM8058_SMPS2, &pm8058_smps, "vdd_s2" }, - { "s3", QCOM_RPM_PM8058_SMPS3, &pm8058_smps, "vdd_s3" }, - { "s4", QCOM_RPM_PM8058_SMPS4, &pm8058_smps, "vdd_s4" }, - { "lvs0", QCOM_RPM_PM8058_LVS0, &pm8058_switch, "vdd_l0_l1_lvs" }, { "lvs1", QCOM_RPM_PM8058_LVS1, &pm8058_switch, "vdd_l0_l1_lvs" },
@@ -843,6 +843,12 @@ static const struct rpm_regulator_data r };static const struct rpm_regulator_data rpm_pm8901_regulators[] = { + {"s0" ,QCOM_RPM_PM8901_SMPS0 , &pm8901_ftsmps,"vdd_s0" }, + {"s1" ,QCOM_RPM_PM8901_SMPS1 , &pm8901_ftsmps,"vdd_s1" }, + {"s2" ,QCOM_RPM_PM8901_SMPS2 , &pm8901_ftsmps,"vdd_s2" }, + {"s3" ,QCOM_RPM_PM8901_SMPS3 , &pm8901_ftsmps,"vdd_s3" }, + {"s4" ,QCOM_RPM_PM8901_SMPS4 , &pm8901_ftsmps,"vdd_s4" }, + {"l0" ,QCOM_RPM_PM8901_LDO0 , &pm8901_nldo,"vdd_l0" }, {"l1" ,QCOM_RPM_PM8901_LDO1 , &pm8901_pldo,"vdd_l1" }, {"l2" ,QCOM_RPM_PM8901_LDO2 , &pm8901_pldo,"vdd_l2" },
@@ -851,12 +857,6 @@ static const struct rpm_regulator_data r { "l5", QCOM_RPM_PM8901_LDO5, &pm8901_pldo, "vdd_l5" }, { "l6", QCOM_RPM_PM8901_LDO6, &pm8901_pldo, "vdd_l6" }, - { "s0", QCOM_RPM_PM8901_SMPS0, &pm8901_ftsmps, "vdd_s0" }, - { "s1", QCOM_RPM_PM8901_SMPS1, &pm8901_ftsmps, "vdd_s1" }, - { "s2", QCOM_RPM_PM8901_SMPS2, &pm8901_ftsmps, "vdd_s2" }, - { "s3", QCOM_RPM_PM8901_SMPS3, &pm8901_ftsmps, "vdd_s3" }, - { "s4", QCOM_RPM_PM8901_SMPS4, &pm8901_ftsmps, "vdd_s4" }, - { "lvs0", QCOM_RPM_PM8901_LVS0, &pm8901_switch, "lvs0_in" }, { "lvs1", QCOM_RPM_PM8901_LVS1, &pm8901_switch, "lvs1_in" }, { "lvs2", QCOM_RPM_PM8901_LVS2, &pm8901_switch, "lvs2_in" },
Greg Kroah-Hartman
maintainerPATCH 55/862 arm64: topology: move store_cpu_topology() to shared code
In reply to Greg Kroah-HartmanFrom: Conor Dooley <[email protected]>
commit 456797da792fa7cbf6698febf275fe9b36691f78 upstream.
arm64's method of defining a default cpu topology requires only minimal changes to apply to RISC-V also. The current arm64 implementation exits early in a uniprocessor configuration by reading MPIDR & claiming that uniprocessor can rely on the default values.
This is appears to be a hangover from prior to '3102bc0e6ac7 ("arm64:
topology: Stop using MPIDR for topology information")', because the current code just assigns default values for multiprocessor systems.
With the MPIDR references removed, store_cpu_topolgy() can be moved to the common arch_topology code.
--- arch/arm64/kernel/topology.c | 40 ---------------------------------------- drivers/base/arch_topology.c | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 40 deletions(-)
arch/arm64/kernel/topology.c +0 -40
@@ -22,46 +22,6 @@#include <asm/cputype.h> #include <asm/topology.h> -void store_cpu_topology (unsigned int cpuid) -{ -struct cpu_topology *cpuid_topo = &cpu_topology[cpuid]; -u64 mpidr; - -if (cpuid_topo->package_id !=-1 ) - goto topology_populated; - - mpidr =read_cpuid_mpidr (); - -/* Uniprocessor systems can rely on default topology values */ -if (mpidr &MPIDR_UP_BITMASK ) -return ; - -/* -* This would be the place to create cpu topology based on MPIDR. -* -* However, it cannot be trusted to depict the actual topology; some -* pieces of the architecture enforce an artificial cap on Aff0 values -* (e.g. GICv3's ICC_SGI1R_EL1 limits it to 15), leading to an -* artificial cycling of Aff1, Aff2 and Aff3 values. IOW, these end up -* having absolutely no relationship to the actual underlying system -* topology, and cannot be reasonably used as core / package ID. -* -* If the MT bit is set, Aff0 *could* be used to define a thread ID, but -* we still wouldn't be able to obtain a sane core ID. This means we -* need to entirely ignore MPIDR for any topology deduction. -*/ - cpuid_topo->thread_id =-1 ; - cpuid_topo->core_id = cpuid; - cpuid_topo->package_id =cpu_to_node (cpuid); - -pr_debug ("CPU%u: cluster %d core %d thread %d mpidr %#016llx\n" , - cpuid, cpuid_topo->package_id, cpuid_topo->core_id, - cpuid_topo->thread_id, mpidr); - -topology_populated: -update_siblings_masks (cpuid); -} -#ifdef CONFIG_ACPI static bool __init acpi_cpu_is_threaded (int cpu) {
drivers/base/arch_topology.c +19 -0
@@ -841,4 +841,23 @@ void __init init_cpu_topology(void) return; } } + +void store_cpu_topology (unsigned int cpuid) +{ +struct cpu_topology *cpuid_topo = &cpu_topology[cpuid]; + +if (cpuid_topo->package_id !=-1 ) + goto topology_populated; + + cpuid_topo->thread_id =-1 ; + cpuid_topo->core_id = cpuid; + cpuid_topo->package_id =cpu_to_node (cpuid); + +pr_debug ("CPU%u: package %d core %d thread %d\n" , + cpuid, cpuid_topo->package_id, cpuid_topo->core_id, + cpuid_topo->thread_id); + +topology_populated: +update_siblings_masks (cpuid); +}#endif
Greg Kroah-Hartman
maintainerPATCH 56/862 riscv: topology: fix default topology reporting
In reply to Greg Kroah-HartmanFrom: Conor Dooley <[email protected]>
commit fbd92809997a391f28075f1c8b5ee314c225557c upstream.
RISC-V has no sane defaults to fall back on where there is no cpu-map in the devicetree.
Without sane defaults, the package, core and thread IDs are all set to -1. This causes user-visible inaccuracies for tools like hwloc/lstopo which rely on the sysfs cpu topology files to detect a system's topology.
On a PolarFire SoC, which should have 4 harts with a thread each, lstopo currently reports:
Machine (793MB total)
Package L#0
NUMANode L#0 (P#0 793MB)
Core L#0
L1d L#0 (32KB) + L1i L#0 (32KB) + PU L#0 (P#0)
L1d L#1 (32KB) + L1i L#1 (32KB) + PU L#1 (P#1)
L1d L#2 (32KB) + L1i L#2 (32KB) + PU L#2 (P#2)
L1d L#3 (32KB) + L1i L#3 (32KB) + PU L#3 (P#3)Adding calls to store_cpu_topology() in {boot,smp} hart bringup code results in the correct topolgy being reported:
Machine (793MB total)
Package L#0
NUMANode L#0 (P#0 793MB)
L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0)
L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1)
L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2 + PU L#2 (P#2)
L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3 + PU L#3 (P#3)--- arch/riscv/Kconfig | 2 +- arch/riscv/kernel/smpboot.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/riscv/Kconfig +1 -1
@@ -52,7 +52,7 @@ config RISCV select COMMON_CLK select CPU_PM if CPU_IDLE select EDAC_SUPPORT - select GENERIC_ARCH_TOPOLOGY if SMP + select GENERIC_ARCH_TOPOLOGY select GENERIC_ATOMIC64 if !64BIT select GENERIC_CLOCKEVENTS_BROADCAST if SMP select GENERIC_EARLY_IOREMAP
arch/riscv/kernel/smpboot.c +2 -1
@@ -49,6 +49,7 @@ void __init smp_prepare_cpus(unsigned inunsigned int curr_cpuid; curr_cpuid =smp_processor_id (); +store_cpu_topology (curr_cpuid);numa_store_cpu_info (curr_cpuid);numa_add_cpu (curr_cpuid);
@@ -162,9 +163,9 @@ asmlinkage __visible void smp_callin(voimmgrab (mm); current->active_mm = mm; +store_cpu_topology (curr_cpuid);notify_cpu_starting (curr_cpuid);numa_add_cpu (curr_cpuid); -update_siblings_masks (curr_cpuid);set_cpu_online (curr_cpuid,1 );/*
Greg Kroah-Hartman
maintainerPATCH 31/862 usb: add quirks for Lenovo OneLink+ Dock
In reply to Greg Kroah-HartmanFrom: Jean-Francois Le Fillatre <[email protected]>
commit 37d49519b41405b08748392c6a7f193d9f77ecd2 upstream.
The Lenovo OneLink+ Dock contains two VL812 USB3.0 controllers:
17ef:1018 upstream
17ef:1019 downstream
These hubs suffer from two separate problems:
1) After the host system was suspended and woken up, the hubs appear to be in a random state. Some downstream ports (both internal to the built-in audio and network controllers, and external to USB sockets) may no longer be functional. The exact list of disabled ports (if any) changes from wakeup to wakeup. Ports remain in that state until the dock is power-cycled, or until the laptop is rebooted.
Wakeup sources connected to the hubs (keyboard, WoL on the integrated gigabit controller) will wake the system up from suspend, but they may no longer work after wakeup (and in that case will no longer work as wakeup source in a subsequent suspend-wakeup cycle).
This issue appears in the logs with messages such as:
usb 1-6.1-port4: cannot disable (err = -71)
usb 1-6-port2: cannot disable (err = -71)
usb 1-6.1: clear tt 1 (80c0) error -71
usb 1-6-port4: cannot disable (err = -71)
usb 1-6.4: PM: dpm_run_callback(): usb_dev_resume+0x0/0x10 [usbcore] returns -71
usb 1-6.4: PM: failed to resume async: error -71
usb 1-7: reset full-speed USB device number 5 using xhci_hcd
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: Cannot enable. Maybe the USB cable is bad?
usb 1-6.1-port1: cannot disable (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: cannot reset (err = -71)
usb 1-6.1-port1: Cannot enable. Maybe the USB cable is bad?
usb 1-6.1-port1: cannot disable (err = -71)2) Some USB devices cannot be enumerated properly. So far I have only seen the issue with USB 3.0 devices. The same devices work without problem directly connected to the host system, to other systems or to other hubs (even when those hubs are connected to the OneLink+ dock).
One very reliable reproducer is this USB 3.0 HDD enclosure:
152d:9561 JMicron Technology Corp. / JMicron USA Technology Corp. Mobius
I have seen it happen sporadically with other USB 3.0 enclosures, with controllers from different manufacturers, all self-powered.
Typical messages in the logs:
xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command usb 2-1.4: device not accepting address 6, error -62 xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command usb 2-1.4: device not accepting address 7, error -62
usb 2-1-port4: attempt power cycle
xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command usb 2-1.4: device not accepting address 8, error -62 xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command usb 2-1.4: device not accepting address 9, error -62
usb 2-1-port4: unable to enumerate USB device
Through trial and error, I found that the USB_QUIRK_RESET_RESUME solved the second issue. Further testing then uncovered the first issue. Test results are summarized in this table:
=======================================================================================
Settings USB2 hotplug USB3 hotplug State after waking up
---------------------------------------------------------------------------------------
power/control=auto works fails broken
usbcore.autosuspend=-1 works works broken
OR power/control=on
power/control=auto works (1) works (1) works
and USB_QUIRK_RESET_RESUME
power/control=on works works works
and USB_QUIRK_RESET_RESUME
HUB_QUIRK_DISABLE_AUTOSUSPEND works works works
and USB_QUIRK_RESET_RESUME
=======================================================================================
In those results, the power/control settings are applied to both hubs, both on the USB2 and USB3 side, before each test.
Quoted 1 line
From those results,
USB_QUIRK_RESET_RESUMEis required to reset the hubs
properly after a suspend-wakeup cycle, and the hubs must not autosuspend to work around the USB3 issue.
A secondary effect of USB_QUIRK_RESET_RESUME is to prevent the hubs' upstream links from suspending (the downstream ports can still suspend). This secondary effect is used in results (1). It is enough to solve the USB3 problem.
Setting USB_QUIRK_RESET_RESUME on those hubs is the smallest patch that solves both issues.
Prior to creating this patch, I have used the USB_QUIRK_RESET_RESUME via the kernel command line for over a year without noticing any side effect.
Thanks to Oliver Neukum @Suse for explanations of the operations of USB_QUIRK_RESET_RESUME, and requesting more testing.
--- drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/core/quirks.c +4 -0
@@ -437,6 +437,10 @@ static const struct usb_device_id usb_qu { USB_DEVICE(0x1532, 0x0116), .driver_info = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, + /* Lenovo ThinkPad OneLink+ Dock twin hub controllers (VIA Labs VL812) */ + { USB_DEVICE(0x17ef, 0x1018), .driver_info = USB_QUIRK_RESET_RESUME }, + { USB_DEVICE(0x17ef, 0x1019), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Lenovo USB-C to Ethernet Adapter RTL8153-04 */ { USB_DEVICE(0x17ef, 0x720c), .driver_info = USB_QUIRK_NO_LPM },
Greg Kroah-Hartman
maintainerPATCH 57/862 RISC-V: Re-enable counter access from userspace
In reply to Greg Kroah-HartmanFrom: Palmer Dabbelt <[email protected]>
commit 5a5294fbe0200d1327f0e089135dad77b45aa2ee upstream.
These counters were part of the ISA when we froze the uABI, removing them breaks userspace.
--- drivers/perf/riscv_pmu_sbi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/perf/riscv_pmu_sbi.c +5 -2
@@ -645,8 +645,11 @@ static int pmu_sbi_starting_cpu(unsigned struct riscv_pmu *pmu = hlist_entry_safe(node, struct riscv_pmu, node);struct cpu_hw_events *cpu_hw_evt =this_cpu_ptr (pmu->hw_events); -/* Enable the access for TIME csr only from the user mode now */ -csr_write (CSR_SCOUNTEREN ,0x2 ); +/* +* Enable the access for CYCLE, TIME, and INSTRET CSRs from userspace, +* as is necessary to maintain uABI compatibility. +*/ +csr_write (CSR_SCOUNTEREN ,0x7 );/* Stop all the counters so that they can be enabled from perf */ pmu_sbi_stop_all (pmu);
Greg Kroah-Hartman
maintainerPATCH 60/862 parisc: Fix userspace graphics card breakage due to pgtable special bit
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit 70be49f2f6223ddd2fcddb0089a40864c37e1494 upstream.
Commit df24e1783e6e ("parisc: Add vDSO support") introduced the vDSO support, for which a _PAGE_SPECIAL page table flag was needed. Since we wanted to keep every page table entry in 32-bits, this patch re-used the existing - but yet unused - _PAGE_DMB flag (which triggers a hardware break if a page is accessed) to store the special bit.
But when graphics card memory is mmapped into userspace, the kernel uses vm_iomap_memory() which sets the the special flag. So, with the DMB bit set, every access to the graphics memory now triggered a hardware exception and segfaulted the userspace program.
Fix this breakage by dropping the DMB bit when writing the page protection bits to the CPU TLB.
In addition this patch adds a small optimization: if huge pages aren't configured (which is at least the case for 32-bit kernels), then the special bit is stored in the hpage (HUGE PAGE) bit instead. That way we can skip to reset the DMB bit.
--- arch/parisc/include/asm/pgtable.h | 7 ++++++- arch/parisc/kernel/entry.S | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-)
arch/parisc/include/asm/pgtable.h +6 -1
@@ -192,6 +192,11 @@ extern void __update_cache(pte_t pte);#define _PAGE_PRESENT_BIT 22/* (0x200) Software: translation valid */ #define _PAGE_HPAGE_BIT 21/* (0x400) Software: Huge Page */ #define _PAGE_USER_BIT 20/* (0x800) Software: User accessible page */ +#ifdef CONFIG_HUGETLB_PAGE +#define _PAGE_SPECIAL_BIT _PAGE_DMB_BIT/* DMB feature is currently unused */ +#else +#define _PAGE_SPECIAL_BIT _PAGE_HPAGE_BIT/* use unused HUGE PAGE bit */ +#endif /* N.B. The bits are defined in terms of a 32 bit word above, so the */ /* following macro is ok for both 32 and 64 bit. */
@@ -219,7 +224,7 @@ extern void __update_cache(pte_t pte);#define _PAGE_PRESENT (1 << xlate_pabit(_PAGE_PRESENT_BIT))#define _PAGE_HUGE (1 << xlate_pabit(_PAGE_HPAGE_BIT))#define _PAGE_USER (1 << xlate_pabit(_PAGE_USER_BIT)) -#define _PAGE_SPECIAL (_PAGE_DMB) +#define _PAGE_SPECIAL (1 << xlate_pabit(_PAGE_SPECIAL_BIT))#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | _PAGE_DIRTY | _PAGE_ACCESSED)#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_SPECIAL)
arch/parisc/kernel/entry.S +8 -0
@@ -499,6 +499,10 @@ * Finally, _PAGE_READ goes in the top bit of PL1 (so we * trigger an access rights trap in user space if the user * tries to read an unreadable page */ +#if _PAGE_SPECIAL_BIT == _PAGE_DMB_BIT + /* need to drop DMB bit, as it's used as SPECIAL flag */ + depi 0,_PAGE_SPECIAL_BIT,1,\pte +#endif depd \pte,8,7,\prot /* PAGE_USER indicates the page can be read with user privileges,
@@ -529,6 +533,10 @@ * makes the tlb entry for the differently formatted pa11 * insertion instructions */ .macro make_insert_tlb_11 spc,pte,prot +#if _PAGE_SPECIAL_BIT == _PAGE_DMB_BIT + /* need to drop DMB bit, as it's used as SPECIAL flag */ + depi 0,_PAGE_SPECIAL_BIT,1,\pte +#endif zdep \spc,30,15,\prot dep \pte,8,7,\prot extru,= \pte,_PAGE_NO_CACHE_BIT,1,%r0
Greg Kroah-Hartman
maintainerPATCH 96/862 NFSD: Protect against send buffer overflow in NFSv3 READDIR
In reply to Greg Kroah-HartmanFrom: Chuck Lever <[email protected]>
commit 640f87c190e0d1b2a0fcb2ecf6d2cd53b1c41991 upstream.
Since before the git era, NFSD has conserved the number of pages held by each nfsd thread by combining the RPC receive and send buffers into a single array of pages. This works because there are no cases where an operation needs a large RPC Call message and a large RPC Reply message at the same time.
Once an RPC Call has been received, svc_process() updates svc_rqst::rq_res to describe the part of rq_pages that can be used for constructing the Reply. This means that the send buffer (rq_res) shrinks when the received RPC record containing the RPC Call is large.
A client can force this shrinkage on TCP by sending a correctly- formed RPC Call header contained in an RPC record that is excessively large. The full maximum payload size cannot be constructed in that case.
Thanks to Aleksi Illikainen and Kari Hulkko for uncovering this issue.
--- fs/nfsd/nfs3proc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
fs/nfsd/nfs3proc.c +4 -3
@@ -563,13 +563,14 @@ static void nfsd3_init_dirlist_pages(str {struct xdr_buf *buf = &resp->dirlist;struct xdr_stream *xdr = &resp->xdr; - - count =clamp (count, (u32)(XDR_UNIT *2 ),svc_max_payload (rqstp)); + unsigned int sendbuf = min_t(unsigned int, rqstp->rq_res.buflen, +svc_max_payload (rqstp));memset (buf,0 ,sizeof (*buf));/* Reserve room for the NULL ptr & eof flag (-2 words) */ - buf->buflen = count -XDR_UNIT *2 ; + buf->buflen =clamp (count, (u32)(XDR_UNIT *2 ), sendbuf); + buf->buflen -=XDR_UNIT *2 ; buf->pages = rqstp->rq_next_page; rqstp->rq_next_page += (buf->buflen +PAGE_SIZE -1 ) >>PAGE_SHIFT ;
Greg Kroah-Hartman
maintainerPATCH 64/862 riscv: always honor the CONFIG_CMDLINE_FORCE when parsing dtb
In reply to Greg Kroah-HartmanFrom: Wenting Zhang <[email protected]>
commit 10f6913c548b32ecb73801a16b120e761c6957ea upstream.
When CONFIG_CMDLINE_FORCE is enabled, cmdline provided by CONFIG_CMDLINE are always used. This allows CONFIG_CMDLINE to be used regardless of the result of device tree scanning.
This especially fixes the case where a device tree without the chosen node is supplied to the kernel. In such cases, early_init_dt_scan would return true. But inside early_init_dt_scan_chosen, the cmdline won't be updated as there is no chosen node in the device tree. As a result, CONFIG_CMDLINE is not copied into boot_command_line even if CONFIG_CMDLINE_FORCE is enabled. This commit allows properly update boot_command_line in this situation.
--- arch/riscv/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/kernel/setup.c +2 -2
@@ -252,10 +252,10 @@ static void __init parse_dtb(void)pr_info ("Machine model: %s\n" , name);dump_stack_set_arch_desc ("%s (DT)" , name); } -return ; + }else { +pr_err ("No DTB passed to the kernel\n" ); } -pr_err ("No DTB passed to the kernel\n" );#ifdef CONFIG_CMDLINE_FORCE strscpy (boot_command_line,CONFIG_CMDLINE ,COMMAND_LINE_SIZE );pr_info ("Forcing kernel command line to: %s\n" , boot_command_line);
Greg Kroah-Hartman
maintainerPATCH 61/862 riscv: vdso: fix NULL deference in vdso_join_timens() when vfork
In reply to Greg Kroah-HartmanFrom: Jisheng Zhang <[email protected]>
commit a8616d2dc193b6becc36b5f3cfeaa9ac7a5762f9 upstream.
Testing tools/testing/selftests/timens/vfork_exec.c got below kernel log:
[ 6.838454] Unable to handle kernel access to user memory without uaccess routines at virtual address 0000000000000020 [ 6.842255] Oops [#1] [ 6.842871] Modules linked in: [ 6.844249] CPU: 1 PID: 64 Comm: vfork_exec Not tainted 6.0.0-rc3-rt15+ #8 [ 6.845861] Hardware name: riscv-virtio,qemu (DT) [ 6.848009] epc : vdso_join_timens+0xd2/0x110 [ 6.850097] ra : vdso_join_timens+0xd2/0x110 [ 6.851164] epc : ffffffff8000635c ra : ffffffff8000635c sp : ff6000000181fbf0 [ 6.852562] gp : ffffffff80cff648 tp : ff60000000fdb700 t0 : 3030303030303030 [ 6.853852] t1 : 0000000000000030 t2 : 3030303030303030 s0 : ff6000000181fc40 [ 6.854984] s1 : ff60000001e6c000 a0 : 0000000000000010 a1 : ffffffff8005654c [ 6.856221] a2 : 00000000ffffefff a3 : 0000000000000000 a4 : 0000000000000000 [ 6.858114] a5 : 0000000000000000 a6 : 0000000000000008 a7 : 0000000000000038 [ 6.859484] s2 : ff60000001e6c068 s3 : ff6000000108abb0 s4 : 0000000000000000 [ 6.860751] s5 : 0000000000001000 s6 : ffffffff8089dc40 s7 : ffffffff8089dc38 [ 6.862029] s8 : ffffffff8089dc30 s9 : ff60000000fdbe38 s10: 000000000000005e [ 6.863304] s11: ffffffff80cc3510 t3 : ffffffff80d1112f t4 : ffffffff80d1112f [ 6.864565] t5 : ffffffff80d11130 t6 : ff6000000181fa00 [ 6.865561] status: 0000000000000120 badaddr: 0000000000000020 cause: 000000000000000d [ 6.868046] [<ffffffff8008dc94>] timens_commit+0x38/0x11a [ 6.869089] [<ffffffff8008dde8>] timens_on_fork+0x72/0xb4 [ 6.870055] [<ffffffff80190096>] begin_new_exec+0x3c6/0x9f0 [ 6.871231] [<ffffffff801d826c>] load_elf_binary+0x628/0x1214 [ 6.872304] [<ffffffff8018ee7a>] bprm_execve+0x1f2/0x4e4 [ 6.873243] [<ffffffff8018f90c>] do_execveat_common+0x16e/0x1ee [ 6.874258] [<ffffffff8018f9c8>] sys_execve+0x3c/0x48 [ 6.875162] [<ffffffff80003556>] ret_from_syscall+0x0/0x2 [ 6.877484] ---[ end trace 0000000000000000 ]---
This is because the mm->context.vdso_info is NULL in vfork case. From another side, mm->context.vdso_info either points to vdso info for RV64 or vdso info for compat, there's no need to bloat riscv's mm_context_t, we can handle the difference when setup the additional page for vdso.
--- arch/riscv/include/asm/mmu.h | 1 - arch/riscv/kernel/vdso.c | 13 ++++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-)
arch/riscv/include/asm/mmu.h +0 -1
@@ -16,7 +16,6 @@ typedef struct {atomic_long_t id;#endif void *vdso; -void *vdso_info;#ifdef CONFIG_SMP /* A local icache flush is needed before user execution can resume. */ cpumask_t icache_stale_mask;
arch/riscv/kernel/vdso.c +10 -3
@@ -60,6 +60,11 @@ struct __vdso_info {struct vm_special_mapping *cm; }; +static struct __vdso_info vdso_info; +#ifdef CONFIG_COMPAT +static struct __vdso_info compat_vdso_info; +#endif +static int vdso_mremap (const struct vm_special_mapping *sm,struct vm_area_struct *new_vma) {
@@ -114,15 +119,18 @@ int vdso_join_timens(struct task_struct {struct mm_struct *mm = task->mm;struct vm_area_struct *vma; -struct __vdso_info *vdso_info = mm->context.vdso_info;mmap_read_lock (mm);for (vma = mm->mmap; vma; vma = vma->vm_next) {unsigned long size = vma->vm_end - vma->vm_start; -if (vma_is_special_mapping (vma, vdso_info->dm)) +if (vma_is_special_mapping (vma, vdso_info.dm))zap_page_range (vma, vma->vm_start, size); +#ifdef CONFIG_COMPAT +if (vma_is_special_mapping (vma, compat_vdso_info.dm)) +zap_page_range (vma, vma->vm_start, size); +#endif }mmap_read_unlock (mm);
@@ -264,7 +272,6 @@ static int __setup_additional_pages(stru vdso_base +=VVAR_SIZE ; mm->context.vdso = (void *)vdso_base; - mm->context.vdso_info = (void *)vdso_info; ret = _install_special_mapping(mm, vdso_base, vdso_text_len,
Greg Kroah-Hartman
maintainerPATCH 58/862 RISC-V: Make port I/O string accessors actually work
In reply to Greg Kroah-HartmanFrom: Maciej W. Rozycki <[email protected]>
commit 9cc205e3c17d5716da7ebb7fa0c985555e95d009 upstream.
Fix port I/O string accessors such as insb', outsb', etc. which use the physical PCI port I/O address rather than the corresponding memory mapping to get at the requested location, which in turn breaks at least accesses made by our parport driver to a PCIe parallel port such as:
PCI parallel port detected: 1415:c118, I/O at 0x1000(0x1008), IRQ 20
parport0: PC-style at 0x1000 (0x1008), irq 20, using FIFO [PCSPP,TRISTATE,COMPAT,EPP,ECP]
causing a memory access fault:
Unable to handle kernel access to user memory without uaccess routines at virtual address 0000000000001008 Oops [#1] Modules linked in: CPU: 1 PID: 350 Comm: cat Not tainted 6.0.0-rc2-00283-g10d4879f9ef0-dirty #23 Hardware name: SiFive HiFive Unmatched A00 (DT) epc : parport_pc_fifo_write_block_pio+0x266/0x416 ra : parport_pc_fifo_write_block_pio+0xb4/0x416
epc : ffffffff80542c3e ra : ffffffff80542a8c sp : ffffffd88899fc60
gp : ffffffff80fa2700 tp : ffffffd882b1e900 t0 : ffffffd883d0b000 t1 : ffffffffff000002 t2 : 4646393043330a38 s0 : ffffffd88899fcf0 s1 : 0000000000001000 a0 : 0000000000000010 a1 : 0000000000000000 a2 : ffffffd883d0a010 a3 : 0000000000000023 a4 : 00000000ffff8fbb a5 : ffffffd883d0a001 a6 : 0000000100000000 a7 : ffffffc800000000 s2 : ffffffffff000002 s3 : ffffffff80d28880 s4 : ffffffff80fa1f50 s5 : 0000000000001008 s6 : 0000000000000008 s7 : ffffffd883d0a000 s8 : 0004000000000000 s9 : ffffffff80dc1d80 s10: ffffffd8807e4000
s11: 0000000000000000 t3 : 00000000000000ff t4 : 393044410a303930 t5 : 0000000000001000 t6 : 0000000000040000
status: 0000000200000120 badaddr: 0000000000001008 cause: 000000000000000f
[<ffffffff80543212>] parport_pc_compat_write_block_pio+0xfe/0x200 [<ffffffff8053bbc0>] parport_write+0x46/0xf8 [<ffffffff8050530e>] lp_write+0x158/0x2d2 [<ffffffff80185716>] vfs_write+0x8e/0x2c2 [<ffffffff80185a74>] ksys_write+0x52/0xc2 [<ffffffff80185af2>] sys_write+0xe/0x16 [<ffffffff80003770>] ret_from_syscall+0x0/0x2 ---[ end trace 0000000000000000 ]---
For simplicity address the problem by adding PCI_IOBASE to the physical address requested in the respective wrapper macros only, observing that the raw accessors such as __insb', __outsb', etc. are not supposed to be used other than by said macros. Remove the cast to long' that is no longer needed on addr' now that it is used as an offset from PCI_IOBASE and add parentheses around `addr' needed for predictable evaluation in macro expansion. No need to make said adjustments in separate changes given that current code is gravely broken and does not ever work.
--- arch/riscv/include/asm/io.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/riscv/include/asm/io.h +8 -8
@@ -101,9 +101,9 @@ __io_reads_ins(reads, u32, l, __io_br(), __io_reads_ins(ins, u8, b, __io_pbr(), __io_par(addr)) __io_reads_ins(ins, u16, w, __io_pbr(), __io_par(addr)) __io_reads_ins(ins, u32, l, __io_pbr(), __io_par(addr)) -#define insb (addr, buffer, count) __insb((void __iomem *)(long)addr, buffer, count) -#define insw (addr, buffer, count) __insw((void __iomem *)(long)addr, buffer, count) -#define insl (addr, buffer, count) __insl((void __iomem *)(long)addr, buffer, count) +#define insb (addr, buffer, count) __insb(PCI_IOBASE + (addr), buffer, count) +#define insw (addr, buffer, count) __insw(PCI_IOBASE + (addr), buffer, count) +#define insl (addr, buffer, count) __insl(PCI_IOBASE + (addr), buffer, count) __io_writes_outs(writes, u8, b, __io_bw(), __io_aw())__io_writes_outs (writes, u16, w,__io_bw (),__io_aw ())
@@ -115,22 +115,22 @@ __io_writes_outs(writes, u32, l, __io_bw __io_writes_outs(outs, u8, b, __io_pbw(), __io_paw()) __io_writes_outs(outs, u16, w, __io_pbw(), __io_paw()) __io_writes_outs(outs, u32, l, __io_pbw(), __io_paw()) -#define outsb (addr, buffer, count) __outsb((void __iomem *)(long)addr, buffer, count) -#define outsw (addr, buffer, count) __outsw((void __iomem *)(long)addr, buffer, count) -#define outsl (addr, buffer, count) __outsl((void __iomem *)(long)addr, buffer, count) +#define outsb (addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count) +#define outsw (addr, buffer, count) __outsw(PCI_IOBASE + (addr), buffer, count) +#define outsl (addr, buffer, count) __outsl(PCI_IOBASE + (addr), buffer, count)#ifdef CONFIG_64BIT __io_reads_ins(reads, u64, q, __io_br(), __io_ar(addr))#define readsq (addr, buffer, count) __readsq(addr, buffer, count) __io_reads_ins(ins, u64, q, __io_pbr(), __io_par(addr)) -#define insq (addr, buffer, count) __insq((void __iomem *)addr, buffer, count) +#define insq (addr, buffer, count) __insq(PCI_IOBASE + (addr), buffer, count) __io_writes_outs(writes, u64, q, __io_bw(), __io_aw())#define writesq (addr, buffer, count) __writesq(addr, buffer, count) __io_writes_outs(outs, u64, q, __io_pbr(), __io_paw()) -#define outsq (addr, buffer, count) __outsq((void __iomem *)addr, buffer, count) +#define outsq (addr, buffer, count) __outsq(PCI_IOBASE + (addr), buffer, count)#endif #include <asm-generic/io.h>
Greg Kroah-Hartman
maintainerPATCH 84/862 mm/damon: validate if the pmd entry is present before accessing
In reply to Greg Kroah-HartmanFrom: Baolin Wang <[email protected]>
commit c8b9aff419303e4d4219b5ff64b1c7e062dee48e upstream.
pmd_huge() is used to validate if the pmd entry is mapped by a huge page, also including the case of non-present (migration or hwpoisoned) pmd entry on arm64 or x86 architectures. This means that pmd_pfn() can not get the correct pfn number for a non-present pmd entry, which will cause damon_get_page() to get an incorrect page struct (also may be NULL by pfn_to_online_page()), making the access statistics incorrect.
This means that the DAMON may make incorrect decision according to the incorrect statistics, for example, DAMON may can not reclaim cold page in time due to this cold page was regarded as accessed mistakenly if DAMOS_PAGEOUT operation is specified.
Moreover it does not make sense that we still waste time to get the page of the non-present entry. Just treat it as not-accessed and skip it, which maintains consistency with non-present pte level entries.
So add pmd entry present validation to fix the above issues.
--- mm/damon/vaddr.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
mm/damon/vaddr.c +10 -0
@@ -304,6 +304,11 @@ static int damon_mkold_pmd_entry(pmd_t *if (pmd_huge (*pmd)) { ptl =pmd_lock (walk->mm, pmd); +if (!pmd_present (*pmd)) { +spin_unlock (ptl); +return 0 ; + } +if (pmd_huge (*pmd)) {damon_pmdp_mkold (pmd, walk->mm, addr);spin_unlock (ptl);
@@ -431,6 +436,11 @@ static int damon_young_pmd_entry(pmd_t *#ifdef CONFIG_TRANSPARENT_HUGEPAGE if (pmd_huge (*pmd)) { ptl =pmd_lock (walk->mm, pmd); +if (!pmd_present (*pmd)) { +spin_unlock (ptl); +return 0 ; + } +if (!pmd_huge (*pmd)) {spin_unlock (ptl); goto regular_page;
Greg Kroah-Hartman
maintainerPATCH 59/862 parisc: fbdev/stifb: Align graphics memory size to 4MB
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit aca7c13d3bee81a968337a5515411409ae9d095d upstream.
Independend of the current graphics resolution, adjust the reported graphics card memory size to the next 4MB boundary.
This fixes the fbtest program which expects a naturally aligned size.
--- drivers/video/fbdev/stifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/stifb.c +1 -1
@@ -1298,7 +1298,7 @@ static int __init stifb_init_fb(struct s/* limit fbsize to max visible screen size */ if (fix->smem_len > yres*fix->line_length) - fix->smem_len = yres*fix->line_length; + fix->smem_len =ALIGN (yres*fix->line_length,4 *1024 *1024 ); fix->accel =FB_ACCEL_NONE ;
Greg Kroah-Hartman
maintainerPATCH 65/862 riscv: Pass -mno-relax only on lld < 15.0.0
In reply to Greg Kroah-HartmanFrom: Fangrui Song <[email protected]>
commit 3cebf80e9a0d3adcb174053be32c88a640b3344b upstream.
lld since llvm:6611d58f5bbc ("[ELF] Relax R_RISCV_ALIGN"), which will be included in the 15.0.0 release, has implemented some RISC-V linker relaxation. -mno-relax is no longer needed in KBUILD_CFLAGS/KBUILD_AFLAGS to suppress R_RISCV_ALIGN which older lld can not handle:
ld.lld: error: capability.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax but the .o is already compiled with -mno-relax
--- arch/riscv/Makefile | 2 ++ 1 file changed, 2 insertions(+)
arch/riscv/Makefile +2 -0
@@ -37,6 +37,7 @@ else endif ifeq ($(CONFIG_LD_IS_LLD),y) +ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 150000; echo $$?),0) KBUILD_CFLAGS += -mno-relax KBUILD_AFLAGS += -mno-relax ifndef CONFIG_AS_IS_LLVM
@@ -44,6 +45,7 @@ ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS += -Wa,-mno-relax endif endif +endif # ISA string setting riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
Greg Kroah-Hartman
maintainerPATCH 32/862 mmc: core: Add SD card quirk for broken discard
In reply to Greg Kroah-HartmanFrom: Avri Altman <[email protected]>
commit 07d2872bf4c864eb83d034263c155746a2fb7a3b upstream.
Some SD-cards from Sandisk that are SDA-6.0 compliant reports they supports discard, while they actually don't. This might cause mk2fs to fail while trying to format the card and revert it to a read-only mode.
To fix this problem, let's add a card quirk (MMC_QUIRK_BROKEN_SD_DISCARD) to indicate that we shall fall-back to use the legacy erase command instead.
--- drivers/mmc/core/block.c | 6 +++++- drivers/mmc/core/card.h | 6 ++++++ drivers/mmc/core/quirks.h | 6 ++++++ include/linux/mmc/card.h | 1 + 4 files changed, 18 insertions(+), 1 deletion(-)
drivers/mmc/core/block.c +5 -1
@@ -1140,8 +1140,12 @@ static void mmc_blk_issue_discard_rq(str {struct mmc_blk_data *md = mq->blkdata;struct mmc_card *card = md->queue.card; +unsigned int arg = card->erase_arg; -mmc_blk_issue_erase_rq (mq, req,MMC_BLK_DISCARD , card->erase_arg); +if (mmc_card_broken_sd_discard (card)) + arg =SD_ERASE_ARG ; + +mmc_blk_issue_erase_rq (mq, req,MMC_BLK_DISCARD , arg); } static void mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq,
drivers/mmc/core/card.h +6 -0
@@ -73,6 +73,7 @@ struct mmc_fixup {#define EXT_CSD_REV_ANY (-1u)#define CID_MANFID_SANDISK 0x2 +#define CID_MANFID_SANDISK_SD 0x3#define CID_MANFID_ATP 0x9#define CID_MANFID_TOSHIBA 0x11#define CID_MANFID_MICRON 0x13
@@ -258,4 +259,9 @@ static inline int mmc_card_broken_hpi(co return c->quirks & MMC_QUIRK_BROKEN_HPI; } +static inline int mmc_card_broken_sd_discard (const struct mmc_card *c) +{ +return c->quirks &MMC_QUIRK_BROKEN_SD_DISCARD ; +} +#endif
drivers/mmc/core/quirks.h +6 -0
@@ -100,6 +100,12 @@ static const struct mmc_fixup __maybe_unMMC_FIXUP ("V10016" ,CID_MANFID_KINGSTON ,CID_OEMID_ANY , add_quirk_mmc,MMC_QUIRK_TRIM_BROKEN ), +/* +* Some SD cards reports discard support while they don't +*/ +MMC_FIXUP (CID_NAME_ANY ,CID_MANFID_SANDISK_SD ,0x5344 , add_quirk_sd, +MMC_QUIRK_BROKEN_SD_DISCARD ), + END_FIXUP };
include/linux/mmc/card.h +1 -0
@@ -293,6 +293,7 @@ struct mmc_card {#define MMC_QUIRK_BROKEN_IRQ_POLLING (1<<11)/* Polling SDIO_CCCR_INTx could create a fake interrupt */ #define MMC_QUIRK_TRIM_BROKEN (1<<12)/* Skip trim */ #define MMC_QUIRK_BROKEN_HPI (1<<13)/* Disable broken HPI support */ +#define MMC_QUIRK_BROKEN_SD_DISCARD (1<<14)/* Disable broken SD discard support */ bool reenable_cmdq;/* Re-enable Command Queue */
Greg Kroah-Hartman
maintainerPATCH 86/862 mm/mmap: undo ->mmap() when arch_validate_flags() fails
In reply to Greg Kroah-HartmanFrom: Carlos Llamas <[email protected]>
commit deb0f6562884b5b4beb883d73e66a7d3a1b96d99 upstream.
Commit c462ac288f2c ("mm: Introduce arch_validate_flags()") added a late check in mmap_region() to let architectures validate vm_flags. The check needs to happen after calling ->mmap() as the flags can potentially be modified during this callback.
If arch_validate_flags() check fails we unmap and free the vma. However, the error path fails to undo the ->mmap() call that previously succeeded and depending on the specific ->mmap() implementation this translates to reference increments, memory allocations and other operations what will not be cleaned up.
There are several places (mainly device drivers) where this is an issue. However, one specific example is bpf_map_mmap() which keeps count of the mappings in map->writecnt. The count is incremented on ->mmap() and then decremented on vm_ops->close(). When arch_validate_flags() fails this count is off since bpf_map_mmap_close() is never called.
One can reproduce this issue in arm64 devices with MTE support. Here the vm_flags are checked to only allow VM_MTE if VM_MTE_ALLOWED has been set previously. From userspace then is enough to pass the PROT_MTE flag to mmap() syscall to trigger the arch_validate_flags() failure.
The following program reproduces this issue:
#include <stdio.h> #include <unistd.h> #include <linux/unistd.h> #include <linux/bpf.h> #include <sys/mman.h>
int main(void)
{
union bpf_attr attr = {
.map_type = BPF_MAP_TYPE_ARRAY,
.key_size = sizeof(int),
.value_size = sizeof(long long),
.max_entries = 256,
.map_flags = BPF_F_MMAPABLE,
};
int fd;
fd = syscall(__NR_bpf, BPF_MAP_CREATE, &attr, sizeof(attr));
mmap(NULL, 4096, PROT_WRITE | PROT_MTE, MAP_SHARED, fd, 0);
return 0;}
By manually adding some log statements to the vm_ops callbacks we can confirm that when passing PROT_MTE to mmap() the map->writecnt is off upon ->release():
With PROT_MTE flag:
root@debian:~# ./bpf-test [ 111.263874] bpf_map_write_active_inc: map=9 writecnt=1 [ 111.288763] bpf_map_release: map=9 writecnt=1
Without PROT_MTE flag:
root@debian:~# ./bpf-test [ 157.816912] bpf_map_write_active_inc: map=10 writecnt=1 [ 157.830442] bpf_map_write_active_dec: map=10 writecnt=0 [ 157.832396] bpf_map_release: map=10 writecnt=0
This patch fixes the above issue by calling vm_ops->close() when the arch_validate_flags() check fails, after this we can proceed to unmap and free the vma on the error path.
--- mm/mmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
mm/mmap.c +4 -1
@@ -1797,7 +1797,7 @@ unsigned long mmap_region(struct file *fif (!arch_validate_flags (vma->vm_flags)) { error = -EINVAL ;if (file) - goto unmap_and_free_vma; + goto close_and_free_vma;else goto free_vma; }
@@ -1844,6 +1844,9 @@ out:return addr; +close_and_free_vma: +if (vma->vm_ops && vma->vm_ops->close) + vma->vm_ops->close (vma); unmap_and_free_vma:fput (vma->vm_file); vma->vm_file =NULL ;
Greg Kroah-Hartman
maintainerPATCH 92/862 serial: Deassert Transmit Enable on probe in driver-specific way
In reply to Greg Kroah-HartmanFrom: Lukas Wunner <[email protected]>
commit 7c7f9bc986e698873b489c371a08f206979d06b7 upstream.
When a UART port is newly registered, uart_configure_port() seeks to deassert RS485 Transmit Enable by setting the RTS bit in port->mctrl. However a number of UART drivers interpret a set RTS bit as *assertion* instead of deassertion: Affected drivers include those using serial8250_em485_config() (except 8250_bcm2835aux.c) and some using mctrl_gpio (e.g. imx.c).
Since the interpretation of the RTS bit is driver-specific, it is not suitable as a means to centrally deassert Transmit Enable in the serial core. Instead, the serial core must call on drivers to deassert it in their driver-specific way. One way to achieve that is to call ->rs485_config(). It implicitly deasserts Transmit Enable.
So amend uart_configure_port() and uart_resume_port() to invoke uart_rs485_config(). That allows removing calls to uart_rs485_config() from drivers' ->probe() hooks and declaring the function static.
Skip any invocation of ->set_mctrl() if RS485 is enabled. RS485 has no hardware flow control, so the modem control lines are irrelevant and need not be touched. When leaving RS485 mode, reset the modem control lines to the state stored in port->mctrl. That way, UARTs which are muxed between RS485 and RS232 transceivers drive the lines correctly when switched to RS232. (serial8250_do_startup() historically raises the OUT1 modem signal because otherwise interrupts are not signaled on ancient PC UARTs, but I believe that no longer applies to modern, RS485-capable UARTs and is thus safe to be skipped.)
imx.c modifies port->mctrl whenever Transmit Enable is asserted and deasserted. Stop it from doing that so port->mctrl reflects the RS232 line state.
8250_omap.c deasserts Transmit Enable on ->runtime_resume() by calling ->set_mctrl(). Because that is now a no-op in RS485 mode, amend the function to call serial8250_em485_stop_tx().
fsl_lpuart.c retrieves and applies the RS485 device tree properties after registering the UART port. Because applying now happens on registration in uart_configure_port(), move retrieval of the properties ahead of uart_add_one_port().
--- drivers/tty/serial/8250/8250_omap.c | 3 +++ drivers/tty/serial/8250/8250_pci.c | 9 +-------- drivers/tty/serial/8250/8250_port.c | 12 +++++++----- drivers/tty/serial/fsl_lpuart.c | 10 ++++------ drivers/tty/serial/imx.c | 8 ++------ drivers/tty/serial/serial_core.c | 36 ++++++++++++++++++++---------------- include/linux/serial_core.h | 1 - 7 files changed, 37 insertions(+), 42 deletions(-)
drivers/tty/serial/8250/8250_omap.c +3 -0
@@ -342,6 +342,9 @@ static void omap8250_restore_regs(structomap8250_update_mdr1 (up, priv); up->port.ops->set_mctrl (&up->port, up->port.mctrl); + +if (up->port.rs485.flags &SER_RS485_ENABLED ) +serial8250_em485_stop_tx (up); }/*
drivers/tty/serial/8250/8250_pci.c +1 -8
@@ -1627,7 +1627,6 @@ static int pci_fintek_init(struct pci_deresource_size_t bar_data[3 ];u8 config_base;struct serial_private *priv =pci_get_drvdata (dev); -struct uart_8250_port *port; if (!(pci_resource_flags(dev, 5) & IORESOURCE_IO) || !(pci_resource_flags(dev, 4) & IORESOURCE_IO) ||
@@ -1674,13 +1673,7 @@ static int pci_fintek_init(struct pci_depci_write_config_byte (dev, config_base +0x06 , dev->irq); -if (priv) { -/* re-apply RS232/485 mode when -* pciserial_resume_ports() -*/ - port =serial8250_get_port (priv->line[i]); -uart_rs485_config (&port->port); - }else { +if (!priv) {/* First init without port data * force init to RS232 Mode */
drivers/tty/serial/8250/8250_port.c +7 -5
@@ -600,7 +600,7 @@ EXPORT_SYMBOL_GPL(serial8250_rpm_put);static int serial8250_em485_init (struct uart_8250_port *p) {if (p->em485) -return 0 ; + goto deassert_rts; p->em485 =kmalloc (sizeof (struct uart_8250_em485 ),GFP_ATOMIC );if (!p->em485)
@@ -616,7 +616,9 @@ static int serial8250_em485_init(struct p->em485->active_timer =NULL ; p->em485->tx_stopped = true; - p->rs485_stop_tx (p); +deassert_rts: +if (p->em485->tx_stopped) + p->rs485_stop_tx (p);return 0 ; }
@@ -2042,6 +2044,9 @@ EXPORT_SYMBOL_GPL(serial8250_do_set_mctrstatic void serial8250_set_mctrl (struct uart_port *port,unsigned int mctrl) { +if (port->rs485.flags &SER_RS485_ENABLED ) +return ; +if (port->set_mctrl) port->set_mctrl (port, mctrl);else
@@ -3187,9 +3192,6 @@ static void serial8250_config_port(strucif (flags &UART_CONFIG_TYPE )autoconfig (up); -if (port->rs485.flags &SER_RS485_ENABLED ) -uart_rs485_config (port); -/* if access method is AU, it is a 16550 with a quirk */ if (port->type ==PORT_16550A && port->iotype ==UPIO_AU ) up->bugs |=UART_BUG_NOMSR ;
drivers/tty/serial/fsl_lpuart.c +4 -6
@@ -2729,15 +2729,13 @@ static int lpuart_probe(struct platform_if (ret) goto failed_reset; - ret =uart_add_one_port (&lpuart_reg, &sport->port); -if (ret) - goto failed_attach_port; - ret =uart_get_rs485_mode (&sport->port);if (ret) goto failed_get_rs485; -uart_rs485_config (&sport->port); + ret =uart_add_one_port (&lpuart_reg, &sport->port); +if (ret) + goto failed_attach_port; ret =devm_request_irq (&pdev->dev, sport->port.irq, handler,0 ,DRIVER_NAME , sport);
@@ -2747,9 +2745,9 @@ static int lpuart_probe(struct platform_return 0 ; failed_irq_request: -failed_get_rs485:uart_remove_one_port (&lpuart_reg, &sport->port); failed_attach_port: +failed_get_rs485: failed_reset:lpuart_disable_clks (sport);return ret;
drivers/tty/serial/imx.c +2 -6
@@ -380,8 +380,7 @@ static void imx_uart_rts_active(struct i { *ucr2 &= ~(UCR2_CTSC |UCR2_CTS ); - sport->port.mctrl |=TIOCM_RTS ; -mctrl_gpio_set (sport->gpios, sport->port.mctrl); +mctrl_gpio_set (sport->gpios, sport->port.mctrl |TIOCM_RTS ); }/* called with port.lock taken and irqs caller dependent */
@@ -390,8 +389,7 @@ static void imx_uart_rts_inactive(struct *ucr2 &= ~UCR2_CTSC ; *ucr2 |=UCR2_CTS ; - sport->port.mctrl &= ~TIOCM_RTS ; -mctrl_gpio_set (sport->gpios, sport->port.mctrl); +mctrl_gpio_set (sport->gpios, sport->port.mctrl & ~TIOCM_RTS ); }static void start_hrtimer_ms (struct hrtimer *hrt,unsigned long msec)
@@ -2347,8 +2345,6 @@ static int imx_uart_probe(struct platfordev_err (&pdev->dev,"low-active RTS not possible when receiver is off, enabling receiver\n" ); -uart_rs485_config (&sport->port); -/* Disable interrupts before requesting them */ ucr1 =imx_uart_readl (sport,UCR1 ); ucr1 &= ~(UCR1_ADEN |UCR1_TRDYEN |UCR1_IDEN |UCR1_RRDYEN |UCR1_RTSDEN );
drivers/tty/serial/serial_core.c +20 -16
@@ -158,15 +158,10 @@ uart_update_mctrl(struct uart_port *portunsigned long flags;unsigned int old; -if (port->rs485.flags &SER_RS485_ENABLED ) { - set &= ~TIOCM_RTS ; - clear &= ~TIOCM_RTS ; - } -spin_lock_irqsave (&port->lock, flags); old = port->mctrl; port->mctrl = (old & ~clear) | set; -if (old != port->mctrl) +if (old != port->mctrl && !(port->rs485.flags &SER_RS485_ENABLED )) port->ops->set_mctrl (port, port->mctrl);spin_unlock_irqrestore (&port->lock, flags); }
@@ -1391,7 +1386,7 @@ static void uart_set_rs485_termination(s !!(rs485->flags & SER_RS485_TERMINATE_BUS)); } -int uart_rs485_config (struct uart_port *port) +static int uart_rs485_config (struct uart_port *port) {struct serial_rs485 *rs485 = &port->rs485;int ret;
@@ -1405,7 +1400,6 @@ int uart_rs485_config(struct uart_port *return ret; } -EXPORT_SYMBOL_GPL (uart_rs485_config);static int uart_get_rs485_config (struct uart_port *port,struct serial_rs485 __user *rs485)
@@ -1444,8 +1438,13 @@ static int uart_set_rs485_config(structspin_lock_irqsave (&port->lock, flags); ret = port->rs485_config (port, &tty->termios, &rs485); -if (!ret) +if (!ret) { port->rs485 = rs485; + +/* Reset RTS and other mctrl lines when disabling RS485 */ +if (!(rs485.flags &SER_RS485_ENABLED )) + port->ops->set_mctrl (port, port->mctrl); + }spin_unlock_irqrestore (&port->lock, flags);if (ret)return ret;
@@ -2352,7 +2351,8 @@ int uart_suspend_port(struct uart_driverspin_lock_irq (&uport->lock); ops->stop_tx (uport); - ops->set_mctrl (uport,0 ); +if (!(uport->rs485.flags &SER_RS485_ENABLED )) + ops->set_mctrl (uport,0 );/* save mctrl so it can be restored on resume */ mctrl = uport->mctrl; uport->mctrl =0 ;
@@ -2440,7 +2440,8 @@ int uart_resume_port(struct uart_driveruart_change_pm (state,UART_PM_STATE_ON );spin_lock_irq (&uport->lock); - ops->set_mctrl (uport,0 ); +if (!(uport->rs485.flags &SER_RS485_ENABLED )) + ops->set_mctrl (uport,0 );spin_unlock_irq (&uport->lock);if (console_suspend_enabled || !uart_console (uport)) {/* Protected by port mutex for now */
@@ -2451,7 +2452,10 @@ int uart_resume_port(struct uart_driverif (tty)uart_change_speed (tty, state,NULL );spin_lock_irq (&uport->lock); - ops->set_mctrl (uport, uport->mctrl); +if (!(uport->rs485.flags &SER_RS485_ENABLED )) + ops->set_mctrl (uport, uport->mctrl); +else +uart_rs485_config (uport); ops->start_tx (uport);spin_unlock_irq (&uport->lock);tty_port_set_initialized (port,1 );
@@ -2558,10 +2562,10 @@ uart_configure_port(struct uart_driver **/ spin_lock_irqsave (&port->lock, flags); port->mctrl &=TIOCM_DTR ; -if (port->rs485.flags &SER_RS485_ENABLED && - !(port->rs485.flags &SER_RS485_RTS_AFTER_SEND )) - port->mctrl |=TIOCM_RTS ; - port->ops->set_mctrl (port, port->mctrl); +if (!(port->rs485.flags &SER_RS485_ENABLED )) + port->ops->set_mctrl (port, port->mctrl); +else +uart_rs485_config (port);spin_unlock_irqrestore (&port->lock, flags);/*
include/linux/serial_core.h +0 -1
@@ -950,5 +950,4 @@ static inline int uart_handle_break(stru !((cflag) & CLOCAL))int uart_get_rs485_mode (struct uart_port *port); -int uart_rs485_config (struct uart_port *port);#endif /* LINUX_SERIAL_CORE_H */
Greg Kroah-Hartman
maintainerPATCH 93/862 serial: ar933x: Deassert Transmit Enable on ->rs485_config()
In reply to Greg Kroah-HartmanFrom: Lukas Wunner <[email protected]>
commit 3a939433ddc1bab98be028903aaa286e5e7461d7 upstream.
The ar933x_uart driver neglects to deassert Transmit Enable when ->rs485_config() is invoked. Fix it.
--- drivers/tty/serial/ar933x_uart.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/tty/serial/ar933x_uart.c +7 -0
@@ -583,6 +583,13 @@ static const struct uart_ops ar933x_uartstatic int ar933x_config_rs485 (struct uart_port *port,struct ktermios *termios,struct serial_rs485 *rs485conf) { +struct ar933x_uart_port *up = + container_of(port, struct ar933x_uart_port, port); + +if (port->rs485.flags &SER_RS485_ENABLED ) +gpiod_set_value (up->rts_gpiod, + !!(rs485conf->flags &SER_RS485_RTS_AFTER_SEND )); +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 62/862 riscv: Allow PROT_WRITE-only mmap()
In reply to Greg Kroah-HartmanFrom: Andrew Bresticker <[email protected]>
commit 9e2e6042a7ec6504fe8e366717afa2f40cf16488 upstream.
Commit 2139619bcad7 ("riscv: mmap with PROT_WRITE but no PROT_READ is invalid") made mmap() return EINVAL if PROT_WRITE was set wihtout PROT_READ with the justification that a write-only PTE is considered a reserved PTE permission bit pattern in the privileged spec. This check is unnecessary since we let VM_WRITE imply VM_READ on RISC-V, and it is inconsistent with other architectures that don't support write-only PTEs, creating a potential software portability issue. Just remove the check altogether and let PROT_WRITE imply PROT_READ as is the case on other architectures.
Note that this also allows PROT_WRITE|PROT_EXEC mappings which were disallowed prior to the aforementioned commit; PROT_READ is implied in such mappings as well.
--- arch/riscv/kernel/sys_riscv.c | 3 --- 1 file changed, 3 deletions(-)
arch/riscv/kernel/sys_riscv.c +0 -3
@@ -18,9 +18,6 @@ static long riscv_sys_mmap(unsigned longif (unlikely (offset & (~PAGE_MASK >> page_shift_offset)))return -EINVAL ; -if (unlikely ((prot &PROT_WRITE ) && !(prot &PROT_READ ))) -return -EINVAL ; -return ksys_mmap_pgoff (addr, len, prot, flags, fd, offset >> (PAGE_SHIFT - page_shift_offset)); }
Greg Kroah-Hartman
maintainerPATCH 63/862 riscv: Make VM_WRITE imply VM_READ
In reply to Greg Kroah-HartmanFrom: Andrew Bresticker <[email protected]>
commit 7ab72c597356be1e7f0f3d856e54ce78527f43c8 upstream.
RISC-V does not presently have write-only mappings as that PTE bit pattern is considered reserved in the privileged spec, so allow handling of read faults in VMAs that have VM_WRITE without VM_READ in order to be consistent with other architectures that have similar limitations.
--- arch/riscv/mm/fault.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/riscv/mm/fault.c +2 -1
@@ -184,7 +184,8 @@ static inline bool access_error(unsigned }break ;case EXC_LOAD_PAGE_FAULT : -if (!(vma->vm_flags &VM_READ )) { +/* Write implies read */ +if (!(vma->vm_flags & (VM_READ |VM_WRITE ))) {return true; }break ;
Greg Kroah-Hartman
maintainerPATCH 35/862 can: kvaser_usb_leaf: Fix TX queue out of sync after restart
In reply to Greg Kroah-HartmanFrom: Anssi Hannula <[email protected]>
commit 455561fb618fde40558776b5b8435f9420f335db upstream.
The TX queue seems to be implicitly flushed by the hardware during bus-off or bus-off recovery, but the driver does not reset the TX bookkeeping.
Despite not resetting TX bookkeeping the driver still re-enables TX queue unconditionally, leading to "cannot find free context" / NETDEV_TX_BUSY errors if the TX queue was full at bus-off time.
Fix that by resetting TX bookkeeping on CAN restart.
Tested with 0bfd:0124 Kvaser Mini PCI Express 2xHS FW 4.18.778.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 2 ++ drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb.h +2 -0
@@ -178,6 +178,8 @@ struct kvaser_usb_dev_cfg {extern const struct kvaser_usb_dev_ops kvaser_usb_hydra_dev_ops;extern const struct kvaser_usb_dev_ops kvaser_usb_leaf_dev_ops; +void kvaser_usb_unlink_tx_urbs (struct kvaser_usb_net_priv *priv); +int kvaser_usb_recv_cmd (const struct kvaser_usb *dev,void *cmd,int len,int *actual_len);
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +1 -1
@@ -477,7 +477,7 @@ static void kvaser_usb_reset_tx_urb_cont/* This method might sleep. Do not call it in the atomic context * of URB completions. */ -static void kvaser_usb_unlink_tx_urbs (struct kvaser_usb_net_priv *priv) +void kvaser_usb_unlink_tx_urbs (struct kvaser_usb_net_priv *priv) {usb_kill_anchored_urbs (&priv->tx_submitted);kvaser_usb_reset_tx_urb_contexts (priv);
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +2 -0
@@ -1426,6 +1426,8 @@ static int kvaser_usb_leaf_set_mode(struswitch (mode) {case CAN_MODE_START : +kvaser_usb_unlink_tx_urbs (priv); + err =kvaser_usb_leaf_simple_cmd_async (priv,CMD_START_CHIP );if (err)return err;
Greg Kroah-Hartman
maintainerPATCH 74/862 drm/virtio: Check whether transferred 2D BO is shmem
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
commit e473216b42aa1fd9fc6b94b608b42c210c655908 upstream.
Transferred 2D BO always must be a shmem BO. Add check for that to prevent NULL dereference if userspace passes a VRAM BO.
--- drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +1 -1
@@ -597,7 +597,7 @@ void virtio_gpu_cmd_transfer_to_host_2d(bool use_dma_api = !virtio_has_dma_quirk (vgdev->vdev);struct virtio_gpu_object_shmem *shmem =to_virtio_gpu_shmem (bo); -if (use_dma_api) +if (virtio_gpu_is_shmem (bo) && use_dma_api)dma_sync_sgtable_for_device (vgdev->vdev->dev.parent, shmem->pages,DMA_TO_DEVICE );
Greg Kroah-Hartman
maintainerPATCH 34/862 can: kvaser_usb_leaf: Fix overread with an invalid command
In reply to Greg Kroah-HartmanFrom: Anssi Hannula <[email protected]>
commit 1499ecaea9d2ba68d5e18d80573b4561a8dc4ee7 upstream.
For command events read from the device, kvaser_usb_leaf_read_bulk_callback() verifies that cmd->len does not exceed the size of the received data, but the actual kvaser_cmd handlers will happily read any kvaser_cmd fields without checking for cmd->len.
This can cause an overread if the last cmd in the buffer is shorter than expected for the command type (with cmd->len showing the actual short size).
Maximum overread seems to be 22 bytes (CMD_LEAF_LOG_MESSAGE), some of which are delivered to userspace as-is.
Fix that by verifying the length of command before handling it.
This issue can only occur after RX URBs have been set up, i.e. the interface has been opened at least once.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 75 +++++++++++++++++++++++ 1 file changed, 75 insertions(+)
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +75 -0
@@ -310,6 +310,38 @@ struct kvaser_cmd { } u; } __packed; +#define CMD_SIZE_ANY 0xff +#define kvaser_fsize (field) sizeof_field(struct kvaser_cmd, field) + +static const u8 kvaser_usb_leaf_cmd_sizes_leaf[] = { + [CMD_START_CHIP_REPLY ] =kvaser_fsize (u.simple), + [CMD_STOP_CHIP_REPLY ] =kvaser_fsize (u.simple), + [CMD_GET_CARD_INFO_REPLY ] =kvaser_fsize (u.cardinfo), + [CMD_TX_ACKNOWLEDGE ] =kvaser_fsize (u.tx_acknowledge_header), + [CMD_GET_SOFTWARE_INFO_REPLY ] =kvaser_fsize (u.leaf.softinfo), + [CMD_RX_STD_MESSAGE ] =kvaser_fsize (u.leaf.rx_can), + [CMD_RX_EXT_MESSAGE ] =kvaser_fsize (u.leaf.rx_can), + [CMD_LEAF_LOG_MESSAGE ] =kvaser_fsize (u.leaf.log_message), + [CMD_CHIP_STATE_EVENT ] =kvaser_fsize (u.leaf.chip_state_event), + [CMD_CAN_ERROR_EVENT ] =kvaser_fsize (u.leaf.error_event), +/* ignored events: */ + [CMD_FLUSH_QUEUE_REPLY ] =CMD_SIZE_ANY , +}; + +static const u8 kvaser_usb_leaf_cmd_sizes_usbcan[] = { + [CMD_START_CHIP_REPLY ] =kvaser_fsize (u.simple), + [CMD_STOP_CHIP_REPLY ] =kvaser_fsize (u.simple), + [CMD_GET_CARD_INFO_REPLY ] =kvaser_fsize (u.cardinfo), + [CMD_TX_ACKNOWLEDGE ] =kvaser_fsize (u.tx_acknowledge_header), + [CMD_GET_SOFTWARE_INFO_REPLY ] =kvaser_fsize (u.usbcan.softinfo), + [CMD_RX_STD_MESSAGE ] =kvaser_fsize (u.usbcan.rx_can), + [CMD_RX_EXT_MESSAGE ] =kvaser_fsize (u.usbcan.rx_can), + [CMD_CHIP_STATE_EVENT ] =kvaser_fsize (u.usbcan.chip_state_event), + [CMD_CAN_ERROR_EVENT ] =kvaser_fsize (u.usbcan.error_event), +/* ignored events: */ + [CMD_USBCAN_CLOCK_OVERFLOW_EVENT ] =CMD_SIZE_ANY , +}; +/* Summary of a kvaser error event, for a unified Leaf/Usbcan error * handling. Some discrepancies between the two families exist: *
@@ -397,6 +429,43 @@ static const struct kvaser_usb_dev_cfg k .bittiming_const = &kvaser_usb_flexc_bittiming_const, }; +static int kvaser_usb_leaf_verify_size (const struct kvaser_usb *dev, +const struct kvaser_cmd *cmd) +{ +/* buffer size >= cmd->len ensured by caller */ +u8 min_size =0 ; + +switch (dev->driver_info->family) { +case KVASER_LEAF : +if (cmd->id <ARRAY_SIZE (kvaser_usb_leaf_cmd_sizes_leaf)) + min_size = kvaser_usb_leaf_cmd_sizes_leaf[cmd->id]; +break ; +case KVASER_USBCAN : +if (cmd->id <ARRAY_SIZE (kvaser_usb_leaf_cmd_sizes_usbcan)) + min_size = kvaser_usb_leaf_cmd_sizes_usbcan[cmd->id]; +break ; + } + +if (min_size ==CMD_SIZE_ANY ) +return 0 ; + +if (min_size) { + min_size +=CMD_HEADER_LEN ; +if (cmd->len >= min_size) +return 0 ; + +dev_err_ratelimited (&dev->intf->dev, +"Received command %u too short (size %u, needed %u)" , + cmd->id, cmd->len, min_size); +return -EIO ; + } + +dev_warn_ratelimited (&dev->intf->dev, +"Unhandled command (%d, size %d)\n" , + cmd->id, cmd->len); +return -EINVAL ; +} +static void * kvaser_usb_leaf_frame_to_cmd(const struct kvaser_usb_net_priv *priv, const struct sk_buff *skb, int *cmd_len,
@@ -502,6 +571,9 @@ static int kvaser_usb_leaf_wait_cmd(cons end:kfree (buf); +if (err ==0 ) + err =kvaser_usb_leaf_verify_size (dev, cmd); +return err; }
@@ -1133,6 +1205,9 @@ static void kvaser_usb_leaf_stop_chip_restatic void kvaser_usb_leaf_handle_command (const struct kvaser_usb *dev,const struct kvaser_cmd *cmd) { +if (kvaser_usb_leaf_verify_size (dev, cmd) <0 ) +return ; +switch (cmd->id) {case CMD_START_CHIP_REPLY :kvaser_usb_leaf_start_chip_reply (dev, cmd);
Greg Kroah-Hartman
maintainerPATCH 77/862 drm/virtio: Use appropriate atomic state in virtio_gpu_plane_cleanup_fb()
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
commit 4656b3a26a9e9fe5f04bfd2ab55b066266ba7f4d upstream.
Make virtio_gpu_plane_cleanup_fb() to clean the state which DRM core wants to clean up and not the current plane's state. Normally the older atomic state is cleaned up, but the newer state could also be cleaned up in case of aborted commits.
--- drivers/gpu/drm/virtio/virtgpu_plane.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/virtio/virtgpu_plane.c +3 -3
@@ -266,14 +266,14 @@ static int virtio_gpu_plane_prepare_fb(s }static void virtio_gpu_plane_cleanup_fb (struct drm_plane *plane, -struct drm_plane_state *old_state) +struct drm_plane_state *state) {struct virtio_gpu_framebuffer *vgfb; -if (!plane->state->fb) +if (!state->fb)return ; - vgfb =to_virtio_gpu_framebuffer (plane->state->fb); + vgfb =to_virtio_gpu_framebuffer (state->fb);if (vgfb->fence) {dma_fence_put (&vgfb->fence->f); vgfb->fence =NULL ;
Greg Kroah-Hartman
maintainerPATCH 36/862 can: kvaser_usb_leaf: Fix CAN state after restart
In reply to Greg Kroah-HartmanFrom: Anssi Hannula <[email protected]>
commit 0be1a655fe68c8e6dcadbcbddb69cf2fb29881f5 upstream.
can_restart() expects CMD_START_CHIP to set the error state to ERROR_ACTIVE as it calls netif_carrier_on() immediately afterwards.
Otherwise the user may immediately trigger restart again and hit a BUG_ON() in can_restart().
Fix kvaser_usb_leaf set_mode(CMD_START_CHIP) to set the expected state.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +2 -0
@@ -1431,6 +1431,8 @@ static int kvaser_usb_leaf_set_mode(stru err =kvaser_usb_leaf_simple_cmd_async (priv,CMD_START_CHIP );if (err)return err; + + priv->can.state =CAN_STATE_ERROR_ACTIVE ;break ;default :return -EOPNOTSUPP ;
Greg Kroah-Hartman
maintainerPATCH 121/862 btrfs: fix missed extent on fsync after dropping extent maps
In reply to Greg Kroah-HartmanFrom: Filipe Manana <[email protected]>
commit cef7820d6abf8d61f8e1db411eae3c712f6d72a2 upstream.
When dropping extent maps for a range, through btrfs_drop_extent_cache(), if we find an extent map that starts before our target range and/or ends before the target range, and we are not able to allocate extent maps for splitting that extent map, then we don't fail and simply remove the entire extent map from the inode's extent map tree.
This is generally fine, because in case anyone needs to access the extent map, it can just load it again later from the respective file extent item(s) in the subvolume btree. However, if that extent map is new and is in the list of modified extents, then a fast fsync will miss the parts of the extent that were outside our range (that needed to be split), therefore not logging them. Fix that by marking the inode for a full fsync. This issue was introduced after removing BUG_ON()s triggered when the split extent map allocations failed, done by commit 7014cdb49305ed ("Btrfs: btrfs_drop_extent_cache should never fail"), back in 2012, and the fast fsync path already existed but was very recent.
Also, in the case where we could allocate extent maps for the split operations but then fail to add a split extent map to the tree, mark the inode for a full fsync as well. This is not supposed to ever fail, and we assert that, but in case assertions are disabled (CONFIG_BTRFS_ASSERT is not set), it's the correct thing to do to make sure a fast fsync will not miss a new extent.
--- fs/btrfs/file.c | 58 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 12 deletions(-)
fs/btrfs/file.c +46 -12
@@ -523,6 +523,7 @@ void btrfs_drop_extent_cache(struct btrf testend =0 ; }while (1 ) { +bool ends_after_range = false;int no_splits =0 ; modified = false;
@@ -539,10 +540,12 @@ void btrfs_drop_extent_cache(struct btrfwrite_unlock (&em_tree->lock);break ; } +if (testend && em->start + em->len > start + len) + ends_after_range = true; flags = em->flags; gen = em->generation;if (skip_pinned &&test_bit (EXTENT_FLAG_PINNED , &em->flags)) { -if (testend && em->start + em->len >= start + len) { +if (ends_after_range) {free_extent_map (em);write_unlock (&em_tree->lock);break ;
@@ -592,7 +595,7 @@ void btrfs_drop_extent_cache(struct btrf split = split2; split2 =NULL ; } -if (testend && em->start + em->len > start + len) { +if (ends_after_range) {u64 diff = start + len - em->start; split->start = start + len;
@@ -630,14 +633,42 @@ void btrfs_drop_extent_cache(struct btrf }else { ret =add_extent_mapping (em_tree, split, modified); -ASSERT (ret ==0 );/* Logic error */ +/* Logic error, shouldn't happen. */ +ASSERT (ret ==0 ); +if (WARN_ON (ret !=0 ) && modified) +btrfs_set_inode_full_sync (inode); }free_extent_map (split); split =NULL ; } next: -if (extent_map_in_tree (em)) +if (extent_map_in_tree (em)) { +/* +* If the extent map is still in the tree it means that +* either of the following is true: +* +* 1) It fits entirely in our range (doesn't end beyond +* it or starts before it); +* +* 2) It starts before our range and/or ends after our +* range, and we were not able to allocate the extent +* maps for split operations, @split and @split2. +* +* If we are at case 2) then we just remove the entire +* extent map - this is fine since if anyone needs it to +* access the subranges outside our range, will just +* load it again from the subvolume tree's file extent +* item. However if the extent map was in the list of +* modified extents, then we must mark the inode for a +* full fsync, otherwise a fast fsync will miss this +* extent if it's new and needs to be logged. +*/ +if ((em->start < start || ends_after_range) && modified) { +ASSERT (no_splits); +btrfs_set_inode_full_sync (inode); + }remove_extent_mapping (em_tree, em); + }write_unlock (&em_tree->lock);/* once for us */
@@ -2201,14 +2232,6 @@ int btrfs_sync_file(struct file *file, latomic_inc (&root->log_batch);/* -* Always check for the full sync flag while holding the inode's lock, -* to avoid races with other tasks. The flag must be either set all the -* time during logging or always off all the time while logging. -*/ - full_sync =test_bit (BTRFS_INODE_NEEDS_FULL_SYNC , - &BTRFS_I (inode)->runtime_flags); - -/* * Before we acquired the inode's lock and the mmap lock, someone may * have dirtied more pages in the target range. We need to make sure * that writeback for any such pages does not start while we are logging
@@ -2233,6 +2256,17 @@ int btrfs_sync_file(struct file *file, l }/* +* Always check for the full sync flag while holding the inode's lock, +* to avoid races with other tasks. The flag must be either set all the +* time during logging or always off all the time while logging. +* We check the flag here after starting delalloc above, because when +* running delalloc the full sync flag may be set if we need to drop +* extra extent map ranges due to temporary memory allocation failures. +*/ + full_sync =test_bit (BTRFS_INODE_NEEDS_FULL_SYNC , + &BTRFS_I (inode)->runtime_flags); + +/* * We have to do this here to avoid the priority inversion of waiting on * IO of a lower priority task while holding a transaction open. *
Greg Kroah-Hartman
maintainerPATCH 124/862 f2fs: complete checkpoints during remount
In reply to Greg Kroah-HartmanFrom: Jaegeuk Kim <[email protected]>
commit 4f99484d27961cb194cebcd917176fa038a5025f upstream.
Otherwise, pending checkpoints can contribute a race condition to give a quota warning.
- Thread - checkpoint thread
add checkpoints to the listdo_remount()
down_write(&sb->s_umount);
f2fs_remount()
block_operations()
down_read_trylock(&sb->s_umount) = 0
up_write(&sb->s_umount);
f2fs_quota_sync()
dquot_writeback_dquots()
WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));Or,
do_remount()
down_write(&sb->s_umount);
f2fs_remount()
create a ckpt thread f2fs_enable_checkpoint() adds checkpoints wait for f2fs_sync_fs() trigger another pending checkpoint
block_operations()
down_read_trylock(&sb->s_umount) = 0
up_write(&sb->s_umount);
f2fs_quota_sync()
dquot_writeback_dquots()
WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));--- fs/f2fs/super.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/f2fs/super.c +6 -0
@@ -2181,6 +2181,9 @@ static void f2fs_enable_checkpoint(strucf2fs_up_write (&sbi->gc_lock);f2fs_sync_fs (sbi->sb,1 ); + +/* Let's ensure there's no pending checkpoint anymore */ +f2fs_flush_ckpt_thread (sbi); }static int f2fs_remount (struct super_block *sb,int *flags,char *data)
@@ -2346,6 +2349,9 @@ static int f2fs_remount(struct super_blof2fs_stop_ckpt_thread (sbi); need_restart_ckpt = true; }else { +/* Flush if the prevous checkpoint, if exists. */ +f2fs_flush_ckpt_thread (sbi); + err =f2fs_start_ckpt_thread (sbi);if (err) { f2fs_err(sbi,
Greg Kroah-Hartman
maintainerPATCH 131/862 jbd2: fix potential buffer head reference count leak
In reply to Greg Kroah-HartmanFrom: Ye Bin <[email protected]>
commit e0d5fc7a6d80ac2406c7dfc6bb625201d0250a8a upstream.
As in 'jbd2_fc_wait_bufs' if buffer isn't uptodate, will return -EIO without update 'journal->j_fc_off'. But 'jbd2_fc_release_bufs' will release buffer head from ‘j_fc_off - 1’ if 'bh' is NULL will terminal release which will lead to buffer head buffer head reference count leak.
To solve above issue, update 'journal->j_fc_off' before return -EIO.
--- fs/jbd2/journal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
fs/jbd2/journal.c +7 -1
@@ -925,8 +925,14 @@ int jbd2_fc_wait_bufs(journal_t *journalwait_on_buffer (bh);put_bh (bh); journal->j_fc_wbuf[i] =NULL ; -if (unlikely (!buffer_uptodate (bh))) +/* +* Update j_fc_off so jbd2_fc_release_bufs can release remain +* buffer head. +*/ +if (unlikely (!buffer_uptodate (bh))) { + journal->j_fc_off = i;return -EIO ; + } }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 37/862 mmc: renesas_sdhi: Fix rounding errors
In reply to Greg Kroah-HartmanFrom: Biju Das <[email protected]>
commit f0c00454bf78975925eccc9737faaa4d4951edbf upstream.
Due to clk rounding errors on RZ/G2L platforms, it selects a clock source with a lower clock rate compared to a higher one.
For eg: The rounding error (533333333 Hz / 4 * 4 = 533333332 Hz < 5333333 33 Hz) selects a clk source of 400 MHz instead of 533.333333 MHz.
This patch fixes this issue by adding a margin of (1/1024) higher to the clock rate.
--- drivers/mmc/host/renesas_sdhi_core.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
drivers/mmc/host/renesas_sdhi_core.c +18 -3
@@ -128,6 +128,7 @@ static unsigned int renesas_sdhi_clk_updstruct clk *ref_clk = priv->clk;unsigned int freq, diff, best_freq =0 , diff_min = ~0 ;unsigned int new_clock, clkh_shift =0 ; +unsigned int new_upper_limit;int i;/*
@@ -153,13 +154,20 @@ static unsigned int renesas_sdhi_clk_upd* greater than, new_clock. As we can divide by 1 << i for * any i in [0, 9] we want the input clock to be as close as * possible, but no greater than, new_clock << i. +* +* Add an upper limit of 1/1024 rate higher to the clock rate to fix +* clk rate jumping to lower rate due to rounding error (eg: RZ/G2L has +* 3 clk sources 533.333333 MHz, 400 MHz and 266.666666 MHz. The request +* for 533.333333 MHz will selects a slower 400 MHz due to rounding +* error (533333333 Hz / 4 * 4 = 533333332 Hz < 533333333 Hz)). */ for (i =min (9 ,ilog2 (UINT_MAX / new_clock)); i >=0 ; i--) { freq =clk_round_rate (ref_clk, new_clock << i); -if (freq > (new_clock << i)) { + new_upper_limit = (new_clock << i) + ((new_clock << i) >>10 ); +if (freq > new_upper_limit) {/* Too fast; look for a slightly slower option */ freq =clk_round_rate (ref_clk, (new_clock << i) /4 *3 ); -if (freq > (new_clock << i)) +if (freq > new_upper_limit)continue ; }
@@ -181,6 +189,7 @@ static unsigned int renesas_sdhi_clk_updstatic void renesas_sdhi_set_clock (struct tmio_mmc_host *host,unsigned int new_clock) { +unsigned int clk_margin;u32 clk =0 , clock; sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~CLK_CTL_SCLKEN &
@@ -194,7 +203,13 @@ static void renesas_sdhi_set_clock(struc host->mmc->actual_clock =renesas_sdhi_clk_update (host, new_clock); clock = host->mmc->actual_clock /512 ; -for (clk =0x80000080 ; new_clock >= (clock <<1 ); clk >>=1 ) +/* +* Add a margin of 1/1024 rate higher to the clock rate in order +* to avoid clk variable setting a value of 0 due to the margin +* provided for actual_clock in renesas_sdhi_clk_update(). +*/ + clk_margin = new_clock >>10 ; +for (clk =0x80000080 ; new_clock + clk_margin >= (clock <<1 ); clk >>=1 ) clock <<=1 ;/* 1/1 clock is option */
Greg Kroah-Hartman
maintainerPATCH 33/862 can: kvaser_usb: Fix use of uninitialized completion
In reply to Greg Kroah-HartmanFrom: Anssi Hannula <[email protected]>
commit cd7f30e174d09a02ca2afa5ef093fb0f0352e0d8 upstream.
flush_comp is initialized when CMD_FLUSH_QUEUE is sent to the device and completed when the device sends CMD_FLUSH_QUEUE_RESP.
This causes completion of uninitialized completion if the device sends CMD_FLUSH_QUEUE_RESP before CMD_FLUSH_QUEUE is ever sent (e.g. as a response to a flush by a previously bound driver, or a misbehaving device).
Fix that by initializing flush_comp in kvaser_usb_init_one() like the other completions.
This issue is only triggerable after RX URBs have been set up, i.e. the interface has been opened at least once.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 1 + drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +1 -0
@@ -729,6 +729,7 @@ static int kvaser_usb_init_one(struct kvinit_usb_anchor (&priv->tx_submitted);init_completion (&priv->start_comp);init_completion (&priv->stop_comp); +init_completion (&priv->flush_comp); priv->can.ctrlmode_supported =0 ; priv->dev = dev;
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c +1 -1
@@ -1916,7 +1916,7 @@ static int kvaser_usb_hydra_flush_queue( {int err; -init_completion (&priv->flush_comp); +reinit_completion (&priv->flush_comp); err =kvaser_usb_hydra_send_simple_cmd (priv->dev,CMD_FLUSH_QUEUE , priv->channel);
Greg Kroah-Hartman
maintainerPATCH 125/862 f2fs: flush pending checkpoints when freezing super
In reply to Greg Kroah-HartmanFrom: Jaegeuk Kim <[email protected]>
commit c7b58576370147833999fd4cc874d0f918bdf9ca upstream.
This avoids -EINVAL when trying to freeze f2fs.
--- fs/f2fs/checkpoint.c | 24 ++++++++++++++++++------ fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 5 ++--- 3 files changed, 21 insertions(+), 9 deletions(-)
fs/f2fs/checkpoint.c +18 -6
@@ -1892,15 +1892,27 @@ int f2fs_start_ckpt_thread(struct f2fs_svoid f2fs_stop_ckpt_thread (struct f2fs_sb_info *sbi) {struct ckpt_req_control *cprc = &sbi->cprc_info; +struct task_struct *ckpt_task; -if (cprc->f2fs_issue_ckpt) { -struct task_struct *ckpt_task = cprc->f2fs_issue_ckpt; +if (!cprc->f2fs_issue_ckpt) +return ; - cprc->f2fs_issue_ckpt =NULL ; -kthread_stop (ckpt_task); + ckpt_task = cprc->f2fs_issue_ckpt; + cprc->f2fs_issue_ckpt =NULL ; +kthread_stop (ckpt_task); -flush_remained_ckpt_reqs (sbi,NULL ); - } +f2fs_flush_ckpt_thread (sbi); +} + +void f2fs_flush_ckpt_thread (struct f2fs_sb_info *sbi) +{ +struct ckpt_req_control *cprc = &sbi->cprc_info; + +flush_remained_ckpt_reqs (sbi,NULL ); + +/* Let's wait for the previous dispatched checkpoint. */ +while (atomic_read (&cprc->queued_ckpt)) +io_schedule_timeout (DEFAULT_IO_TIMEOUT ); }void f2fs_init_ckpt_req_control (struct f2fs_sb_info *sbi)
fs/f2fs/f2fs.h +1 -0
@@ -3707,6 +3707,7 @@ static inline bool f2fs_need_rand_seg(st* checkpoint.c */ void f2fs_stop_checkpoint (struct f2fs_sb_info *sbi,bool end_io); +void f2fs_flush_ckpt_thread (struct f2fs_sb_info *sbi);struct page *f2fs_grab_meta_page (struct f2fs_sb_info *sbi,pgoff_t index);struct page *f2fs_get_meta_page (struct f2fs_sb_info *sbi,pgoff_t index);struct page *f2fs_get_meta_page_retry (struct f2fs_sb_info *sbi,pgoff_t index);
fs/f2fs/super.c +2 -3
@@ -1666,9 +1666,8 @@ static int f2fs_freeze(struct super_blocif (is_sbi_flag_set (F2FS_SB (sb),SBI_IS_DIRTY ))return -EINVAL ; -/* ensure no checkpoint required */ -if (!llist_empty (&F2FS_SB (sb)->cprc_info.issue_list)) -return -EINVAL ; +/* Let's flush checkpoints and stop the thread. */ +f2fs_flush_ckpt_thread (F2FS_SB (sb));/* to avoid deadlock on f2fs_evict_inode->SB_FREEZE_FS */ set_sbi_flag (F2FS_SB (sb),SBI_IS_FREEZING );
Greg Kroah-Hartman
maintainerPATCH 133/862 jbd2: add miss release buffer head in fc_do_one_pass()
In reply to Greg Kroah-HartmanFrom: Ye Bin <[email protected]>
commit dfff66f30f66b9524b661f311bbed8ff3d2ca49f upstream.
In fc_do_one_pass() miss release buffer head after use which will lead to reference count leak.
--- fs/jbd2/recovery.c | 1 + 1 file changed, 1 insertion(+)
fs/jbd2/recovery.c +1 -0
@@ -256,6 +256,7 @@ static int fc_do_one_pass(journal_t *jou err = journal->j_fc_replay_callback (journal, bh, pass, next_fc_block - journal->j_fc_first, expected_commit_id); +brelse (bh); next_fc_block++;if (err <0 || err ==JBD2_FC_REPLAY_STOP )break ;
Greg Kroah-Hartman
maintainerPATCH 69/862 Revert "drm/amdgpu: use dirty framebuffer helper"
In reply to Greg Kroah-HartmanFrom: Hamza Mahfooz <[email protected]>
commit 17d819e2828cacca2e4c909044eb9798ed379cd2 upstream.
This reverts commit 66f99628eb24409cb8feb5061f78283c8b65f820.
Unfortunately, that commit causes performance regressions on non-PSR setups. So, just revert it until FB_DAMAGE_CLIPS support can be added.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +2 -12
@@ -38,8 +38,6 @@#include <linux/pci.h> #include <linux/pm_runtime.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_damage_helper.h> -#include <drm/drm_drv.h> #include <drm/drm_edid.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_fb_helper.h>
@@ -500,12 +498,6 @@ static const struct drm_framebuffer_func .create_handle = drm_gem_fb_create_handle, }; -static const struct drm_framebuffer_funcs amdgpu_fb_funcs_atomic = { - .destroy = drm_gem_fb_destroy, - .create_handle = drm_gem_fb_create_handle, - .dirty = drm_atomic_helper_dirtyfb, -}; -uint32_t amdgpu_display_supported_domains (struct amdgpu_device *adev,uint64_t bo_flags) {
@@ -1108,10 +1100,8 @@ static int amdgpu_display_gem_fb_verify_if (ret) goto err; -if (drm_drv_uses_atomic_modeset (dev)) - ret =drm_framebuffer_init (dev, &rfb->base, &amdgpu_fb_funcs_atomic); -else - ret =drm_framebuffer_init (dev, &rfb->base, &amdgpu_fb_funcs); + ret =drm_framebuffer_init (dev, &rfb->base, &amdgpu_fb_funcs); +if (ret) goto err;
Greg Kroah-Hartman
maintainerPATCH 189/862 drm/i915: Fix display problems after resume
In reply to Greg Kroah-HartmanFrom: Thomas Hellström <[email protected]>
commit 6c482c62a635aa4f534d2439fbf8afa37452b986 upstream.
Commit 39a2bd34c933 ("drm/i915: Use the vma resource as argument for gtt binding / unbinding") introduced a regression that due to the vma resource tracking of the binding state, dpt ptes were not correctly repopulated. Fix this by clearing the vma resource state before repopulating. The state will subsequently be restored by the bind_vma operation.
--- drivers/gpu/drm/i915/gt/intel_ggtt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_ggtt.c +7 -1
@@ -1267,10 +1267,16 @@ bool i915_ggtt_resume_vm(struct i915_addatomic_read (&vma->flags) &I915_VMA_BIND_MASK ;GEM_BUG_ON (!was_bound); -if (!retained_ptes) +if (!retained_ptes) { +/* +* Clear the bound flags of the vma resource to allow +* ptes to be repopulated. +*/ + vma->resource->bound_flags =0 ; vma->ops->bind_vma (vm,NULL , vma->resource, obj ? obj->cache_level :0 , was_bound); + }if (obj) {/* only used during resume => exclusive access */ write_domain_objs |=fetch_and_zero (&obj->write_domain); obj->read_domains |=I915_GEM_DOMAIN_GTT ;
Greg Kroah-Hartman
maintainerPATCH 28/862 iio: pressure: dps310: Reset chip after timeout
In reply to Greg Kroah-HartmanFrom: Eddie James <[email protected]>
commit 7b4ab4abcea4c0c10b25187bf2569e5a07e9a20c upstream.
The DPS310 chip has been observed to get "stuck" such that pressure and temperature measurements are never indicated as "ready" in the MEAS_CFG register. The only solution is to reset the device and try again. In order to avoid continual failures, use a boolean flag to only try the reset after timeout once if errors persist.
--- drivers/iio/pressure/dps310.c | 74 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 10 deletions(-)
drivers/iio/pressure/dps310.c +64 -10
@@ -89,6 +89,7 @@ struct dps310_data {s32 c00, c10, c20, c30, c01, c11, c21;s32 pressure_raw;s32 temp_raw; +bool timeout_recovery_failed; };static const struct iio_chan_spec dps310_channels[] = {
@@ -393,11 +394,69 @@ static int dps310_get_temp_k(struct dps3return scale_factors[ilog2 (rc)]; } +static int dps310_reset_wait (struct dps310_data *data) +{ +int rc; + + rc =regmap_write (data->regmap,DPS310_RESET ,DPS310_RESET_MAGIC ); +if (rc) +return rc; + +/* Wait for device chip access: 2.5ms in specification */ +usleep_range (2500 ,12000 ); +return 0 ; +} + +static int dps310_reset_reinit (struct dps310_data *data) +{ +int rc; + + rc =dps310_reset_wait (data); +if (rc) +return rc; + +return dps310_startup (data); +} + +static int dps310_ready_status (struct dps310_data *data,int ready_bit,int timeout) +{ +int sleep =DPS310_POLL_SLEEP_US (timeout); +int ready; + +return regmap_read_poll_timeout (data->regmap,DPS310_MEAS_CFG , ready, ready & ready_bit, + sleep, timeout); +} + +static int dps310_ready (struct dps310_data *data,int ready_bit,int timeout) +{ +int rc; + + rc =dps310_ready_status (data, ready_bit, timeout); +if (rc) { +if (rc == -ETIMEDOUT && !data->timeout_recovery_failed) { +/* Reset and reinitialize the chip. */ +if (dps310_reset_reinit (data)) { + data->timeout_recovery_failed = true; + }else { +/* Try again to get sensor ready status. */ +if (dps310_ready_status (data, ready_bit, timeout)) + data->timeout_recovery_failed = true; +else +return 0 ; + } + } + +return rc; + } + + data->timeout_recovery_failed = false; +return 0 ; +} +static int dps310_read_pres_raw (struct dps310_data *data) {int rc;int rate; -int ready;int timeout;s32 raw;u8 val[3 ];
@@ -409,9 +468,7 @@ static int dps310_read_pres_raw(struct d timeout =DPS310_POLL_TIMEOUT_US (rate);/* Poll for sensor readiness; base the timeout upon the sample rate. */ - rc =regmap_read_poll_timeout (data->regmap,DPS310_MEAS_CFG , ready, - ready &DPS310_PRS_RDY , -DPS310_POLL_SLEEP_US (timeout), timeout); + rc =dps310_ready (data,DPS310_PRS_RDY , timeout);if (rc) goto done;
@@ -448,7 +505,6 @@ static int dps310_read_temp_raw(struct d {int rc;int rate; -int ready;int timeout;if (mutex_lock_interruptible (&data->lock))
@@ -458,10 +514,8 @@ static int dps310_read_temp_raw(struct d timeout =DPS310_POLL_TIMEOUT_US (rate);/* Poll for sensor readiness; base the timeout upon the sample rate. */ - rc =regmap_read_poll_timeout (data->regmap,DPS310_MEAS_CFG , ready, - ready &DPS310_TMP_RDY , -DPS310_POLL_SLEEP_US (timeout), timeout); -if (rc <0 ) + rc =dps310_ready (data,DPS310_TMP_RDY , timeout); +if (rc) goto done; rc =dps310_read_temp_ready (data);
@@ -756,7 +810,7 @@ static void dps310_reset(void *action_da {struct dps310_data *data = action_data; -regmap_write (data->regmap,DPS310_RESET ,DPS310_RESET_MAGIC ); +dps310_reset_wait (data); }static const struct regmap_config dps310_regmap_config = {
Greg Kroah-Hartman
maintainerPATCH 81/862 arm64: errata: Add Cortex-A55 to the repeat tlbi list
In reply to Greg Kroah-HartmanFrom: James Morse <[email protected]>
commit 171df58028bf4649460fb146a56a58dcb0c8f75a upstream.
Cortex-A55 is affected by an erratum where in rare circumstances the CPUs may not handle a race between a break-before-make sequence on one CPU, and another CPU accessing the same page. This could allow a store to a page that has been unmapped.
Work around this by adding the affected CPUs to the list that needs TLB sequences to be done twice.
--- Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 17 +++++++++++++++++ arch/arm64/kernel/cpu_errata.c | 5 +++++ 3 files changed, 24 insertions(+)
Documentation/arm64/silicon-errata.rst +2 -0
@@ -76,6 +76,8 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A55 | #1530923 | ARM64_ERRATUM_1530923 | +----------------+-----------------+-----------------+-----------------------------+ +| ARM | Cortex-A55 | #2441007 | ARM64_ERRATUM_2441007 | ++----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 | +----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A57 | #852523 | N/A |
arch/arm64/Kconfig +17 -0
@@ -632,6 +632,23 @@ config ARM64_ERRATUM_1530923 config ARM64_WORKAROUND_REPEAT_TLBI bool +config ARM64_ERRATUM_2441007 + bool "Cortex-A55: Completion of affected memory accesses might not be guaranteed by completion of a TLBI" + default y + select ARM64_WORKAROUND_REPEAT_TLBI + help + This option adds a workaround for ARM Cortex-A55 erratum #2441007. + + Under very rare circumstances, affected Cortex-A55 CPUs + may not handle a race between a break-before-make sequence on one + CPU, and another CPU accessing the same page. This could allow a + store to a page that has been unmapped. + + Work around this by adding the affected CPUs to the list that needs + TLB sequences to be done twice. + + If unsure, say Y. + config ARM64_ERRATUM_1286807 bool "Cortex-A76: Modification of the translation table for a virtual address might lead to read-after-read ordering violation" default y
arch/arm64/kernel/cpu_errata.c +5 -0
@@ -214,6 +214,11 @@ static const struct arm64_cpu_capabiliti ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe), },#endif +#ifdef CONFIG_ARM64_ERRATUM_2441007 + { + ERRATA_MIDR_ALL_VERSIONS(MIDR_CORTEX_A55), + }, +#endif #ifdef CONFIG_ARM64_ERRATUM_2441009 {/* Cortex-A510 r0p0 -> r1p1. Fixed in r1p2 */
Greg Kroah-Hartman
maintainerPATCH 142/862 ext4: place buffer head allocation before handle start
In reply to Greg Kroah-HartmanFrom: Jinke Han <[email protected]>
commit d1052d236eddf6aa851434db1897b942e8db9921 upstream.
In our product environment, we encounter some jbd hung waiting handles to stop while several writters were doing memory reclaim for buffer head allocation in delay alloc write path. Ext4 do buffer head allocation with holding transaction handle which may be blocked too long if the reclaim works not so smooth. According to our bcc trace, the reclaim time in buffer head allocation can reach 258s and the jbd transaction commit also take almost the same time meanwhile. Except for these extreme cases, we often see several seconds delays for cgroup memory reclaim on our servers. This is more likely to happen considering docker environment.
One thing to note, the allocation of buffer heads is as often as page allocation or more often when blocksize less than page size. Just like page cache allocation, we should also place the buffer head allocation before startting the handle.
--- fs/ext4/inode.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/ext4/inode.c +7 -0
@@ -1188,6 +1188,13 @@ retry_grab: page =grab_cache_page_write_begin (mapping, index);if (!page)return -ENOMEM ; +/* +* The same as page allocation, we prealloc buffer heads before +* starting the handle. +*/ +if (!page_has_buffers (page)) +create_empty_buffers (page, inode->i_sb->s_blocksize,0 ); +unlock_page (page); retry_journal:
Greg Kroah-Hartman
maintainerPATCH 82/862 clocksource/drivers/arm_arch_timer: Fix CNTPCT_LO and CNTVCT_LO value
In reply to Greg Kroah-HartmanFrom: Yang Guo <[email protected]>
commit af246cc6d0ed11318223606128bb0b09866c4c08 upstream.
CNTPCT_LO and CNTVCT_LO are defined by mistake in commit '8b82c4f883a7', so fix them according to the Arm ARM DDI 0487I.a, Table I2-4 "CNTBaseN memory map" as follows:
Offset Register Type Description 0x000 CNTPCT[31:0] RO Physical Count register. 0x004 CNTPCT[63:32] RO 0x008 CNTVCT[31:0] RO Virtual Count register. 0x00C CNTVCT[63:32] RO
--- drivers/clocksource/arm_arch_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/arm_arch_timer.c +2 -2
@@ -44,8 +44,8 @@#define CNTACR_RWVT BIT(4)#define CNTACR_RWPT BIT(5) -#define CNTVCT_LO 0x00 -#define CNTPCT_LO 0x08 +#define CNTPCT_LO 0x00 +#define CNTVCT_LO 0x08#define CNTFRQ 0x10#define CNTP_CVAL_LO 0x20#define CNTP_CTL 0x2c
Greg Kroah-Hartman
maintainerPATCH 99/862 cpufreq: qcom-cpufreq-hw: Fix uninitialized throttled_freq warning
In reply to Greg Kroah-HartmanFrom: Viresh Kumar <[email protected]>
commit 91dc90fdb8b8199519a3aac9c46a433b02223c5b upstream.
Commit 6240aaad75e1 was supposed to drop the reference count to the OPP, instead it avoided more stuff if the OPP isn't found. This isn't entirely correct. We already have a frequency value available, we just couldn't align it with an OPP in case of IS_ERR(opp).
Lets continue with updating thermal pressure, etc, even if we aren't able to find an OPP here.
This fixes warning generated by the 'smatch' tool.
--- drivers/cpufreq/qcom-cpufreq-hw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/cpufreq/qcom-cpufreq-hw.c +5 -5
@@ -316,14 +316,14 @@ static void qcom_lmh_dcvs_notify(structif (IS_ERR (opp)) {dev_warn (dev,"Can't find the OPP for throttling: %pe!\n" , opp); }else { - throttled_freq = freq_hz /HZ_PER_KHZ ; - -/* Update thermal pressure (the boost frequencies are accepted) */ -arch_update_thermal_pressure (policy->related_cpus, throttled_freq); -dev_pm_opp_put (opp); } + throttled_freq = freq_hz /HZ_PER_KHZ ; + +/* Update thermal pressure (the boost frequencies are accepted) */ +arch_update_thermal_pressure (policy->related_cpus, throttled_freq); +/* * In the unlikely case policy is unregistered do not enable * polling or h/w interrupt
Greg Kroah-Hartman
maintainerPATCH 95/862 serial: 8250: Request full 16550A feature probing for OxSemi PCIe devices
In reply to Greg Kroah-HartmanFrom: Maciej W. Rozycki <[email protected]>
commit 00b7a4d4ee42be1c515e56cb1e8ba0f25e271d8e upstream.
Oxford Semiconductor PCIe (Tornado) 950 serial port devices need to operate in the enhanced mode via the EFR register for the Divide-by-M N/8 baud rate generator prescaler to be used in their native UART mode. Otherwise the prescaler is fixed at 1 causing grossly incorrect baud rates to be programmed.
Accessing the EFR register requires 16550A features to have been probed for, so request this to happen regardless of SERIAL_8250_16550A_VARIANTS by setting UPF_FULL_PROBE in port flags.
--- drivers/tty/serial/8250/8250_pci.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/tty/serial/8250/8250_pci.c +5 -0
@@ -1232,6 +1232,10 @@ static void pci_oxsemi_tornado_set_mctrlserial8250_do_set_mctrl (port, mctrl); } +/* +* We require EFR features for clock programming, so set UPF_FULL_PROBE +* for full probing regardless of CONFIG_SERIAL_8250_16550A_VARIANTS setting. +*/ static int pci_oxsemi_tornado_setup (struct serial_private *priv,const struct pciserial_board *board,struct uart_8250_port *up,int idx)
@@ -1239,6 +1243,7 @@ static int pci_oxsemi_tornado_setup(strustruct pci_dev *dev = priv->dev;if (pci_oxsemi_tornado_p (dev)) { + up->port.flags |=UPF_FULL_PROBE ; up->port.get_divisor = pci_oxsemi_tornado_get_divisor; up->port.set_divisor = pci_oxsemi_tornado_set_divisor; up->port.set_mctrl = pci_oxsemi_tornado_set_mctrl;
Greg Kroah-Hartman
maintainerPATCH 161/862 tracing: Add ioctl() to force ring buffer waiters to wake up
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (Google) <[email protected]>
commit 01b2a52171735c6eea80ee2f355f32bea6c41418 upstream.
If a process is waiting on the ring buffer for data, there currently isn't a clean way to force it to wake up. Add an ioctl call that will force any tasks that are waiting on the trace_pipe_raw file to wake up.
--- kernel/trace/trace.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
kernel/trace/trace.c +22 -0
@@ -8353,12 +8353,34 @@ out:return ret; } +/* An ioctl call with cmd 0 to the ring buffer file will wake up all waiters */ +static long tracing_buffers_ioctl (struct file *file,unsigned int cmd,unsigned long arg) +{ +struct ftrace_buffer_info *info = file->private_data; +struct trace_iterator *iter = &info->iter; + +if (cmd) +return -ENOIOCTLCMD ; + +mutex_lock (&trace_types_lock); + + iter->wait_index++; +/* Make sure the waiters see the new wait_index */ +smp_wmb (); + +ring_buffer_wake_waiters (iter->array_buffer->buffer, iter->cpu_file); + +mutex_unlock (&trace_types_lock); +return 0 ; +} +static const struct file_operations tracing_buffers_fops = { .open = tracing_buffers_open, .read = tracing_buffers_read, .poll = tracing_buffers_poll, .release = tracing_buffers_release, .splice_read = tracing_buffers_splice_read, + .unlocked_ioctl = tracing_buffers_ioctl, .llseek = no_llseek, };
Greg Kroah-Hartman
maintainerPATCH 164/862 tracing: Add "(fault)" name injection to kernel probes
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (Google) <[email protected]>
commit 2e9906f84fc7c99388bb7123ade167250d50f1c0 upstream.
Have the specific functions for kernel probes that read strings to inject the "(fault)" name directly. trace_probes.c does this too (for uprobes) but as the code to read strings are going to be used by synthetic events (and perhaps other utilities), it simplifies the code by making sure those other uses do not need to implement the "(fault)" name injection as well.
--- kernel/trace/trace_probe_kernel.h | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-)
kernel/trace/trace_probe_kernel.h +25 -6
@@ -2,6 +2,8 @@#ifndef __TRACE_PROBE_KERNEL_H_#define __TRACE_PROBE_KERNEL_H_ +#define FAULT_STRING "(fault)" +/* * This depends on trace_probe.h, but can not include it due to * the way trace_probe_tmpl.h is used by trace_kprobe.c and trace_eprobe.c.
@@ -13,8 +15,16 @@ static nokprobe_inline int kern_fetch_store_strlen_user(unsigned long addr) {const void __user *uaddr = (__force const void __user *)addr; +int ret; -return strnlen_user_nofault (uaddr,MAX_STRING_SIZE ); + ret =strnlen_user_nofault (uaddr,MAX_STRING_SIZE ); +/* +* strnlen_user_nofault returns zero on fault, insert the +* FAULT_STRING when that occurs. +*/ +if (ret <=0 ) +return strlen (FAULT_STRING ) +1 ; +return ret; }/* Return the length of string -- including null terminal byte */
@@ -34,7 +44,18 @@ kern_fetch_store_strlen(unsigned long ad len++; }while (c && ret ==0 && len <MAX_STRING_SIZE ); -return (ret <0 ) ? ret : len; +/* For faults, return enough to hold the FAULT_STRING */ +return (ret <0 ) ?strlen (FAULT_STRING ) +1 : len; +} + +static nokprobe_inline void set_data_loc(int ret, void *dest, void *__dest, void *base, int len) +{ +if (ret >=0 ) { + *(u32 *)dest =make_data_loc (ret, __dest - base); + }else { +strscpy (__dest,FAULT_STRING , len); + ret =strlen (__dest) +1 ; + } }/*
@@ -55,8 +76,7 @@ kern_fetch_store_string_user(unsigned lo __dest =get_loc_data (dest, base); ret =strncpy_from_user_nofault (__dest, uaddr, maxlen); -if (ret >=0 ) - *(u32 *)dest =make_data_loc (ret, __dest - base); +set_data_loc (ret, dest, __dest, base, maxlen);return ret; }
@@ -87,8 +107,7 @@ kern_fetch_store_string(unsigned long ad* probing. */ ret =strncpy_from_kernel_nofault (__dest, (void *)addr, maxlen); -if (ret >=0 ) - *(u32 *)dest =make_data_loc (ret, __dest - base); +set_data_loc (ret, dest, __dest, base, maxlen);return ret; }
Greg Kroah-Hartman
maintainerPATCH 169/862 media: cedrus: Fix watchdog race condition
In reply to Greg Kroah-HartmanFrom: Nicolas Dufresne <[email protected]>
commit fe8b81fde69acfcbb5af9e85328e5b9549999fdb upstream.
The watchdog needs to be scheduled before we trigger the decode operation, otherwise there is a risk that the decoder IRQ will be called before we have schedule the watchdog. As a side effect, the watchdog would never be cancelled and its function would be called at an inappropriate time.
This was observed while running Fluster with GStreamer as a backend. Some programming error would cause the decoder IRQ to be call very quickly after the trigger. Later calls into the driver would deadlock due to the unbalanced state.
--- drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/sunxi/cedrus/cedrus_dec.c +2 -2
@@ -106,11 +106,11 @@ void cedrus_device_run(void *priv)/* Trigger decoding if setup went well, bail out otherwise. */ if (!error) { - dev->dec_ops[ctx->current_codec]->trigger (ctx); -/* Start the watchdog timer. */ schedule_delayed_work (&dev->watchdog_work,msecs_to_jiffies (2000 )); + + dev->dec_ops[ctx->current_codec]->trigger (ctx); }else { v4l2_m2m_buf_done_and_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx,
Greg Kroah-Hartman
maintainerPATCH 75/862 drm/virtio: Unlock reservations on virtio_gpu_object_shmem_init() error
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
commit fdf0ff4d12cbcd76b53f27c96ce51ddca400884a upstream.
Unlock reservations in the error code path of virtio_gpu_object_create() to silence debug warning splat produced by ww_mutex_destroy(&obj->lock) when GEM is released with the held lock.
--- drivers/gpu/drm/virtio/virtgpu_object.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/virtio/virtgpu_object.c +2 -0
@@ -248,6 +248,8 @@ int virtio_gpu_object_create(struct virt ret =virtio_gpu_object_shmem_init (vgdev, bo, &ents, &nents);if (ret !=0 ) { +if (fence) +virtio_gpu_array_unlock_resv (objs);virtio_gpu_array_put_free (objs);virtio_gpu_free_object (&shmem_obj->base);return ret;
Greg Kroah-Hartman
maintainerPATCH 73/862 dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg
In reply to Greg Kroah-HartmanFrom: Christian Marangi <[email protected]>
commit b9d2140c3badf4107973ad77c5a0ec3075705c85 upstream.
The calling convention for pre_slave_sg is to return NULL on error and provide an error log to the system. Qcom-adm instead provide error pointer when an error occur. This indirectly cause kernel panic for example for the nandc driver that checks only if the pointer returned by device_prep_slave_sg is not NULL. Returning an error pointer makes nandc think the device_prep_slave_sg function correctly completed and makes the kernel panics later in the code.
While nandc is the one that makes the kernel crash, it was pointed out that the real problem is qcom-adm not following calling convention for that function.
To fix this, drop returning error pointer and return NULL with an error log.
--- drivers/dma/qcom/qcom_adm.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/dma/qcom/qcom_adm.c +13 -7
@@ -379,13 +379,13 @@ static struct dma_async_tx_descriptor *aif (blk_size <0 ) {dev_err (adev->dev,"invalid burst value: %d\n" , burst); -return ERR_PTR (-EINVAL ); +return NULL ; } crci = achan->crci &0xf ;if (!crci || achan->crci >0x1f ) {dev_err (adev->dev,"invalid crci value\n" ); -return ERR_PTR (-EINVAL ); +return NULL ; } }
@@ -403,8 +403,10 @@ static struct dma_async_tx_descriptor *a } async_desc =kzalloc (sizeof (*async_desc),GFP_NOWAIT ); -if (!async_desc) -return ERR_PTR (-ENOMEM ); +if (!async_desc) { +dev_err (adev->dev,"not enough memory for async_desc struct\n" ); +return NULL ; + } async_desc->mux = achan->mux ?ADM_CRCI_CTL_MUX_SEL :0 ; async_desc->crci = crci;
@@ -414,8 +416,10 @@ static struct dma_async_tx_descriptor *asizeof (*cple) +2 *ADM_DESC_ALIGN ; async_desc->cpl =kzalloc (async_desc->dma_len,GFP_NOWAIT ); -if (!async_desc->cpl) +if (!async_desc->cpl) { +dev_err (adev->dev,"not enough memory for cpl struct\n" ); goto free; + } async_desc->adev = adev;
@@ -437,8 +441,10 @@ static struct dma_async_tx_descriptor *a async_desc->dma_addr =dma_map_single (adev->dev, async_desc->cpl, async_desc->dma_len,DMA_TO_DEVICE ); -if (dma_mapping_error (adev->dev, async_desc->dma_addr)) +if (dma_mapping_error (adev->dev, async_desc->dma_addr)) { +dev_err (adev->dev,"dma mapping error for cpl\n" ); goto free; + } cple_addr = async_desc->dma_addr + ((void *)cple - async_desc->cpl);
@@ -454,7 +460,7 @@ static struct dma_async_tx_descriptor *a free:kfree (async_desc); -return ERR_PTR (-ENOMEM ); +return NULL ; }/**
Greg Kroah-Hartman
maintainerPATCH 100/862 LoadPin: Fix Kconfig doc about format of file with verity digests
In reply to Greg Kroah-HartmanFrom: Matthias Kaehlcke <[email protected]>
commit aafc203bbad4bf6cf394a34ea698c2b0b8affae0 upstream.
The doc for CONFIG_SECURITY_LOADPIN_VERITY says that the file with verity digests must contain a comma separated list of digests. That was the case at some stage of the development, but was changed during the review process to one digest per line. Update the Kconfig doc accordingly.
--- security/loadpin/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/loadpin/Kconfig +1 -1
@@ -33,4 +33,4 @@ config SECURITY_LOADPIN_VERITY on the LoadPin securityfs entry 'dm-verity'. The ioctl expects a file descriptor of a file with verity digests as parameter. The file must be located on the pinned root and - contain a comma separated list of digests. + contain one digest per line.
Greg Kroah-Hartman
maintainerPATCH 176/862 KVM: nVMX: Dont propagate vmcs12s PERF_GLOBAL_CTRL settings to vmcs02
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit def9d705c05eab3fdedeb10ad67907513b12038e upstream.
Don't propagate vmcs12's VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL to vmcs02. KVM doesn't disallow L1 from using VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL even when KVM itself doesn't use the control, e.g. due to the various CPU errata that where the MSR can be corrupted on VM-Exit.
Preserve KVM's (vmcs01) setting to hopefully avoid having to toggle the bit in vmcs02 at a later point. E.g. if KVM is loading PERF_GLOBAL_CTRL when running L1, then odds are good KVM will also load the MSR when running L2.
--- arch/x86/kvm/vmx/nested.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/kvm/vmx/nested.c +6 -1
@@ -2328,9 +2328,14 @@ static void prepare_vmcs02_early(struct* are emulated by vmx_set_efer() in prepare_vmcs02(), but speculate * on the related bits (if supported by the CPU) in the hope that * we can avoid VMWrites during vmx_set_efer(). +* +* Similarly, take vmcs01's PERF_GLOBAL_CTRL in the hope that if KVM is +* loading PERF_GLOBAL_CTRL via the VMCS for L1, then KVM will want to +* do the same for L2. */ exec_control =__vm_entry_controls_get (vmcs01); - exec_control |= vmcs12->vm_entry_controls; + exec_control |= (vmcs12->vm_entry_controls & + ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL ); exec_control &= ~(VM_ENTRY_IA32E_MODE |VM_ENTRY_LOAD_IA32_EFER );if (cpu_has_load_ia32_efer ()) {if (guest_efer &EFER_LMA )
Greg Kroah-Hartman
maintainerPATCH 76/862 drm/virtio: Unlock reservations on dma_resv_reserve_fences() error
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
commit 0f877398d30e1df657a31a62f7c7de1869b072b5 upstream.
Unlock reservations on dma_resv_reserve_fences() error to fix recursive locking of the reservations when this error happens.
--- drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_gem.c +3 -1
@@ -228,8 +228,10 @@ int virtio_gpu_array_lock_resv(struct vifor (i =0 ; i < objs->nents; ++i) { ret =dma_resv_reserve_fences (objs->objs[i]->resv,1 ); -if (ret) +if (ret) { +virtio_gpu_array_unlock_resv (objs);return ret; + } }return ret; }
Greg Kroah-Hartman
maintainerPATCH 178/862 KVM: VMX: Drop bits 31:16 when shoving exception error code into VMCS
In reply to Greg Kroah-HartmanFrom: Sean Christopherson <[email protected]>
commit eba9799b5a6efe2993cf92529608e4aa8163d73b upstream.
Deliberately truncate the exception error code when shoving it into the VMCS (VM-Entry field for vmcs01 and vmcs02, VM-Exit field for vmcs12). Intel CPUs are incapable of handling 32-bit error codes and will never generate an error code with bits 31:16, but userspace can provide an arbitrary error code via KVM_SET_VCPU_EVENTS. Failure to drop the bits on exception injection results in failed VM-Entry, as VMX disallows setting bits 31:16. Setting the bits on VM-Exit would at best confuse L1, and at worse induce a nested VM-Entry failure, e.g. if L1 decided to reinject the exception back into L2.
--- arch/x86/kvm/vmx/nested.c | 11 ++++++++++- arch/x86/kvm/vmx/vmx.c | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-)
arch/x86/kvm/vmx/nested.c +10 -1
@@ -3832,7 +3832,16 @@ static void nested_vmx_inject_exception_u32 intr_info = nr |INTR_INFO_VALID_MASK ;if (vcpu->arch.exception.has_error_code) { - vmcs12->vm_exit_intr_error_code = vcpu->arch.exception.error_code; +/* +* Intel CPUs do not generate error codes with bits 31:16 set, +* and more importantly VMX disallows setting bits 31:16 in the +* injected error code for VM-Entry. Drop the bits to mimic +* hardware and avoid inducing failure on nested VM-Entry if L1 +* chooses to inject the exception back to L2. AMD CPUs _do_ +* generate "full" 32-bit error codes, so KVM allows userspace +* to inject exception error codes with bits 31:16 set. +*/ + vmcs12->vm_exit_intr_error_code = (u16 )vcpu->arch.exception.error_code; intr_info |=INTR_INFO_DELIVER_CODE_MASK ; }
arch/x86/kvm/vmx/vmx.c +11 -1
@@ -1695,7 +1695,17 @@ static void vmx_queue_exception(struct kkvm_deliver_exception_payload (vcpu);if (has_error_code) { -vmcs_write32 (VM_ENTRY_EXCEPTION_ERROR_CODE , error_code); +/* +* Despite the error code being architecturally defined as 32 +* bits, and the VMCS field being 32 bits, Intel CPUs and thus +* VMX don't actually supporting setting bits 31:16. Hardware +* will (should) never provide a bogus error code, but AMD CPUs +* do generate error codes with bits 31:16 set, and so KVM's +* ABI lets userspace shove in arbitrary 32-bit values. Drop +* the upper bits to avoid VM-Fail, losing information that +* does't really exist is preferable to killing the VM. +*/ +vmcs_write32 (VM_ENTRY_EXCEPTION_ERROR_CODE , (u16 )error_code); intr_info |=INTR_INFO_DELIVER_CODE_MASK ; }
Greg Kroah-Hartman
maintainerPATCH 214/862 ARM: 9243/1: riscpc: Unbreak the build
In reply to Greg Kroah-HartmanFrom: Bart Van Assche <[email protected]>
[ Upstream commit 32844a8eecaa4a3e65841c53e43e04a9087d1ef6 ]
This patch fixes the following build error:
In file included from ./include/linux/io.h:13,
from ./arch/arm/mach-rpc/include/mach/uncompress.h:9, from arch/arm/boot/compressed/misc.c:31:./arch/arm/include/asm/io.h:85:22: error: conflicting types for ‘__raw_writeb’
85 | #define __raw_writeb __raw_writeb
| ^~~~~~~~~~~~
./arch/arm/include/asm/io.h:86:20: note: in expansion of macro ‘__raw_writeb’
86 | static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
| ^~~~~~~~~~~~
In file included from arch/arm/boot/compressed/misc.c:26:
arch/arm/boot/compressed/misc-ep93xx.h:13:20: note: previous definition of ‘__raw_writeb’ was here
13 | static inline void __raw_writeb(unsigned char value, unsigned int ptr)
| ^~~~~~~~~~~~To: Russell King <[email protected]>
--- arch/arm/boot/compressed/misc.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/compressed/misc.c +2 -0
@@ -23,7 +23,9 @@ unsigned int __machine_arch_type;#include <linux/types.h> #include <linux/linkage.h> #include "misc.h" +#ifdef CONFIG_ARCH_EP93XX #include "misc-ep93xx.h" +#endif static void putstr (const char *ptr);
Signature · 9 lines
2.35.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Greg Kroah-Hartman
maintainerPATCH 139/862 ext4: dont increase iversion counter for ea_inodes
In reply to Greg Kroah-HartmanFrom: Lukas Czerner <[email protected]>
commit 50f094a5580e6297bf10a807d16f0ee23fa576cf upstream.
ea_inodes are using i_version for storing part of the reference count so we really need to leave it alone.
The problem can be reproduced by xfstest ext4/026 when iversion is enabled. Fix it by not calling inode_inc_iversion() for EXT4_EA_INODE_FL inodes in ext4_mark_iloc_dirty().
--- fs/ext4/inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/ext4/inode.c +6 -1
@@ -5731,7 +5731,12 @@ int ext4_mark_iloc_dirty(handle_t *handl }ext4_fc_track_inode (handle, inode); -if (IS_I_VERSION (inode)) +/* +* ea_inodes are using i_version for storing reference count, don't +* mess with it +*/ +if (IS_I_VERSION (inode) && + !(EXT4_I (inode)->i_flags &EXT4_EA_INODE_FL ))inode_inc_iversion (inode);/* the do_update_inode consumes one bh->b_count */
Greg Kroah-Hartman
maintainerPATCH 153/862 ring-buffer: Have the shortest_full queue be the shortest not longest
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (Google) <[email protected]>
commit 3b19d614b61b93a131f463817e08219c9ce1fee3 upstream.
The logic to know when the shortest waiters on the ring buffer should be woken up or not has uses a less than instead of a greater than compare, which causes the shortest_full to actually be the longest.
--- kernel/trace/ring_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ring_buffer.c +1 -1
@@ -1011,7 +1011,7 @@ int ring_buffer_wait(struct trace_buffer nr_pages = cpu_buffer->nr_pages; dirty =ring_buffer_nr_dirty_pages (buffer, cpu);if (!cpu_buffer->shortest_full || - cpu_buffer->shortest_full < full) + cpu_buffer->shortest_full > full) cpu_buffer->shortest_full = full;raw_spin_unlock_irqrestore (&cpu_buffer->reader_lock, flags); if (!pagebusy &&
Greg Kroah-Hartman
maintainerPATCH 120/862 btrfs: fix race between quota enable and quota rescan ioctl
In reply to Greg Kroah-HartmanFrom: Filipe Manana <[email protected]>
commit 331cd9461412e103d07595a10289de90004ac890 upstream.
When enabling quotas, at btrfs_quota_enable(), after committing the transaction, we change fs_info->quota_root to point to the quota root we created and set BTRFS_FS_QUOTA_ENABLED at fs_info->flags. Then we try to start the qgroup rescan worker, first by initializing it with a call to qgroup_rescan_init() - however if that fails we end up freeing the quota root but we leave fs_info->quota_root still pointing to it, this can later result in a use-after-free somewhere else.
We have previously set the flags BTRFS_FS_QUOTA_ENABLED and BTRFS_QGROUP_STATUS_FLAG_ON, so we can only fail with -EINPROGRESS at btrfs_quota_enable(), which is possible if someone already called the quota rescan ioctl, and therefore started the rescan worker.
So fix this by ignoring an -EINPROGRESS and asserting we can't get any other error.
--- fs/btrfs/qgroup.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
fs/btrfs/qgroup.c +15 -0
@@ -1174,6 +1174,21 @@ out_add_root: fs_info->qgroup_rescan_running = true;btrfs_queue_work (fs_info->qgroup_rescan_workers, &fs_info->qgroup_rescan_work); + }else { +/* +* We have set both BTRFS_FS_QUOTA_ENABLED and +* BTRFS_QGROUP_STATUS_FLAG_ON, so we can only fail with +* -EINPROGRESS. That can happen because someone started the +* rescan worker by calling quota rescan ioctl before we +* attempted to initialize the rescan worker. Failure due to +* quotas disabled in the meanwhile is not possible, because +* we are holding a write lock on fs_info->subvol_sem, which +* is also acquired when disabling quotas. +* Ignore such error, and any other error would need to undo +* everything we did in the transaction we just committed. +*/ +ASSERT (ret == -EINPROGRESS ); + ret =0 ; } out_free_path:
Greg Kroah-Hartman
maintainerPATCH 122/862 btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
commit cbddcc4fa3443fe8cfb2ff8e210deb1f6a0eea38 upstream.
syzbot is reporting uninit-value in btrfs_clean_tree_block() [1], for commit bc877d285ca3dba2 ("btrfs: Deduplicate extent_buffer init code") missed that btrfs_set_header_generation() in btrfs_init_new_buffer() must not be moved to after clean_tree_block() because clean_tree_block() is calling btrfs_header_generation() since commit 55c69072d6bd5be1 ("Btrfs:
Fix extent_buffer usage when nodesize != leafsize").
Since memzero_extent_buffer() will reset "struct btrfs_header" part, we can't move btrfs_set_header_generation() to before memzero_extent_buffer(). Just re-add btrfs_set_header_generation() before btrfs_clean_tree_block().
--- fs/btrfs/extent-tree.c | 3 +++ 1 file changed, 3 insertions(+)
fs/btrfs/extent-tree.c +3 -0
@@ -4888,6 +4888,9 @@ btrfs_init_new_buffer(struct btrfs_trans !test_bit(BTRFS_ROOT_RESET_LOCKDEP_CLASS, &root->state)) lockdep_owner =BTRFS_FS_TREE_OBJECTID ; +/* btrfs_clean_tree_block() accesses generation field. */ +btrfs_set_header_generation (buf, trans->transid); +/* * This needs to stay, because we could allocate a freed block from an * old tree into a new tree, so we need to make sure this new block is
Greg Kroah-Hartman
maintainerPATCH 188/862 drm/i915: Fix watermark calculations for DG2 CCS+CC modifier
In reply to Greg Kroah-HartmanFrom: Ville Syrjälä <[email protected]>
commit b2e3a1af8cce4117de06ff1a4eab0749753ede27 upstream.
Take the DG2 CCS+CC modifier into account when calculating the watermarks. Othwerwise we'll calculate the watermarks thinking this tile-4 modifier is linear.
The rc_surface part is actually a nop since that is not used for any glk+ platform.
--- drivers/gpu/drm/i915/intel_pm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -2
@@ -5313,7 +5313,8 @@ skl_compute_wm_params(const struct intel modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS || modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier ==I915_FORMAT_MOD_4_TILED_DG2_RC_CCS || - modifier ==I915_FORMAT_MOD_4_TILED_DG2_MC_CCS ; + modifier ==I915_FORMAT_MOD_4_TILED_DG2_MC_CCS || + modifier ==I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ; wp->x_tiled = modifier ==I915_FORMAT_MOD_X_TILED ; wp->rc_surface = modifier ==I915_FORMAT_MOD_Y_TILED_CCS || modifier == I915_FORMAT_MOD_Yf_TILED_CCS ||
@@ -5321,7 +5322,8 @@ skl_compute_wm_params(const struct intel modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS || modifier ==I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC || modifier ==I915_FORMAT_MOD_4_TILED_DG2_RC_CCS || - modifier ==I915_FORMAT_MOD_4_TILED_DG2_MC_CCS ; + modifier ==I915_FORMAT_MOD_4_TILED_DG2_MC_CCS || + modifier ==I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ; wp->is_planar =intel_format_info_is_yuv_semiplanar (format, modifier); wp->width = width;
Greg Kroah-Hartman
maintainerPATCH 181/862 drm/nouveau: fix a use-after-free in nouveau_gem_prime_import_sg_table()
In reply to Greg Kroah-HartmanFrom: Jianglei Nie <[email protected]>
commit 540dfd188ea2940582841c1c220bd035a7db0e51 upstream.
nouveau_bo_init() is backed by ttm_bo_init() and ferries its return code back to the caller. On failures, ttm will call nouveau_bo_del_ttm() and free the memory.Thus, when nouveau_bo_init() returns an error, the gem object has already been released. Then the call to nouveau_bo_ref() will use the freed "nvbo->bo" and lead to a use-after-free bug.
We should delete the call to nouveau_bo_ref() to avoid the use-after-free.
--- drivers/gpu/drm/nouveau/nouveau_prime.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_prime.c +0 -1
@@ -71,7 +71,6 @@ struct drm_gem_object *nouveau_gem_prime ret =nouveau_bo_init (nvbo, size, align,NOUVEAU_GEM_DOMAIN_GART , sg, robj);if (ret) { -nouveau_bo_ref (NULL , &nvbo); obj =ERR_PTR (ret); goto unlock; }
Greg Kroah-Hartman
maintainerPATCH 155/862 ring-buffer: Add ring_buffer_wake_waiters()
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (Google) <[email protected]>
commit 7e9fbbb1b776d8d7969551565bc246f74ec53b27 upstream.
On closing of a file that represents a ring buffer or flushing the file, there may be waiters on the ring buffer that needs to be woken up and exit the ring_buffer_wait() function.
Add ring_buffer_wake_waiters() to wake up the waiters on the ring buffer and allow them to exit the wait loop.
--- include/linux/ring_buffer.h | 2 +- kernel/trace/ring_buffer.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-)
include/linux/ring_buffer.h +1 -1
@@ -101,7 +101,7 @@ __ring_buffer_alloc(unsigned long size,int ring_buffer_wait (struct trace_buffer *buffer,int cpu,int full);__poll_t ring_buffer_poll_wait (struct trace_buffer *buffer,int cpu,struct file *filp,poll_table *poll_table); - +void ring_buffer_wake_waiters (struct trace_buffer *buffer,int cpu);#define RING_BUFFER_ALL_CPUS -1
kernel/trace/ring_buffer.c +39 -0
@@ -413,6 +413,7 @@ struct rb_irq_work {struct irq_work work;wait_queue_head_t waiters;wait_queue_head_t full_waiters; +long wait_index;bool waiters_pending;bool full_waiters_pending;bool wakeup_full;
@@ -925,6 +926,37 @@ static void rb_wake_up_waiters(struct ir }/** +* ring_buffer_wake_waiters - wake up any waiters on this ring buffer +* @buffer: The ring buffer to wake waiters on +* +* In the case of a file that represents a ring buffer is closing, +* it is prudent to wake up any waiters that are on this. +*/ +void ring_buffer_wake_waiters (struct trace_buffer *buffer,int cpu) +{ +struct ring_buffer_per_cpu *cpu_buffer; +struct rb_irq_work *rbwork; + +if (cpu ==RING_BUFFER_ALL_CPUS ) { + +/* Wake up individual ones too. One level recursion */ +for_each_buffer_cpu (buffer, cpu) +ring_buffer_wake_waiters (buffer, cpu); + + rbwork = &buffer->irq_work; + }else { + cpu_buffer = buffer->buffers[cpu]; + rbwork = &cpu_buffer->irq_work; + } + + rbwork->wait_index++; +/* make sure the waiters see the new index */ +smp_wmb (); + +rb_wake_up_waiters (&rbwork->work); +} + +/** * ring_buffer_wait - wait for input to the ring buffer * @buffer: buffer to wait on * @cpu: the cpu buffer to wait on
@@ -939,6 +971,7 @@ int ring_buffer_wait(struct trace_bufferstruct ring_buffer_per_cpu *cpu_buffer;DEFINE_WAIT (wait);struct rb_irq_work *work; +long wait_index;int ret =0 ;/*
@@ -957,6 +990,7 @@ int ring_buffer_wait(struct trace_buffer work = &cpu_buffer->irq_work; } + wait_index =READ_ONCE (work->wait_index);while (true) {if (full)
@@ -1021,6 +1055,11 @@ int ring_buffer_wait(struct trace_buffer }schedule (); + +/* Make sure to see the new wait index */ +smp_rmb (); +if (wait_index != work->wait_index) +break ; }if (full)
Greg Kroah-Hartman
maintainerPATCH 156/862 ring-buffer: Fix race between reset page and reading page
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (Google) <[email protected]>
commit a0fcaaed0c46cf9399d3a2d6e0c87ddb3df0e044 upstream.
The ring buffer is broken up into sub buffers (currently of page size). Each sub buffer has a pointer to its "tail" (the last event written to the sub buffer). When a new event is requested, the tail is locally incremented to cover the size of the new event. This is done in a way that there is no need for locking.
If the tail goes past the end of the sub buffer, the process of moving to the next sub buffer takes place. After setting the current sub buffer to the next one, the previous one that had the tail go passed the end of the sub buffer needs to be reset back to the original tail location (before the new event was requested) and the rest of the sub buffer needs to be "padded".
The race happens when a reader takes control of the sub buffer. As readers do a "swap" of sub buffers from the ring buffer to get exclusive access to the sub buffer, it replaces the "head" sub buffer with an empty sub buffer that goes back into the writable portion of the ring buffer. This swap can happen as soon as the writer moves to the next sub buffer and before it updates the last sub buffer with padding.
Because the sub buffer can be released to the reader while the writer is still updating the padding, it is possible for the reader to see the event that goes past the end of the sub buffer. This can cause obvious issues.
To fix this, add a few memory barriers so that the reader definitely sees the updates to the sub buffer, and also waits until the writer has put back the "tail" of the sub buffer back to the last event that was written on it.
To be paranoid, it will only spin for 1 second, otherwise it will warn and shutdown the ring buffer code. 1 second should be enough as the writer does have preemption disabled. If the writer doesn't move within 1 second (with preemption disabled) something is horribly wrong. No interrupt should last 1 second!
--- kernel/trace/ring_buffer.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
kernel/trace/ring_buffer.c +33 -0
@@ -2648,6 +2648,9 @@ rb_reset_tail(struct ring_buffer_per_cpu/* Mark the rest of the page with padding */ rb_event_set_padding (event); +/* Make sure the padding is visible before the write update */ +smp_wmb (); +/* Set the write back to the previous setting */ local_sub (length, &tail_page->write);return ;
@@ -2659,6 +2662,9 @@ rb_reset_tail(struct ring_buffer_per_cpu/* time delta must be non zero */ event->time_delta =1 ; +/* Make sure the padding is visible before the tail_page->write update */ +smp_wmb (); +/* Set write to end of buffer */ length = (tail + length) -BUF_PAGE_SIZE ;local_sub (length, &tail_page->write);
@@ -4627,6 +4633,33 @@ rb_get_reader_page(struct ring_buffer_pearch_spin_unlock (&cpu_buffer->lock);local_irq_restore (flags); +/* +* The writer has preempt disable, wait for it. But not forever +* Although, 1 second is pretty much "forever" +*/ +#define USECS_WAIT 1000000 +for (nr_loops =0 ; nr_loops <USECS_WAIT ; nr_loops++) { +/* If the write is past the end of page, a writer is still updating it */ +if (likely (!reader ||rb_page_write (reader) <=BUF_PAGE_SIZE )) +break ; + +udelay (1 ); + +/* Get the latest version of the reader write value */ +smp_rmb (); + } + +/* The writer is not moving forward? Something is wrong */ +if (RB_WARN_ON (cpu_buffer, nr_loops ==USECS_WAIT )) + reader =NULL ; + +/* +* Make sure we see any padding after the write update +* (see rb_reset_tail()) +*/ +smp_rmb (); + +return reader; }
Greg Kroah-Hartman
maintainerPATCH 143/862 ext4: fix i_version handling in ext4
In reply to Greg Kroah-HartmanFrom: Jeff Layton <[email protected]>
commit a642c2c0827f5604a93f9fa1e5701eecdce4ae22 upstream.
ext4 currently updates the i_version counter when the atime is updated during a read. This is less than ideal as it can cause unnecessary cache invalidations with NFSv4 and unnecessary remeasurements for IMA.
The increment in ext4_mark_iloc_dirty is also problematic since it can corrupt the i_version counter for ea_inodes. We aren't bumping the file times in ext4_mark_iloc_dirty, so changing the i_version there seems wrong, and is the cause of both problems.
Remove that callsite and add increments to the setattr, setxattr and ioctl codepaths, at the same times that we update the ctime. The i_version bump that already happens during timestamp updates should take care of the rest.
In ext4_move_extents, increment the i_version on both inodes, and also add in missing ctime updates.
[ Some minor updates since we've already enabled the i_version counter
unconditionally already via another patch series. -- TYT ]
--- fs/ext4/inode.c | 14 +++++--------- fs/ext4/ioctl.c | 4 ++++ fs/ext4/xattr.c | 1 + 3 files changed, 10 insertions(+), 9 deletions(-)
fs/ext4/inode.c +5 -9
@@ -5349,6 +5349,7 @@ int ext4_setattr(struct user_namespace *int error, rc =0 ;int orphan =0 ;const unsigned int ia_valid = attr->ia_valid; +bool inc_ivers = true;if (unlikely (ext4_forced_shutdown (EXT4_SB (inode->i_sb))))return -EIO ;
@@ -5432,8 +5433,8 @@ int ext4_setattr(struct user_namespace *return -EINVAL ; } -if (attr->ia_size != inode->i_size) -inode_inc_iversion (inode); +if (attr->ia_size == inode->i_size) + inc_ivers = false;if (shrink) {if (ext4_should_order_data (inode)) {
@@ -5535,6 +5536,8 @@ out_mmap_sem: }if (!error) { +if (inc_ivers) +inode_inc_iversion (inode);setattr_copy (mnt_userns, inode, attr);mark_inode_dirty (inode); }
@@ -5738,13 +5741,6 @@ int ext4_mark_iloc_dirty(handle_t *handl }ext4_fc_track_inode (handle, inode); -/* -* ea_inodes are using i_version for storing reference count, don't -* mess with it -*/ -if (!(EXT4_I (inode)->i_flags &EXT4_EA_INODE_FL )) -inode_inc_iversion (inode); -/* the do_update_inode consumes one bh->b_count */ get_bh (iloc->bh);
fs/ext4/ioctl.c +4 -0
@@ -452,6 +452,7 @@ static long swap_inode_boot_loader(strucswap_inode_data (inode, inode_bl); inode->i_ctime = inode_bl->i_ctime =current_time (inode); +inode_inc_iversion (inode); inode->i_generation =prandom_u32 (); inode_bl->i_generation =prandom_u32 ();
@@ -665,6 +666,7 @@ static int ext4_ioctl_setflags(struct inext4_set_inode_flags (inode, false); inode->i_ctime =current_time (inode); +inode_inc_iversion (inode); err =ext4_mark_iloc_dirty (handle, inode, &iloc); flags_err:
@@ -775,6 +777,7 @@ static int ext4_ioctl_setproject(structEXT4_I (inode)->i_projid = kprojid; inode->i_ctime =current_time (inode); +inode_inc_iversion (inode); out_dirty: rc =ext4_mark_iloc_dirty (handle, inode, &iloc);if (!err)
@@ -1257,6 +1260,7 @@ static long __ext4_ioctl(struct file *fi err =ext4_reserve_inode_write (handle, inode, &iloc);if (err ==0 ) { inode->i_ctime =current_time (inode); +inode_inc_iversion (inode); inode->i_generation = generation; err =ext4_mark_iloc_dirty (handle, inode, &iloc); }
fs/ext4/xattr.c +1 -0
@@ -2412,6 +2412,7 @@ retry_inode:if (!error) {ext4_xattr_update_super_block (handle, inode->i_sb); inode->i_ctime =current_time (inode); +inode_inc_iversion (inode);if (!value) no_expand =0 ; error =ext4_mark_iloc_dirty (handle, inode, &is.iloc);
Greg Kroah-Hartman
maintainerPATCH 128/862 f2fs: fix to do sanity check on summary info
In reply to Greg Kroah-HartmanFrom: Chao Yu <[email protected]>
commit c6ad7fd16657ebd34a87a97d9588195aae87597d upstream.
As Wenqing Liu reported in bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=216456
BUG: KASAN: use-after-free in recover_data+0x63ae/0x6ae0 [f2fs] Read of size 4 at addr ffff8881464dcd80 by task mount/1013 CPU: 3 PID: 1013 Comm: mount Tainted: G W 6.0.0-rc4 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x45/0x5e print_report.cold+0xf3/0x68d kasan_report+0xa8/0x130 recover_data+0x63ae/0x6ae0 [f2fs] f2fs_recover_fsync_data+0x120d/0x1fc0 [f2fs] f2fs_fill_super+0x4665/0x61e0 [f2fs] mount_bdev+0x2cf/0x3b0 legacy_get_tree+0xed/0x1d0 vfs_get_tree+0x81/0x2b0 path_mount+0x47e/0x19d0 do_mount+0xce/0xf0 __x64_sys_mount+0x12c/0x1a0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd
The root cause is: in fuzzed image, SSA table is corrupted: ofs_in_node is larger than ADDRS_PER_PAGE(), result in out-of-range access on 4k-size page.
- recover_data
- do_recover_data
- check_index_in_prev_nodes
- f2fs_data_blkaddr
This patch adds sanity check on summary info in recovery and GC flow in where the flows rely on them.
After patch:
[ 29.310883] F2FS-fs (loop0): Inconsistent ofs_in_node:65286 in summary, ino:0, nid:6, max:1018
--- fs/f2fs/gc.c | 10 +++++++++- fs/f2fs/recovery.c | 15 ++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-)
fs/f2fs/gc.c +9 -1
@@ -1078,7 +1078,7 @@ static bool is_alive(struct f2fs_sb_info {struct page *node_page;nid_t nid; -unsigned int ofs_in_node; +unsigned int ofs_in_node, max_addrs;block_t source_blkaddr; nid =le32_to_cpu (sum->nid);
@@ -1104,6 +1104,14 @@ static bool is_alive(struct f2fs_sb_inforeturn false; } + max_addrs =IS_INODE (node_page) ?DEF_ADDRS_PER_INODE : +DEF_ADDRS_PER_BLOCK ; +if (ofs_in_node >= max_addrs) { +f2fs_err (sbi,"Inconsistent ofs_in_node:%u in summary, ino:%u, nid:%u, max:%u" , + ofs_in_node, dni->ino, dni->nid, max_addrs); +return false; + } + *nofs =ofs_of_node (node_page); source_blkaddr =data_blkaddr (NULL , node_page, ofs_in_node);f2fs_put_page (node_page,1 );
fs/f2fs/recovery.c +12 -3
@@ -474,7 +474,7 @@ static int check_index_in_prev_nodes(strstruct dnode_of_data tdn = *dn;nid_t ino, nid;struct inode *inode; -unsigned int offset; +unsigned int offset, ofs_in_node, max_addrs;block_t bidx;int i;
@@ -501,15 +501,24 @@ static int check_index_in_prev_nodes(str got_it:/* Use the locked dnode page and inode */ nid =le32_to_cpu (sum.nid); + ofs_in_node =le16_to_cpu (sum.ofs_in_node); + + max_addrs =ADDRS_PER_PAGE (dn->node_page, dn->inode); +if (ofs_in_node >= max_addrs) { +f2fs_err (sbi,"Inconsistent ofs_in_node:%u in summary, ino:%lu, nid:%u, max:%u" , + ofs_in_node, dn->inode->i_ino, nid, max_addrs); +return -EFSCORRUPTED ; + } +if (dn->inode->i_ino == nid) { tdn.nid = nid;if (!dn->inode_page_locked)lock_page (dn->inode_page); tdn.node_page = dn->inode_page; - tdn.ofs_in_node =le16_to_cpu (sum.ofs_in_node); + tdn.ofs_in_node = ofs_in_node; goto truncate_out; }else if (dn->nid == nid) { - tdn.ofs_in_node =le16_to_cpu (sum.ofs_in_node); + tdn.ofs_in_node = ofs_in_node; goto truncate_out; }
Greg Kroah-Hartman
maintainerPATCH 111/862 hwrng: core - let sleep be interrupted when unregistering hwrng
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit 36cb6494429bd64b27b7ff8b4af56f8e526da2b4 upstream.
There are two deadlock scenarios that need addressing, which cause problems when the computer goes to sleep, the interface is set down, and hwrng_unregister() is called. When the deadlock is hit, sleep is delayed for tens of seconds, causing it to fail. These scenarios are:
1) The hwrng kthread can't be stopped while it's sleeping, because it uses msleep_interruptible() which does not react to kthread_stop.
2) A normal user thread can't be interrupted by hwrng_unregister() while it's sleeping, because hwrng_unregister() is called from elsewhere.
We solve both issues by add a completion object called dying that fulfils waiters once we have started the process in hwrng_unregister.
At the same time, we should cleanup a common and useless dmesg splat in the same area.
--- drivers/char/hw_random/core.c | 19 +++++++++++++++---- drivers/net/wireless/ath/ath9k/rng.c | 3 ++- include/linux/hw_random.h | 3 +++ 3 files changed, 20 insertions(+), 5 deletions(-)
drivers/char/hw_random/core.c +15 -4
@@ -507,16 +507,17 @@ static int hwrng_fillfn(void *unused) rng->quality = current_quality;/* obsolete */ quality = rng->quality;mutex_unlock (&reading_mutex); + +if (rc <=0 ) +hwrng_msleep (rng,10000 ); +put_rng (rng);if (!quality)break ; -if (rc <=0 ) { -pr_warn ("hwrng: no data available\n" ); -msleep_interruptible (10000 ); +if (rc <=0 )continue ; - }/* If we cannot credit at least one bit of entropy, * keep track of the remainder for the next iteration
@@ -570,6 +571,7 @@ int hwrng_register(struct hwrng *rng)init_completion (&rng->cleanup_done);complete (&rng->cleanup_done); +init_completion (&rng->dying);if (!current_rng || (!cur_rng_set_by_user && rng->quality > current_rng->quality)) {
@@ -617,6 +619,7 @@ void hwrng_unregister(struct hwrng *rng) old_rng = current_rng;list_del (&rng->list); +complete_all (&rng->dying);if (current_rng == rng) { err =enable_best_rng ();if (err) {
@@ -685,6 +688,14 @@ void devm_hwrng_unregister(struct device }EXPORT_SYMBOL_GPL (devm_hwrng_unregister); +long hwrng_msleep (struct hwrng *rng,unsigned int msecs) +{ +unsigned long timeout =msecs_to_jiffies (msecs) +1 ; + +return wait_for_completion_interruptible_timeout (&rng->dying, timeout); +} +EXPORT_SYMBOL_GPL (hwrng_msleep); +static int __init hwrng_modinit (void ) {int ret;
drivers/net/wireless/ath/ath9k/rng.c +2 -1
@@ -83,7 +83,8 @@ static int ath9k_rng_read(struct hwrng *if (!wait || !max ||likely (bytes_read) || fail_stats >110 )break ; -msleep_interruptible (ath9k_rng_delay_get (++fail_stats)); +if (hwrng_msleep (rng,ath9k_rng_delay_get (++fail_stats))) +break ; }if (wait && !bytes_read && max)
include/linux/hw_random.h +3 -0
@@ -50,6 +50,7 @@ struct hwrng {struct list_head list;struct kref ref;struct completion cleanup_done; +struct completion dying; };struct device ;
@@ -61,4 +62,6 @@ extern int devm_hwrng_register(struct deextern void hwrng_unregister (struct hwrng *rng);extern void devm_hwrng_unregister (struct device *dve,struct hwrng *rng); +extern long hwrng_msleep (struct hwrng *rng,unsigned int msecs); +#endif /* LINUX_HWRANDOM_H_ */
Greg Kroah-Hartman
maintainerPATCH 130/862 jbd2: wake up journal waiters in FIFO order, not LIFO
In reply to Greg Kroah-HartmanFrom: Andrew Perepechko <[email protected]>
commit 34fc8768ec6089565d6d73bad26724083cecf7bd upstream.
LIFO wakeup order is unfair and sometimes leads to a journal user not being able to get a journal handle for hundreds of transactions in a row.
FIFO wakeup can make things more fair.
--- fs/jbd2/commit.c | 2 +- fs/jbd2/transaction.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
fs/jbd2/commit.c +1 -1
@@ -570,7 +570,7 @@ void jbd2_journal_commit_transaction(jou journal->j_running_transaction =NULL ; start_time =ktime_get (); commit_transaction->t_log_start = journal->j_head; -wake_up (&journal->j_wait_transaction_locked); +wake_up_all (&journal->j_wait_transaction_locked);write_unlock (&journal->j_state_lock);jbd2_debug (3 ,"JBD2: commit phase 2a\n" );
fs/jbd2/transaction.c +3 -3
@@ -168,7 +168,7 @@ static void wait_transaction_locked(jourint need_to_start;tid_t tid = journal->j_running_transaction->t_tid; -prepare_to_wait (&journal->j_wait_transaction_locked, &wait, +prepare_to_wait_exclusive (&journal->j_wait_transaction_locked, &wait,TASK_UNINTERRUPTIBLE ); need_to_start = !tid_geq (journal->j_commit_request, tid);read_unlock (&journal->j_state_lock);
@@ -194,7 +194,7 @@ static void wait_transaction_switching(jread_unlock (&journal->j_state_lock);return ; } -prepare_to_wait (&journal->j_wait_transaction_locked, &wait, +prepare_to_wait_exclusive (&journal->j_wait_transaction_locked, &wait,TASK_UNINTERRUPTIBLE );read_unlock (&journal->j_state_lock);/*
@@ -920,7 +920,7 @@ void jbd2_journal_unlock_updates (journawrite_lock (&journal->j_state_lock); --journal->j_barrier_count;write_unlock (&journal->j_state_lock); -wake_up (&journal->j_wait_transaction_locked); +wake_up_all (&journal->j_wait_transaction_locked); }static void warn_dirty_buffer (struct buffer_head *bh)
Greg Kroah-Hartman
maintainerPATCH 159/862 tracing: Wake up ring buffer waiters on closing of the file
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (Google) <[email protected]>
commit f3ddb74ad0790030c9592229fb14d8c451f4e9a8 upstream.
When the file that represents the ring buffer is closed, there may be waiters waiting on more input from the ring buffer. Call ring_buffer_wake_waiters() to wake up any waiters when the file is closed.
--- include/linux/trace_events.h | 1 + kernel/trace/trace.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+)
include/linux/trace_events.h +1 -0
@@ -92,6 +92,7 @@ struct trace_iterator {unsigned int temp_size;char *fmt;/* modified format holder */ unsigned int fmt_size; +long wait_index;/* trace_seq for __print_flags() and __print_symbolic() etc. */ struct trace_seq tmp_seq;
kernel/trace/trace.c +15 -0
@@ -8160,6 +8160,12 @@ static int tracing_buffers_release(struc__trace_array_put (iter->tr); + iter->wait_index++; +/* Make sure the waiters see the new wait_index */ +smp_wmb (); + +ring_buffer_wake_waiters (iter->array_buffer->buffer, iter->cpu_file); +if (info->spare)ring_buffer_free_read_page (iter->array_buffer->buffer, info->spare_cpu, info->spare);
@@ -8313,6 +8319,8 @@ tracing_buffers_splice_read(struct file/* did we read anything? */ if (!spd.nr_pages) { +long wait_index; +if (ret) goto out;
@@ -8320,10 +8328,17 @@ tracing_buffers_splice_read(struct fileif ((file->f_flags &O_NONBLOCK ) || (flags &SPLICE_F_NONBLOCK )) goto out; + wait_index =READ_ONCE (iter->wait_index); + ret =wait_on_pipe (iter, iter->tr->buffer_percent);if (ret) goto out; +/* Make sure we see the new wait_index */ +smp_rmb (); +if (wait_index != iter->wait_index) + goto out; + goto again; }
Greg Kroah-Hartman
maintainerPATCH 134/862 ext2: Add sanity checks for group and filesystem size
In reply to Greg Kroah-HartmanFrom: Jan Kara <[email protected]>
commit d766f2d1e3e3bd44024a7f971ffcf8b8fbb7c5d2 upstream.
Add sanity check that filesystem size does not exceed the underlying device size and that group size is big enough so that metadata can fit into it. This avoid trying to mount some crafted filesystems with extremely large group counts.
--- fs/ext2/super.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
fs/ext2/super.c +14 -2
@@ -1052,6 +1052,13 @@ static int ext2_fill_super(struct super_ sbi->s_blocks_per_group); goto failed_mount; } +/* At least inode table, bitmaps, and sb have to fit in one group */ +if (sbi->s_blocks_per_group <= sbi->s_itb_per_group +3 ) { +ext2_msg (sb,KERN_ERR , +"error: #blocks per group smaller than metadata size: %lu <= %lu" , + sbi->s_blocks_per_group, sbi->s_inodes_per_group +3 ); + goto failed_mount; + }if (sbi->s_frags_per_group > sb->s_blocksize *8 ) { ext2_msg(sb, KERN_ERR, "error: #fragments per group too big: %lu",
@@ -1065,9 +1072,14 @@ static int ext2_fill_super(struct super_ sbi->s_inodes_per_group); goto failed_mount; } +if (sb_bdev_nr_blocks (sb) <le32_to_cpu (es->s_blocks_count)) { +ext2_msg (sb,KERN_ERR , +"bad geometry: block count %u exceeds size of device (%u blocks)" , +le32_to_cpu (es->s_blocks_count), + (unsigned )sb_bdev_nr_blocks (sb)); + goto failed_mount; + } -if (EXT2_BLOCKS_PER_GROUP (sb) ==0 ) - goto cantfind_ext2; sbi->s_groups_count = ((le32_to_cpu (es->s_blocks_count) -le32_to_cpu (es->s_first_data_block) -1 ) /EXT2_BLOCKS_PER_GROUP (sb)) +1 ;
Greg Kroah-Hartman
maintainerPATCH 135/862 ext4: avoid crash when inline data creation follows DIO write
In reply to Greg Kroah-HartmanFrom: Jan Kara <[email protected]>
commit 4bb26f2885ac6930984ee451b952c5a6042f2c0e upstream.
When inode is created and written to using direct IO, there is nothing to clear the EXT4_STATE_MAY_INLINE_DATA flag. Thus when inode gets truncated later to say 1 byte and written using normal write, we will try to store the data as inline data. This confuses the code later because the inode now has both normal block and inline data allocated and the confusion manifests for example as:
kernel BUG at fs/ext4/inode.c:2721!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 359 Comm: repro Not tainted 5.19.0-rc8-00001-g31ba1e3b8305-dirty #15 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-1.fc36 04/01/2014 RIP: 0010:ext4_writepages+0x363d/0x3660 RSP: 0018:ffffc90000ccf260 EFLAGS: 00010293 RAX: ffffffff81e1abcd RBX: 0000008000000000 RCX: ffff88810842a180 RDX: 0000000000000000 RSI: 0000008000000000 RDI: 0000000000000000 RBP: ffffc90000ccf650 R08: ffffffff81e17d58 R09: ffffed10222c680b R10: dfffe910222c680c R11: 1ffff110222c680a R12: ffff888111634128 R13: ffffc90000ccf880 R14: 0000008410000000 R15: 0000000000000001 FS: 00007f72635d2640(0000) GS:ffff88811b000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000565243379180 CR3: 000000010aa74000 CR4: 0000000000150eb0 Call Trace: <TASK> do_writepages+0x397/0x640 filemap_fdatawrite_wbc+0x151/0x1b0 file_write_and_wait_range+0x1c9/0x2b0 ext4_sync_file+0x19e/0xa00 vfs_fsync_range+0x17b/0x190 ext4_buffered_write_iter+0x488/0x530 ext4_file_write_iter+0x449/0x1b90 vfs_write+0xbcd/0xf40 ksys_write+0x198/0x2c0 __x64_sys_write+0x7b/0x90 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd </TASK>
Fix the problem by clearing EXT4_STATE_MAY_INLINE_DATA when we are doing direct IO write to a file.
--- fs/ext4/file.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/ext4/file.c +6 -0
@@ -528,6 +528,12 @@ static ssize_t ext4_dio_write_iter(struc ret = -EAGAIN ; goto out; } +/* +* Make sure inline data cannot be created anymore since we are going +* to allocate blocks for DIO. We know the inode does not have any +* inline data now because ext4_dio_supported() checked for that. +*/ +ext4_clear_inode_state (inode,EXT4_STATE_MAY_INLINE_DATA ); offset = iocb->ki_pos; count = ret;
Greg Kroah-Hartman
maintainerPATCH 137/862 ext4: make ext4_lazyinit_thread freezable
In reply to Greg Kroah-HartmanFrom: Lalith Rajendran <[email protected]>
commit 3b575495ab8dbb4dbe85b4ac7f991693c3668ff5 upstream.
ext4_lazyinit_thread is not set freezable. Hence when the thread calls try_to_freeze it doesn't freeze during suspend and continues to send requests to the storage during suspend, resulting in suspend failures.
--- fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+)
fs/ext4/super.c +1 -0
@@ -3767,6 +3767,7 @@ static int ext4_lazyinit_thread(void *arunsigned long next_wakeup, cur;BUG_ON (NULL == eli); +set_freezable (); cont_thread:while (true) {
Greg Kroah-Hartman
maintainerPATCH 147/862 ext4: fix potential memory leak in ext4_fc_record_regions()
In reply to Greg Kroah-HartmanFrom: Ye Bin <[email protected]>
commit 7069d105c1f15c442b68af43f7fde784f3126739 upstream.
As krealloc may return NULL, in this case 'state->fc_regions' may not be freed by krealloc, but 'state->fc_regions' already set NULL. Then will lead to 'state->fc_regions' memory leak.
--- fs/ext4/fast_commit.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
fs/ext4/fast_commit.c +8 -6
@@ -1687,15 +1687,17 @@ int ext4_fc_record_regions(struct super_if (replay && state->fc_regions_used != state->fc_regions_valid) state->fc_regions_used = state->fc_regions_valid;if (state->fc_regions_used == state->fc_regions_size) { +struct ext4_fc_alloc_region *fc_regions; + state->fc_regions_size +=EXT4_FC_REPLAY_REALLOC_INCREMENT ; - state->fc_regions =krealloc ( - state->fc_regions, - state->fc_regions_size * -sizeof (struct ext4_fc_alloc_region ), -GFP_KERNEL ); -if (!state->fc_regions) + fc_regions =krealloc (state->fc_regions, + state->fc_regions_size * +sizeof (struct ext4_fc_alloc_region ), +GFP_KERNEL ); +if (!fc_regions)return -ENOMEM ; + state->fc_regions = fc_regions; } region = &state->fc_regions[state->fc_regions_used++]; region->ino = ino;
Greg Kroah-Hartman
maintainerPATCH 79/862 arm64: mte: move register initialization to C
In reply to Greg Kroah-HartmanFrom: Peter Collingbourne <[email protected]>
commit 973b9e37330656dec719ede508e4dc40e5c2d80c upstream.
If FEAT_MTE2 is disabled via the arm64.nomte command line argument on a CPU that claims to support FEAT_MTE2, the kernel will use Tagged Normal in the MAIR. If we interpret arm64.nomte to mean that the CPU does not in fact implement FEAT_MTE2, setting the system register like this may lead to UNSPECIFIED behavior. Fix it by arranging for MAIR to be set in the C function cpu_enable_mte which is called based on the sanitized version of the system register.
There is no need for the rest of the MTE-related system register initialization to happen from assembly, with the exception of TCR_EL1, which must be set to include at least TBI1 because the secondary CPUs access KASan-allocated data structures early. Therefore, make the TCR_EL1 initialization unconditional and move the rest of the initialization to cpu_enable_mte so that we no longer have a dependency on the unsanitized ID register value.
--- arch/arm64/include/asm/mte.h | 5 ++++ arch/arm64/kernel/cpufeature.c | 3 +- arch/arm64/kernel/mte.c | 51 +++++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/suspend.c | 2 + arch/arm64/mm/proc.S | 46 ++++-------------------------------- 5 files changed, 65 insertions(+), 42 deletions(-)
arch/arm64/include/asm/mte.h +5 -0
@@ -42,7 +42,9 @@ void mte_sync_tags(pte_t old_pte, pte_tvoid mte_copy_page_tags (void *kto,const void *kfrom);void mte_thread_init_user (void );void mte_thread_switch (struct task_struct *next); +void mte_cpu_setup (void );void mte_suspend_enter (void ); +void mte_suspend_exit (void );long set_mte_ctrl (struct task_struct *task,unsigned long arg);long get_mte_ctrl (struct task_struct *task); int mte_ptrace_copy_tags(struct task_struct *child, long request,
@@ -72,6 +74,9 @@ static inline void mte_thread_switch(strstatic inline void mte_suspend_enter (void ) { } +static inline void mte_suspend_exit (void ) +{ +}static inline long set_mte_ctrl (struct task_struct *task,unsigned long arg) {return 0 ;
arch/arm64/kernel/cpufeature.c +2 -1
@@ -2034,7 +2034,8 @@ static void bti_enable(const struct arm6static void cpu_enable_mte (struct arm64_cpu_capabilities const *cap) {sysreg_clear_set (sctlr_el1,0 , SCTLR_ELx_ATA |SCTLR_EL1_ATA0 ); -isb (); + +mte_cpu_setup ();/* * Clear the tags in the zero page. This needs to be done via the
arch/arm64/kernel/mte.c +51 -0
63 lines not on this page · raw message
arch/arm64/kernel/suspend.c +2 -0
@@ -43,6 +43,8 @@ void notrace __cpu_suspend_exit(void) {unsigned int cpu =smp_processor_id (); +mte_suspend_exit (); +/* * We are resuming from reset with the idmap active in TTBR0_EL1. * We must uninstall the idmap and restore the expected MMU
arch/arm64/mm/proc.S +5 -41
68 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 213/862 erofs: use kill_anon_super() to kill super in fscache mode
In reply to Greg Kroah-HartmanFrom: Jia Zhu <[email protected]>
[ Upstream commit 1015c1016c231b26d4e2c9b3da65b6c043eb97a3 ]
Use kill_anon_super() instead of generic_shutdown_super() since the mount() in erofs fscache mode uses get_tree_nodev() and associated anon bdev needs to be freed.
--- fs/erofs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/erofs/super.c +1 -1
@@ -879,7 +879,7 @@ static void erofs_kill_sb(struct super_block *sb)WARN_ON (sb->s_magic !=EROFS_SUPER_MAGIC );if (erofs_is_fscache_mode (sb)) -generic_shutdown_super (sb); +kill_anon_super (sb);else kill_block_super (sb);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 110/862 fbdev: smscufx: Fix use-after-free in ufx_ops_open()
In reply to Greg Kroah-HartmanFrom: Hyunwoo Kim <[email protected]>
commit 5610bcfe8693c02e2e4c8b31427f1bdbdecc839c upstream.
A race condition may occur if the user physically removes the USB device while calling open() for this device node.
This is a race condition between the ufx_ops_open() function and the ufx_usb_disconnect() function, which may eventually result in UAF.
So, add a mutex to the ufx_ops_open() and ufx_usb_disconnect() functions to avoid race contidion of krefs.
--- drivers/video/fbdev/smscufx.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/video/fbdev/smscufx.c +13 -1
@@ -137,6 +137,8 @@ static int ufx_submit_urb(struct ufx_datstatic int ufx_alloc_urb_list (struct ufx_data *dev,int count,size_t size);static void ufx_free_urb_list (struct ufx_data *dev); +static DEFINE_MUTEX (disconnect_mutex); +/* reads a control register */ static int ufx_reg_read (struct ufx_data *dev,u32 index,u32 *data) {
@@ -1071,9 +1073,13 @@ static int ufx_ops_open(struct fb_info *if (user ==0 && !console)return -EBUSY ; +mutex_lock (&disconnect_mutex); +/* If the USB device is gone, we don't accept new opens */ -if (dev->virtualized) +if (dev->virtualized) { +mutex_unlock (&disconnect_mutex);return -ENODEV ; + } dev->fb_count++;
@@ -1097,6 +1103,8 @@ static int ufx_ops_open(struct fb_info *pr_debug ("open /dev/fb%d user=%d fb_info=%p count=%d" , info->node, user, info, dev->fb_count); +mutex_unlock (&disconnect_mutex); +return 0 ; }
@@ -1741,6 +1749,8 @@ static void ufx_usb_disconnect(struct us {struct ufx_data *dev; +mutex_lock (&disconnect_mutex); + dev =usb_get_intfdata (interface);pr_debug ("USB disconnect starting\n" );
@@ -1761,6 +1771,8 @@ static void ufx_usb_disconnect(struct uskref_put (&dev->kref, ufx_free);/* consider ufx_data freed */ + +mutex_unlock (&disconnect_mutex); }static struct usb_driver ufx_driver = {