id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f781f661e8c99b0cb34129f2e374234d61864e77
Analyze and fix the following issue in the Linux kernel code: dma-buf: keep the signaling time of merged fences v3
Problem Details: Some Android CTS is testing if the signaling time keeps consistent during merges. v2: use the current time if the fence is still in the signaling path and the timestamp not yet available. v3: improve comment, fix one more case to use the correct timestamp Signed-off-by: Christian König <christian.koe...
```diff diff --git a/drivers/dma-buf/dma-fence-unwrap.c b/drivers/dma-buf/dma-fence-unwrap.c index 7002bca792ff..c625bb2b5d56 100644 --- a/drivers/dma-buf/dma-fence-unwrap.c +++ b/drivers/dma-buf/dma-fence-unwrap.c @@ -66,18 +66,36 @@ struct dma_fence *__dma_fence_unwrap_merge(unsigned int num_fences, { struct dma_f...
cada938a01586fc144902919e133354b1459db04
Analyze and fix the following issue in the Linux kernel code: s390: fix various typos
Problem Details: Fix various typos found with codespell. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
```diff diff --git a/arch/s390/boot/head.S b/arch/s390/boot/head.S index 7f006da22205..637c29c3f6e3 100644 --- a/arch/s390/boot/head.S +++ b/arch/s390/boot/head.S @@ -67,7 +67,7 @@ ipl_start: jz .Lagain1 # skip dataset header larl %r13,.L_eof clc 0(3,%r4),0(%r13) # if it is EOFx - jz .Lagain1 # skip dateset tra...
0fdcc88bb93f8200386d5d3015115b747d3391ae
Analyze and fix the following issue in the Linux kernel code: s390/zcrypt: cleanup some debug code
Problem Details: This patch removes most of the debug code which is build in when CONFIG_ZCRYPT_DEBUG is enabled. There is no real exploiter for this code any more and at least one ioctl fails with this code enabled. The CONFIG_ZCRYPT_DEBUG kernel config option still makes sense as some debug sysfs entries can get ena...
```diff diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h index 101fb324476f..c3b71032a880 100644 --- a/drivers/s390/crypto/ap_bus.h +++ b/drivers/s390/crypto/ap_bus.h @@ -233,30 +233,6 @@ struct ap_queue { typedef enum ap_sm_wait (ap_func_t)(struct ap_queue *queue); -/* failure injection cm...
d1e0e61d617ba17aa516db707aa871387566bbf7
Analyze and fix the following issue in the Linux kernel code: net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure
Problem Details: According to all consumers code of attrs[XFRMA_SEC_CTX], like * verify_sec_ctx_len(), convert to xfrm_user_sec_ctx* * xfrm_state_construct(), call security_xfrm_state_alloc whose prototype is int security_xfrm_state_alloc(.., struct xfrm_user_sec_ctx *sec_ctx); * copy_from_user_sec_ctx(), convert to x...
```diff diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c index 8cbf45a8bcdc..655fe4ff8621 100644 --- a/net/xfrm/xfrm_compat.c +++ b/net/xfrm/xfrm_compat.c @@ -108,7 +108,7 @@ static const struct nla_policy compat_policy[XFRMA_MAX+1] = { [XFRMA_ALG_COMP] = { .len = sizeof(struct xfrm_algo) }, [XFRMA_ENCA...
acd9755894c96c27078b52e0bfd894e48b0b1508
Analyze and fix the following issue in the Linux kernel code: Documentation: ABI: sysfs-class-net-qmi: pass_through contact update
Problem Details: Switch to the quicinc.com id. Fixes: bd1af6b5fffd ("Documentation: ABI: sysfs-class-net-qmi: document pass-through file") Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/Documentation/ABI/testing/sysfs-class-net-qmi b/Documentation/ABI/testing/sysfs-class-net-qmi index 47e6b9732337..b028f5bc86db 100644 --- a/Documentation/ABI/testing/sysfs-class-net-qmi +++ b/Documentation/ABI/testing/sysfs-class-net-qmi @@ -62,7 +62,7 @@ Description: What: /sys/class/net/<iface>...
998127cdb4699b9d470a9348ffe9f1154346be5f
Analyze and fix the following issue in the Linux kernel code: tcp: annotate data races in __tcp_oow_rate_limited()
Problem Details: request sockets are lockless, __tcp_oow_rate_limited() could be called on the same object from different cpus. This is harmless. Add READ_ONCE()/WRITE_ONCE() annotations to avoid a KCSAN report. Fixes: 4ce7e93cb3fe ("tcp: rate limit ACK sent by SYN_RECV request sockets") Signed-off-by: Eric Dumazet <...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 6f072095211e..57c8af1859c1 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3590,8 +3590,11 @@ static int tcp_ack_update_window(struct sock *sk, const struct sk_buff *skb, u32 static bool __tcp_oow_rate_limited(struct net *net, int ...
f58d0a9b4c6a7a5199c3af967e43cc8b654604d4
Analyze and fix the following issue in the Linux kernel code: wireguard: netlink: send staged packets when setting initial private key
Problem Details: Packets bound for peers can queue up prior to the device private key being set. For example, if persistent keepalive is set, a packet is queued up to be sent as soon as the device comes up. However, if the private key hasn't been set yet, the handshake message never sends, and no timer is armed to retr...
```diff diff --git a/drivers/net/wireguard/netlink.c b/drivers/net/wireguard/netlink.c index 43c8c84e7ea8..6d1bd9f52d02 100644 --- a/drivers/net/wireguard/netlink.c +++ b/drivers/net/wireguard/netlink.c @@ -546,6 +546,7 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info) u8 *private_key = nla_da...
7387943fa35516f6f8017a3b0e9ce48a3bef9faa
Analyze and fix the following issue in the Linux kernel code: wireguard: queueing: use saner cpu selection wrapping
Problem Details: Using `% nr_cpumask_bits` is slow and complicated, and not totally robust toward dynamic changes to CPU topologies. Rather than storing the next CPU in the round-robin, just store the last one, and also return that value. This simplifies the loop drastically into a much more common pattern. Fixes: e70...
```diff diff --git a/drivers/net/wireguard/queueing.c b/drivers/net/wireguard/queueing.c index 8084e7408c0a..26d235d15235 100644 --- a/drivers/net/wireguard/queueing.c +++ b/drivers/net/wireguard/queueing.c @@ -28,6 +28,7 @@ int wg_packet_queue_init(struct crypt_queue *queue, work_func_t function, int ret; memset...
a27ac5390922059867f645eefd978e533d7af902
Analyze and fix the following issue in the Linux kernel code: samples: pktgen: fix append mode failed issue
Problem Details: Each sample script sources functions.sh before parameters.sh which makes $APPEND undefined when trapping EXIT no matter in append mode or not. Due to this when sample scripts finished they always do "pgctrl reset" which resets pktgen config. So move trap to each script after sourcing parameters.sh and...
```diff diff --git a/samples/pktgen/functions.sh b/samples/pktgen/functions.sh index dd4e53ae9b73..c08cefb8eb1f 100644 --- a/samples/pktgen/functions.sh +++ b/samples/pktgen/functions.sh @@ -108,12 +108,13 @@ function pgset() { fi } -if [[ -z "$APPEND" ]]; then - if [[ $EUID -eq 0 ]]; then - # Cleanup pktgen s...
f88fcb1d7d961b4b402d675109726f94db87571c
Analyze and fix the following issue in the Linux kernel code: net: fix net_dev_start_xmit trace event vs skb_transport_offset()
Problem Details: After blamed commit, we must be more careful about using skb_transport_offset(), as reminded us by syzbot: WARNING: CPU: 0 PID: 10 at include/linux/skbuff.h:2868 skb_transport_offset include/linux/skbuff.h:2977 [inline] WARNING: CPU: 0 PID: 10 at include/linux/skbuff.h:2868 perf_trace_net_dev_start_xm...
```diff diff --git a/include/trace/events/net.h b/include/trace/events/net.h index da611a7aaf97..f667c76a3b02 100644 --- a/include/trace/events/net.h +++ b/include/trace/events/net.h @@ -51,7 +51,8 @@ TRACE_EVENT(net_dev_start_xmit, __entry->network_offset = skb_network_offset(skb); __entry->transport_offset_vali...
a398b9ea0c3b791b7a0f4c6029a62cf628f97f22
Analyze and fix the following issue in the Linux kernel code: net: dsa: tag_sja1105: fix source port decoding in vlan_filtering=0 bridge mode
Problem Details: There was a regression introduced by the blamed commit, where pinging to a VLAN-unaware bridge would fail with the repeated message "Couldn't decode source port" coming from the tagging protocol driver. When receiving packets with a bridge_vid as determined by dsa_tag_8021q_bridge_join(), dsa_8021q_rc...
```diff diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c index 92a626a05e82..db0a6ac67470 100644 --- a/net/dsa/tag_sja1105.c +++ b/net/dsa/tag_sja1105.c @@ -573,11 +573,14 @@ static struct sk_buff *sja1105_rcv(struct sk_buff *skb, * if available. This allows us to not overwrite a valid source * port a...
6ca3c005d0604e8d2b439366e3923ea58db99641
Analyze and fix the following issue in the Linux kernel code: net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
Problem Details: According to the synchronization rules for .ndo_get_stats() as seen in Documentation/networking/netdevices.rst, acquiring a plain spin_lock() should not be illegal, but the bridge driver implementation makes it so. After running these commands, I am being faced with the following lockdep splat: $ ip ...
```diff diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 3f04b40f6056..2450690f98cf 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -166,8 +166,9 @@ void br_manage_promisc(struct net_bridge *br) * This lets us disable promiscuous mode and write * this config to hw. */ - if (br->au...
1f4a08fed450db87fbb5ff5105354158bdbe1a22
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: fix a possible null-pointer dereference due to data race in snd_hdac_regmap_sync()
Problem Details: The variable codec->regmap is often protected by the lock codec->regmap_lock when is accessed. However, it is accessed without holding the lock when is accessed in snd_hdac_regmap_sync(): if (codec->regmap) In my opinion, this may be a harmful race, because if codec->regmap is set to NULL right aft...
```diff diff --git a/sound/hda/hdac_regmap.c b/sound/hda/hdac_regmap.c index f258cb3a6895..9b1bcabd8414 100644 --- a/sound/hda/hdac_regmap.c +++ b/sound/hda/hdac_regmap.c @@ -596,10 +596,9 @@ EXPORT_SYMBOL_GPL(snd_hdac_regmap_update_raw_once); */ void snd_hdac_regmap_sync(struct hdac_device *codec) { - if (codec->r...
abaa02fc944f2f9f2c2e1925ddaceaf35c48528c
Analyze and fix the following issue in the Linux kernel code: powerpc: dts: turris1x.dts: Fix PCIe MEM size for pci2 node
Problem Details: Freescale PCIe controllers on their PCIe Root Ports do not have any mappable PCI BAR allocate from PCIe MEM. Information about 1MB window on BAR0 of PCIe Root Port was misleading because Freescale PCIe controllers have at BAR0 position different register PEXCSRBAR, and kernel correctly skipts BAR0 for...
```diff diff --git a/arch/powerpc/boot/dts/turris1x.dts b/arch/powerpc/boot/dts/turris1x.dts index 6612160c19d5..dff1ea074d9d 100644 --- a/arch/powerpc/boot/dts/turris1x.dts +++ b/arch/powerpc/boot/dts/turris1x.dts @@ -476,12 +476,12 @@ * channel 1 (but only USB 2.0 subset) to USB 2.0 pins on mPCIe * slot 1 (CN...
6cb44bef35ac11724ef22c5ae4f1bc607e2ef3d8
Analyze and fix the following issue in the Linux kernel code: powerpc: Include asm/nmi.c in mobility.c for watchdog_hardlockup_set_timeout_pct()
Problem Details: The powerpc/platforms/pseries/mobility.c calls watchdog_hardlockup_set_timeout_pct(), which is declared in <asm/nmi.h>. We used to automatically get <asm/nmi.h> included, but that changed as of commit 7ca8fe94aa92 ("watchdog/hardlockup: define HARDLOCKUP_DETECTOR_ARCH"). Let's add the explicit include....
```diff diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c index cd632ba9ebff..0161226d8fec 100644 --- a/arch/powerpc/platforms/pseries/mobility.c +++ b/arch/powerpc/platforms/pseries/mobility.c @@ -24,6 +24,7 @@ #include <linux/stringify.h> #include <asm/machdep.h> +...
39f49684036d24af800ff194c33c7b2653c591d7
Analyze and fix the following issue in the Linux kernel code: powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y
Problem Details: In a randconfig with CONFIG_SERIAL_CPM=m and CONFIG_PPC_EARLY_DEBUG_CPM=y, there is a build error: ERROR: modpost: "udbg_putc" [drivers/tty/serial/cpm_uart/cpm_uart.ko] undefined! Prevent the build error by allowing PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y. Fixes: c374e00e17f1 ("[POWERPC] Add early...
```diff diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 6aaf8dc60610..2a54fadbeaf5 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -240,7 +240,7 @@ config PPC_EARLY_DEBUG_40x config PPC_EARLY_DEBUG_CPM bool "Early serial debugging for Freescale CPM-based seria...
d5ca77335846944d77d1e67ed841044074550943
Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Fix endian problem
Problem Details: Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
```diff diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index be59bd399fd1..16bd9faa2d28 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -236,6 +236,7 @@ struct ATTRIB *ni_find_attr(struct ntfs_inode *ni, struct ATTRIB *attr, return attr; out: + ntfs_inode_err(&ni->vfs_inode, "failed to parse mft ...
d6cd7cecfd5e4a189db97876c317d96ebca075fa
Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Fix ntfs_atomic_open
Problem Details: This fixes xfstest 633/696. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
```diff diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c index 9736b1e4a0f6..343bce6da58a 100644 --- a/fs/ntfs3/namei.c +++ b/fs/ntfs3/namei.c @@ -422,19 +422,10 @@ static int ntfs_atomic_open(struct inode *dir, struct dentry *dentry, * fnd contains tree's path to insert to. * If fnd is not NULL then dir is locke...
ea303f72d70ce2f0b0aa94ab127085289768c5a6
Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_load_attr_list()
Problem Details: syzbot is reporting too large allocation at ntfs_load_attr_list(), for a crafted filesystem can have huge data_size. Reported-by: syzbot <syzbot+89dbb3a789a5b9711793@syzkaller.appspotmail.com> Link: https://syzkaller.appspot.com/bug?extid=89dbb3a789a5b9711793 Signed-off-by: Tetsuo Handa <penguin-kerne...
```diff diff --git a/fs/ntfs3/attrlist.c b/fs/ntfs3/attrlist.c index c0c6bcbc8c05..81c22df27c72 100644 --- a/fs/ntfs3/attrlist.c +++ b/fs/ntfs3/attrlist.c @@ -52,7 +52,7 @@ int ntfs_load_attr_list(struct ntfs_inode *ni, struct ATTRIB *attr) if (!attr->non_res) { lsize = le32_to_cpu(attr->res.data_size); - le = ...
97498cd610c0d030a7bd49a7efad974790661162
Analyze and fix the following issue in the Linux kernel code: fs: ntfs3: Fix possible null-pointer dereferences in mi_read()
Problem Details: In a previous commit 2681631c2973 ("fs/ntfs3: Add null pointer check to attr_load_runs_vcn"), ni can be NULL in attr_load_runs_vcn(), and thus it should be checked before being used. However, in the call stack of this commit, mft_ni in mi_read() is aliased with ni in attr_load_runs_vcn(), and it is al...
```diff diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c index 2a281cead2bc..7060f784c2d7 100644 --- a/fs/ntfs3/record.c +++ b/fs/ntfs3/record.c @@ -124,7 +124,7 @@ int mi_read(struct mft_inode *mi, bool is_mft) struct rw_semaphore *rw_lock = NULL; if (is_mounted(sbi)) { - if (!is_mft) { + if (!is_mft && mft_...
c9db0ff04649aa0b45f497183c957fe260f229f6
Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Return error for inconsistent extended attributes
Problem Details: ntfs_read_ea is called when we want to read extended attributes. There are some sanity checks for the validity of the EAs. However, it fails to return a proper error code for the inconsistent attributes, which might lead to unpredicted memory accesses after return. [ 138.916927] BUG: KASAN: use-after...
```diff diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c index fd02fcf4d409..26787c2bbf75 100644 --- a/fs/ntfs3/xattr.c +++ b/fs/ntfs3/xattr.c @@ -141,6 +141,7 @@ static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, memset(Add2Ptr(ea_p, size), 0, add_bytes); + err = -EINVAL; /* Check all attribut...
fdec309c7672cbee4dc0229ee4cbb33c948a1bdd
Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Enhance sanity check while generating attr_list
Problem Details: ni_create_attr_list uses WARN_ON to catch error cases while generating attribute list, which only prints out stack trace and may not be enough. This repalces them with more proper error handling flow. [ 59.666332] BUG: kernel NULL pointer dereference, address: 000000000000000e [ 59.673268] #PF: su...
```diff diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 2bfcf1a989c9..50214b77c6a3 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -874,6 +874,7 @@ int ni_create_attr_list(struct ntfs_inode *ni) if (err) goto out1; + err = -EINVAL; /* Call mi_remove_attr() in reverse order to keep pointe...
3c675ddffb17a8b1e32efad5c983254af18b12c2
Analyze and fix the following issue in the Linux kernel code: ntfs: Fix panic about slab-out-of-bounds caused by ntfs_listxattr()
Problem Details: Here is a BUG report from syzbot: BUG: KASAN: slab-out-of-bounds in ntfs_list_ea fs/ntfs3/xattr.c:191 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_listxattr+0x401/0x570 fs/ntfs3/xattr.c:710 Read of size 1 at addr ffff888021acaf3d by task syz-executor128/3632 Call Trace: ntfs_list_ea fs/ntfs3/xatt...
```diff diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c index c3de60a4543f..fd02fcf4d409 100644 --- a/fs/ntfs3/xattr.c +++ b/fs/ntfs3/xattr.c @@ -214,6 +214,9 @@ static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, ea = Add2Ptr(ea_all, off); ea_size = unpacked_ea_size(ea); + if (!ea->name_len) + ...
5cf32f63b0f4c520460c1a5dd915dc4f09085f29
Analyze and fix the following issue in the Linux kernel code: xfs: fix the calculation for "end" and "length"
Problem Details: The value of "end" should be "start + length - 1". Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
```diff diff --git a/fs/xfs/xfs_notify_failure.c b/fs/xfs/xfs_notify_failure.c index c4078d0ec108..4a9bbd3fe120 100644 --- a/fs/xfs/xfs_notify_failure.c +++ b/fs/xfs/xfs_notify_failure.c @@ -114,7 +114,8 @@ xfs_dax_notify_ddev_failure( int error = 0; xfs_fsblock_t fsbno = XFS_DADDR_TO_FSB(mp, daddr); xfs_agnum...
75dc0345312221971903b2e28279b7e24b7dbb1b
Analyze and fix the following issue in the Linux kernel code: xfs: fix xfs_btree_query_range callers to initialize btree rec fully
Problem Details: Use struct initializers to ensure that the xfs_btree_irecs passed into the query_range function are completely initialized. No functional changes, just closing some sloppy hygiene. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
```diff diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index e2da7de9b37e..200c460a3c7a 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -3823,15 +3823,11 @@ xfs_alloc_query_range( xfs_alloc_query_range_fn fn, void *priv) { - union xfs_btree_irec low_brec; - unio...
3ee9351e74907fe3acb0721c315af25b05dc87da
Analyze and fix the following issue in the Linux kernel code: xfs: validate fsmap offsets specified in the query keys
Problem Details: Improve the validation of the fsmap offset fields in the query keys and move the validation to the top of the function now that we have pushed the low key adjustment code downwards. Also fix some indenting issues that aren't worth a separate patch. Signed-off-by: Darrick J. Wong <djwong@kernel.org> R...
```diff diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index ae20aba6ebfe..10403ba9b58f 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -802,6 +802,19 @@ xfs_getfsmap_check_keys( struct xfs_fsmap *low_key, struct xfs_fsmap *high_key) { + if (low_key->fmr_flags & (FMR_OF_SPECIAL_OWNER | FMR_OF_E...
a949a1c2a198e048630a8b0741a99b85a5d88136
Analyze and fix the following issue in the Linux kernel code: xfs: fix logdev fsmap query result filtering
Problem Details: The external log device fsmap backend doesn't have an rmapbt to query, so it's wasteful to spend time initializing the rmap_irec objects. Worse yet, the log could (someday) be longer than 2^32 fsblocks, so using the rmap irec structure will result in integer overflows. Fix this mess by computing the s...
```diff diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index 47295067f212..ae20aba6ebfe 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -437,36 +437,22 @@ xfs_getfsmap_logdev( struct xfs_mount *mp = tp->t_mountp; struct xfs_rmap_irec rmap; xfs_daddr_t rec_daddr, len_daddr; - xfs_fsblock_t ...
d898137d789cac9ebe5eed9957e4cf25122ca524
Analyze and fix the following issue in the Linux kernel code: xfs: fix getfsmap reporting past the last rt extent
Problem Details: The realtime section ends at the last rt extent. If the user configures the rt geometry with an extent size that is not an integer factor of the number of rt blocks, it's possible for there to be rt blocks past the end of the last rt extent. These tail blocks cannot ever be allocated and will cause c...
```diff diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index 901918116d3d..6bd6ab56ca9f 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -529,7 +529,7 @@ __xfs_getfsmap_rtdev( uint64_t eofs; int error = 0; - eofs = XFS_FSB_TO_BB(mp, mp->m_sb.sb_rblocks); + eofs = XFS_FSB_TO_BB(mp, mp->m_sb.s...
7975aba19cba4eba7ff60410f9294c90edc96dcf
Analyze and fix the following issue in the Linux kernel code: xfs: fix integer overflows in the fsmap rtbitmap and logdev backends
Problem Details: It's not correct to use the rmap irec structure to hold query key information to query the rtbitmap because the realtime volume can be longer than 2^32 fsblocks in length. Because the rt volume doesn't have allocation groups, introduce a daddr-based record filtering algorithm and compute the rtextent ...
```diff diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index 6ddcda2c1218..901918116d3d 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -160,6 +160,8 @@ struct xfs_getfsmap_info { struct xfs_buf *agf_bp; /* AGF, for refcount queries */ struct xfs_perag *pag; /* AG info, if applicable */ xfs_da...
63ef7a35912dd743cabd65d5bb95891625c0dd46
Analyze and fix the following issue in the Linux kernel code: xfs: fix interval filtering in multi-step fsmap queries
Problem Details: I noticed a bug in ranged GETFSMAP queries: # xfs_io -c 'fsmap -vvvv' /opt EXT: DEV BLOCK-RANGE OWNER FILE-OFFSET AG AG-OFFSET TOTAL 0: 8:80 [0..7]: static fs metadata 0 (0..7) 8 <snip> 9: 8:80 [192..223]: ...
```diff diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index 59e7d1a14b67..6ddcda2c1218 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -162,7 +162,14 @@ struct xfs_getfsmap_info { xfs_daddr_t next_daddr; /* next daddr we expect */ u64 missing_owner; /* owner of holes */ u32 dev; /* device...
1cbc11aaa01f80577b67ae02c73ee781112125fd
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix dropped lock for racing OPEN and delegation return
Problem Details: Commmit f5ea16137a3f ("NFSv4: Retry LOCK on OLD_STATEID during delegation return") attempted to solve this problem by using nfs4's generic async error handling, but introduced a regression where v4.0 lock recovery would hang. The additional complexity introduced by overloading that error handling is no...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e1a886b58354..4604e9f3d1b0 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -7181,8 +7181,15 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) } else if (!nfs4_update_lock_stateid(lsp, &data->res.stateid)) goto out_resta...
2e3e94c2f5dc98a8a0e93850407064bc5389c306
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Reset MAC features in FLR
Problem Details: AF driver configures MAC features like internal loopback and PFC upon receiving the request from PF and its VF netdev. But these features are not getting reset in FLR. This patch fixes the issue by resetting the same. Fixes: 23999b30ae67 ("octeontx2-af: Enable or disable CGX internal loopback") Fixes...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c index f4bdca662d61..592037f4e55b 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c @@ -537,14 +537,15 @@ static u32 cgx_get_lmac_fifo_le...
79ebb53772c95d3a6ae51b3c65f9985fdd430df6
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Add validation before accessing cgx and lmac
Problem Details: with the addition of new MAC blocks like CN10K RPM and CN10KB RPM_USX, LMACs are noncontiguous and CGX blocks are also noncontiguous. But during RVU driver initialization, the driver is assuming they are contiguous and trying to access cgx or lmac with their id which is resulting in kernel panic. This...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c index bd77152bb8d7..f4bdca662d61 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c @@ -169,6 +169,9 @@ void cgx_lmac_write(int cgx_id, i...
2e7bc57b976bb016c6569a54d95c1b8d88f9450a
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Fix mapping for NIX block from CGX connection
Problem Details: Firmware configures NIX block mapping for all MAC blocks. The current implementation reads the configuration and creates the mapping between RVU PF and NIX blocks. But this configuration is only valid for silicons that support multiple blocks. For all other silicons, all MAC blocks map to NIX0. This ...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h index b5a7ee63508c..d4b8d4546de2 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h @@ -23,6 +23,7 @@ #define PCI_DEVID_OCTEONTX2_LBK ...
4c5a331cacda995e995a7857f0e44e8937d98d2c
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: cn10kb: fix interrupt csr addresses
Problem Details: The current design is that, for asynchronous events like link_up and link_down firmware raises the interrupt to kernel. The previous patch which added RPM_USX driver has a bug where it uses old csr addresses for configuring interrupts. Which is resulting in losing interrupts from source firmware. This...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c index de0d88dd10d6..a433f92c51ea 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c @@ -47,7 +47,7 @@ static struct mac_ops rpm2_mac_ops...
c97d3fb9e0e716b77d5c0d3051d46e2f41dc6fe4
Analyze and fix the following issue in the Linux kernel code: nvme-tcp: Fix comma-related oops
Problem Details: Fix a comma that should be a semicolon. The comma is at the end of an if-body and thus makes the statement after (a bvec_set_page()) conditional too, resulting in an oops because we didn't fill out the bio_vec[]: BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor ...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 3e7dd6f91832..9ce417cd32a7 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1014,7 +1014,7 @@ static int nvme_tcp_try_send_data(struct nvme_tcp_request *req) msg.msg_flags |= MSG_MORE; if (!sendpage_ok(page)) - ...
dff745c1221a402b4921d54f292288373cff500c
Analyze and fix the following issue in the Linux kernel code: fs: move cleanup from init_file() into its callers
Problem Details: The use of file_free_rcu() in init_file() to free the struct that was allocated by the caller was hacky and we got what we deserved. Let init_file() and its callers take care of cleaning up each after their own allocated resources on error. Fixes: 62d53c4a1dfe ("fs: use backing_file container for int...
```diff diff --git a/fs/file_table.c b/fs/file_table.c index e06c68e2d757..fc7d677ff5ad 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -160,7 +160,7 @@ static int init_file(struct file *f, int flags, const struct cred *cred) f->f_cred = get_cred(cred); error = security_file_alloc(f); if (unlikely(error)) {...
b2ad9549bfd0c1f74287492a9d9a31a03c97f088
Analyze and fix the following issue in the Linux kernel code: perf evsel amd: Fix IBS error message
Problem Details: AMD IBS can do per-process profiling[1] and is no longer restricted to per-cpu or systemwide only. Remove stale error message. Also, checking just exclude_kernel is not sufficient since IBS does not support any privilege filters. So include all exclude_* checks. And finally, move these checks under too...
```diff diff --git a/tools/perf/arch/x86/util/evsel.c b/tools/perf/arch/x86/util/evsel.c index 512c2d885d24..81d22657922a 100644 --- a/tools/perf/arch/x86/util/evsel.c +++ b/tools/perf/arch/x86/util/evsel.c @@ -102,3 +102,23 @@ void arch__post_evsel_config(struct evsel *evsel, struct perf_event_attr *attr) } } } ...
5f06267b6e6a10dd0cac4eb248fcc51f18c260cc
Analyze and fix the following issue in the Linux kernel code: perf: unwind: Fix symfs with libdw
Problem Details: Pass the full path including the symfs (if any) to libdw. Without this unwinding fails with errors like this when a symfs is used: unwind: failed with 'No such file or directory'" Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Mark ...
```diff diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c index 83eea968482e..2a96df4c8d42 100644 --- a/tools/perf/util/unwind-libdw.c +++ b/tools/perf/util/unwind-libdw.c @@ -66,9 +66,13 @@ static int __report_module(struct addr_location *al, u64 ip, mod = 0; } - if (!mod) - mod = d...
78a175c4623f66722709494295a0f6754b46f858
Analyze and fix the following issue in the Linux kernel code: perf symbol: Fix uninitialized return value in symbols__find_by_name()
Problem Details: found_idx and s aren't initialized, so if no symbol is found then the assert at the end will index off the end of the array causing a segfault. The function also doesn't return NULL when the symbol isn't found even if the assert passes. Fix it by initializing the values and only setting them when somet...
```diff diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index bc79291b9f3b..f849f9ef68e6 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -495,7 +495,10 @@ static struct symbol *symbols__find_by_name(struct symbol *symbols[], size_t *found_idx) { size_t i, lower = 0,...
f6027053f82c9b533bb306bff64e4e8c8f92e9e4
Analyze and fix the following issue in the Linux kernel code: perf lock contention: Add --output option
Problem Details: To avoid formatting failures for example in CSV output due to debug messages, add --output option to put the result in a file. Unfortunately the short -o option was taken by the --owner already. $ sudo ./perf lock con -ab --output lock-out.txt -v sleep 1 Looking at the vmlinux_path (8 entries long...
```diff diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt index d1efcbe7a470..30eea576721f 100644 --- a/tools/perf/Documentation/perf-lock.txt +++ b/tools/perf/Documentation/perf-lock.txt @@ -36,6 +36,9 @@ COMMON OPTIONS --input=<file>:: Input file name. (default: pe...
69c5c9930d722dee4312a7427f89733bfb4bf984
Analyze and fix the following issue in the Linux kernel code: perf lock contention: Add -x option for CSV style output
Problem Details: Sometimes we want to process the output by external programs. Let's add the -x option to specify the field separator like perf stat. $ sudo ./perf lock con -ab -x, sleep 1 # output: contended, total wait, max wait, avg wait, type, caller 19, 194232, 21415, 10222, spinlock, process_one_work+0x1f...
```diff diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt index 6e5ba3cd2b72..d1efcbe7a470 100644 --- a/tools/perf/Documentation/perf-lock.txt +++ b/tools/perf/Documentation/perf-lock.txt @@ -200,6 +200,11 @@ CONTENTION OPTIONS Note that it matches the substring so 'rq' woul...
dd546618ba704be4f3724a11e5a194052c551f08
Analyze and fix the following issue in the Linux kernel code: pid: use struct_size_t() helper
Problem Details: Before commit d67790ddf021 ("overflow: Add struct_size_t() helper") only struct_size() existed, which expects a valid pointer instance containing the flexible array. However, when we determine the default struct pid allocation size for the associated kmem cache of a pid namespace we need to take the n...
```diff diff --git a/kernel/pid.c b/kernel/pid.c index 8bce3aebc949..6a1d23a11026 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -657,7 +657,7 @@ void __init pid_idr_init(void) idr_init(&init_pid_ns.idr); init_pid_ns.pid_cachep = kmem_cache_create("pid", - struct_size((struct pid *)NULL, numbers, 1), + struc...
03f889378f33aa9a9d8e5f49ba94134cf6158090
Analyze and fix the following issue in the Linux kernel code: xtensa: fix lock_mm_and_find_vma in case VMA not found
Problem Details: MMU version of lock_mm_and_find_vma releases the mm lock before returning when VMA is not found. Do the same in noMMU version. This fixes hang on an attempt to handle protection fault. Fixes: d85a143b69ab ("xtensa: fix NOMMU build with lock_mm_and_find_vma() conversion") Signed-off-by: Max Filippov <j...
```diff diff --git a/mm/nommu.c b/mm/nommu.c index fdc392735ec6..c072a660ec2c 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -637,8 +637,13 @@ EXPORT_SYMBOL(find_vma); struct vm_area_struct *lock_mm_and_find_vma(struct mm_struct *mm, unsigned long addr, struct pt_regs *regs) { + struct vm_area_struct *vma; + mmap_...
75b59f2a90aa7ccac62e3dcb680dfb967b341431
Analyze and fix the following issue in the Linux kernel code: riscv: vector: clear V-reg in the first-use trap
Problem Details: If there is no context switch happens after we enable V for a process, then we return to user space with whatever left on the CPU's V registers accessible to the process. The leaked data could belong to another process's V-context saved from last context switch, impacting process's confidentiality on t...
```diff diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c index f9c8e19ab301..8d92fb6c522c 100644 --- a/arch/riscv/kernel/vector.c +++ b/arch/riscv/kernel/vector.c @@ -167,6 +167,7 @@ bool riscv_v_first_use_handler(struct pt_regs *regs) return true; } riscv_v_vstate_on(regs); + riscv_v_vstate_...
26c38cd802c947401cfbcc285b7d841256b5f17f
Analyze and fix the following issue in the Linux kernel code: riscv: vector: only enable interrupts in the first-use trap
Problem Details: The function irqentry_exit_to_user_mode() must be called with interrupt disabled. The caller of do_trap_insn_illegal() also assumes running without interrupts. So, we should turn off interrupts after riscv_v_first_use_handler() returns. Fixes: cd054837243b ("riscv: Allocate user's vector context in th...
```diff diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 5158961ea977..bc02b282a403 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -150,12 +150,18 @@ DO_ERROR_INFO(do_trap_insn_fault, asmlinkage __visible __trap_section void do_trap_insn_illegal(struct pt_regs *regs...
e50db34efdc8cac2f17b8f5d32fddd7b58914ce6
Analyze and fix the following issue in the Linux kernel code: RISC-V: Fix up some vector state related build failures
Problem Details: I get a few build failures along the lines of ./arch/riscv/include/uapi/asm/sigcontext.h:19:36: error: field ‘v_state’ has incomplete type 19 | struct __riscv_v_ext_state v_state; | ^~~~~~~ ./arch/riscv/include/uapi/asm/sigcontext.h:32:49: error: fie...
```diff diff --git a/arch/riscv/include/uapi/asm/sigcontext.h b/arch/riscv/include/uapi/asm/sigcontext.h index 8b8a8541673a..8c8712aa9551 100644 --- a/arch/riscv/include/uapi/asm/sigcontext.h +++ b/arch/riscv/include/uapi/asm/sigcontext.h @@ -15,6 +15,8 @@ /* The size of END signal context header. */ #define END_HDR_...
26b32974ad2e82811706fd19c33c4ad6b9953663
Analyze and fix the following issue in the Linux kernel code: docs: networking: Update codeaurora references for rmnet
Problem Details: source.codeaurora.org is no longer accessible and so the reference link in the documentation is not useful. Use iproute2 instead as it has a rmnet module for configuration. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Sean Tranchetti <quic_stra...
```diff diff --git a/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst b/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst index 4118384cf8eb..289c146a8291 100644 --- a/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst +++ b/Documentation/networking/device_drivers/c...
ff7d80a9f2711bf3d9fe1cfb70b3fd15c50584b7
Analyze and fix the following issue in the Linux kernel code: cifs: fix session state transition to avoid use-after-free issue
Problem Details: We switch session state to SES_EXITING without cifs_tcp_ses_lock now, it may lead to potential use-after-free issue. Consider the following execution processes: Thread 1: __cifs_put_smb_ses() spin_lock(&cifs_tcp_ses_lock) if (--ses->ses_count > 0) spin_unlock(&cifs_tcp_ses_lock) ...
```diff diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index dab7bc876507..85dd1b373974 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -1967,15 +1967,16 @@ void __cifs_put_smb_ses(struct cifs_ses *ses) spin_unlock(&cifs_tcp_ses_lock); return; } + spin_lock(&ses->ses_lock);...
d85a143b69abb4d7544227e26d12c4c7735ab27d
Analyze and fix the following issue in the Linux kernel code: xtensa: fix NOMMU build with lock_mm_and_find_vma() conversion
Problem Details: It turns out that xtensa has a really odd configuration situation: you can do a no-MMU config, but still have the page fault code enabled. Which doesn't sound all that sensible, but it turns out that xtensa can have protection faults even without the MMU, and we have this: config PFAULT bo...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index 39aa409e84d5..4f2c33c273eb 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2323,6 +2323,9 @@ void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to); void truncate_pagecache_range(struct inode *inode, loff_t offset, loff...
a6ec83786ab9f13f25fb18166dee908845713a95
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to do sanity check on direct node in truncate_dnode()
Problem Details: syzbot reports below bug: BUG: KASAN: slab-use-after-free in f2fs_truncate_data_blocks_range+0x122a/0x14c0 fs/f2fs/file.c:574 Read of size 4 at addr ffff88802a25c000 by task syz-executor148/5000 CPU: 1 PID: 5000 Comm: syz-executor148 Not tainted 6.4.0-rc7-syzkaller-00041-ge660abd551f1 #0 Hardware nam...
```diff diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 2a6a6b1a0895..c7cb2177b252 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3457,7 +3457,6 @@ static inline bool __is_valid_data_blkaddr(block_t blkaddr) * file.c */ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync); -void f...
c31e49615762a5fa0d14ffcfd5e2f1c206213a14
Analyze and fix the following issue in the Linux kernel code: f2fs: fix compile warning in f2fs_destroy_node_manager()
Problem Details: fs/f2fs/node.c: In function ‘f2fs_destroy_node_manager’: fs/f2fs/node.c:3390:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=] 3390 | } Merging below pointer arrays into common one, and reuse it by cast type. struct nat_entry *natvec[NATVEC_SIZE]; struct nat_e...
```diff diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index dadea6b01888..3e1fa564db8f 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -3062,7 +3062,7 @@ int f2fs_flush_nat_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc) struct f2fs_nm_info *nm_i = NM_I(sbi); struct curseg_info *curseg = CURSEG_I(sbi, ...
0135c482fa97e2fd8245cb462784112a00ed1211
Analyze and fix the following issue in the Linux kernel code: f2fs: fix error path handling in truncate_dnode()
Problem Details: If truncate_node() fails in truncate_dnode(), it missed to call f2fs_put_page(), fix it. Fixes: 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 4a105a0cd794..dadea6b01888 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -943,8 +943,10 @@ static int truncate_dnode(struct dnode_of_data *dn) dn->ofs_in_node = 0; f2fs_truncate_data_blocks(dn); err = truncate_node(dn); - if (err) + if (err) { + f2...
5eda1ad1aaffdfebdecf7a164e586060a210f74f
Analyze and fix the following issue in the Linux kernel code: f2fs: fix deadlock in i_xattr_sem and inode page lock
Problem Details: Thread #1: [122554.641906][ T92] f2fs_getxattr+0xd4/0x5fc -> waiting for f2fs_down_read(&F2FS_I(inode)->i_xattr_sem); [122554.641927][ T92] __f2fs_get_acl+0x50/0x284 [122554.641948][ T92] f2fs_init_acl+0x84/0x54c [122554.641969][ T92] f2fs_init_inode_metadata+0x460/0x5f0 [122554.64199...
```diff diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 887e55988450..d635c58cf5a3 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -775,8 +775,15 @@ int f2fs_add_dentry(struct inode *dir, const struct f2fs_filename *fname, { int err = -EAGAIN; - if (f2fs_has_inline_dentry(dir)) + if (f2fs_has_inline_dentry(dir)...
e836007089ba8fdf24e636ef2b007651fb4582e6
Analyze and fix the following issue in the Linux kernel code: md/raid0: add discard support for the 'original' layout
Problem Details: We've found that using raid0 with the 'original' layout and discard enabled with different disk sizes (such that at least two zones are created) can result in data corruption. This is due to the fact that the discard handling in 'raid0_handle_discard()' assumes the 'alternate' layout. We've seen this c...
```diff diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index f8ee9a95e25d..d1ac73fcd852 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -270,6 +270,18 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf) goto abort; } + if (conf->layout == RAID0_ORIG_LAYOUT) { + ...
1b712f18c461bd75f018033a15cf381e712806b5
Analyze and fix the following issue in the Linux kernel code: mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
Problem Details: Sec proxy/message manager data buffer is 60 bytes with the last of the registers indicating transmission completion. This however poses a bit of a challenge. The backing memory for sec_proxy / message manager is regular memory, and all sec proxy does is to trigger a burst of all 60 bytes of data over ...
```diff diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c index ddac423ac1a9..03048cbda525 100644 --- a/drivers/mailbox/ti-msgmgr.c +++ b/drivers/mailbox/ti-msgmgr.c @@ -430,14 +430,20 @@ static int ti_msgmgr_send_data(struct mbox_chan *chan, void *data) /* Ensure all unused data is 0 */ data...
f0ac3504960616c973e65c0a4e5488ad8de60d1c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: timestamp: restrict node name suffixes
Problem Details: Make the pattern matching node names a bit stricter to improve DTS consistency. The pattern is restricted to -N suffixes to decimal numbers. Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Tony Lindgren <tony@atomide.com> Ac...
```diff diff --git a/Documentation/devicetree/bindings/timestamp/hardware-timestamps-common.yaml b/Documentation/devicetree/bindings/timestamp/hardware-timestamps-common.yaml index fd6a7b51f571..95f42acd0c54 100644 --- a/Documentation/devicetree/bindings/timestamp/hardware-timestamps-common.yaml +++ b/Documentation/dev...
fee34f7b6d379e8b9ad2081e7113b99edf445c17
Analyze and fix the following issue in the Linux kernel code: dt-bindings: slimbus: restrict node name suffixes
Problem Details: Make the pattern matching node names a bit stricter to improve DTS consistency. The pattern is restricted to: 1. Only one unit address or one -N suffix, 2. -N suffixes to decimal numbers. Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> R...
```diff diff --git a/Documentation/devicetree/bindings/slimbus/slimbus.yaml b/Documentation/devicetree/bindings/slimbus/slimbus.yaml index 22513fb7c59a..3b8cae9d1016 100644 --- a/Documentation/devicetree/bindings/slimbus/slimbus.yaml +++ b/Documentation/devicetree/bindings/slimbus/slimbus.yaml @@ -15,7 +15,7 @@ descrip...
6cca6cf3f5ab2c6f7ce48e2d958151580079a6d4
Analyze and fix the following issue in the Linux kernel code: dt-bindings: watchdog: restrict node name suffixes
Problem Details: Make the pattern matching node names a bit stricter to improve DTS consistency. The pattern is restricted to -N suffixes to decimal numbers. Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Reviewed...
```diff diff --git a/Documentation/devicetree/bindings/watchdog/watchdog.yaml b/Documentation/devicetree/bindings/watchdog/watchdog.yaml index 519b48889eb1..f0a584af1223 100644 --- a/Documentation/devicetree/bindings/watchdog/watchdog.yaml +++ b/Documentation/devicetree/bindings/watchdog/watchdog.yaml @@ -17,11 +17,11 ...
2e54154b9f27262efd0cb4f903cc7d5ad1fe9628
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix potential fence use-after-free v2
Problem Details: fence Decrements the reference count before exiting. Avoid Race Vulnerabilities for fence use-after-free. v2 (chk): actually fix the use after free and not just move it. Signed-off-by: shanzhulig <shanzhulig@gmail.com> Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deuche...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index b34f9f8d33d2..040f4cb6ab2d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1654,15 +1654,15 @@ static int amdgpu_cs_wait_all_fences(struct amdgpu_device *adev, ...
b877934e5efc1ffd4f8098bb245853b3738e103f
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: 3.2.241
Problem Details: This version brings along the following: - Improve debugging mechanism for Gaming FAMS - Add monitor specific edid quirks - Fixes for Phantom pipe - Fixes for Shapper LUT - Clean up asserts Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Aric Cyr <aric.cyr@amd.com> Tested-by: Dan...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 110ef14445d9..63948170fd6d 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -45,7 +45,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
d5b5d6cb1d5ea7e2cf804aac40c23a860a2c28c3
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Create debugging mechanism for Gaming FAMS
Problem Details: [WHY] To enable FAMS even during gaming sessions. [HOW] By leveraging a new dc.debug parameter. Reviewed-by: Felipe Clark <felipe.clark@amd.com> Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Gianna Binder <gianna.binder@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 90e71c3e766f..110ef14445d9 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -850,6 +850,7 @@ struct dc_debug_options { /* Enable dmub aux for legacy ddc */ bool enable_dm...
613a7956deb3b1ffa2810c6d4c90ee9c3d743dbb
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add monitor specific edid quirk
Problem Details: Disable FAMS on a Samsung Odyssey G9 monitor. Experiments show that this monitor does not work well under some use cases, and is likely implementation specific bug on the monitor's firmware. Cc: stable@vger.kernel.org Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Aurabindo Pi...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index cd20cfc04996..d9a482908380 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c @@ -44,6 +44,...
27fc10d1095f7a7de7c917638d7134033a190dd8
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix the delta clamping for shaper LUT
Problem Details: The shaper LUT requires a 10-bit value of the delta between segments. We were using dc_fixpt_clamp_u0d10() to do that but it doesn't do what we want it to do. It will preserve 10-bit precision after the decimal point, but that's not quite what we want. We want 14-bit precision and discard the 4 most-si...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c index 7a00fe525dfb..3538973bd0c6 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c @@ -308,7 +308,10 @@ bool...
5c6d52ff4b61e5267b25be714eb5a9ba2a338199
Analyze and fix the following issue in the Linux kernel code: drm/amd: Don't try to enable secure display TA multiple times
Problem Details: If the securedisplay TA failed to load the first time, it's unlikely to work again after a suspend/resume cycle or reset cycle and it appears to be causing problems in futher attempts. Fixes: e42dfa66d592 ("drm/amdgpu: Add secure display TA load for Renoir") Reported-by: Filip Hejsek <filip.hejsek@gma...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index ac9b57231589..aa69269169a1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2040,6 +2040,8 @@ static int psp_securedisplay_initialize(struct psp_context *psp...
570b295248b00c3cf4cf59e397de5cb2361e10c2
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix number of fence calculations
Problem Details: Since adding gang submit we need to take the gang size into account while reserving fences. Signed-off-by: Christian König <christian.koenig@amd.com> Fixes: 4624459c84d7 ("drm/amdgpu: add gang submit frontend v6") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexa...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index d9503882ea97..b34f9f8d33d2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -136,9 +136,6 @@ static int amdgpu_cs_p1_user_fence(struct amdgpu_cs_parser *p, bo =...
af22d6a869cc26b519bfdcd54293c53f2e491870
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: perform a bounds check before filling dirty rectangles
Problem Details: Currently, it is possible for us to access memory that we shouldn't. Since, we acquire (possibly dangling) pointers to dirty rectangles before doing a bounds check to make sure we can actually accommodate the number of dirty rectangles userspace has requested to fill. This issue is especially evident i...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 514f6785a020..7fa0d0ec45c9 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5063,11 +5063,7 @@ static inline void fil...
b69f0aeb068980af983d399deafc7477cec8bc04
Analyze and fix the following issue in the Linux kernel code: pid: Replace struct pid 1-element array with flex-array
Problem Details: For pid namespaces, struct pid uses a dynamically sized array member, "numbers". This was implemented using the ancient 1-element fake flexible array, which has been deprecated for decades. Replace it with a C99 flexible array, refactor the array size calculations to use struct_size(), and address el...
```diff diff --git a/include/linux/pid.h b/include/linux/pid.h index b75de288a8c2..653a527574c4 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -67,7 +67,7 @@ struct pid /* wait queue for pidfd notifications */ wait_queue_head_t wait_pidfd; struct rcu_head rcu; - struct upid numbers[1]; + struct upi...
cb7d60ab98cfe12fdd6052142176d42682f78540
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wcd934x: demote impedance printk
Problem Details: Demote the MBHC impedance measurement printk, which is only needed for development and debugging, to debug level. While at it, fix the capitalisation of "ohm" and add the missing space before the opening parenthesis. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Srinivas Kandagat...
```diff diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index c0d1fa36d841..9d724b5710f7 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -2683,7 +2683,7 @@ static inline void wcd934x_mbhc_get_result_params(struct wcd934x_codec *wcd934x, else if (x1 < minCode_param[noff...
e5ce198bd5c6923b6a51e1493b1401f84c24b26d
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wcd938x: fix mbhc impedance loglevel
Problem Details: Demote the MBHC impedance measurement printk, which is not an error message, from error to debug level. While at it, fix the capitalisation of "ohm" and add the missing space before the opening parenthesis. Fixes: bcee7ed09b8e ("ASoC: codecs: wcd938x: add Multi Button Headset Control support") Signed...
```diff diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index e7d6a02cdec0..81d865276c9c 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -2165,8 +2165,8 @@ static inline void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, else if (x1 < minCode_param[noff]...
5f0c791dcd3c7d324f2fa14f228bdcd156730015
Analyze and fix the following issue in the Linux kernel code: parisc: processor: Fix kdoc for init_cpu_profiler()
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index ba07e760d3c7..00b0df97afb1 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -58,7 +58,7 @@ DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data); */ /** - * init_cpu_profiler - enable/setup per cp...
8829428c1680c1ed7313be43b248d99d7123ed48
Analyze and fix the following issue in the Linux kernel code: parisc: ccio-dma: Fix kdoc and compiler warnings
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index a66386043aa6..9bf652bd002c 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -97,7 +97,6 @@ #define DBG_RUN_SG(x...) #endif -#define CCIO_INLINE inline #define WRITE_U32(value, addr) __raw_writel(value, addr) ...
f28a98779de97e24d5e6fde8fca1273056a14f80
Analyze and fix the following issue in the Linux kernel code: parisc: pdc_stable: Fix kdoc and compiler warnings
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 2a18f7ba2398..633266447e2f 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c @@ -509,6 +509,8 @@ static struct pdcspath_entry *pdcspath_entries[] = { /** * pdcs_size_read - Stable Storage size output. + * ...
9872fb13022788b7832616dea52a1feb3bcb4bf2
Analyze and fix the following issue in the Linux kernel code: parisc: pdc_chassis: Fix kdoc warnings
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c index da154406d368..0a9d7008ef2a 100644 --- a/arch/parisc/kernel/pdc_chassis.c +++ b/arch/parisc/kernel/pdc_chassis.c @@ -40,7 +40,7 @@ static unsigned int pdc_chassis_enabled __read_mostly = 1; /** * pdc_chassis_setup() - Ena...
427585224a866bf4cb3b3857d89d5de5f3518aca
Analyze and fix the following issue in the Linux kernel code: parisc: firmware: Fix kdoc warnings
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index f164c46a5108..6d1c781eb1db 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -134,7 +134,7 @@ static unsigned long f_extend(unsigned long address) /** * convert_to_wide - Convert the return buff...
ac9fb7d2b71d8353603534a5e5cc92f54fd7e219
Analyze and fix the following issue in the Linux kernel code: parisc: drivers: Fix kdoc warnings
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 28f47285d448..8f4b77648491 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c @@ -4,7 +4,7 @@ * * Copyright (c) 1999 The Puffin Group * Copyright (c) 2001 Matthew Wilcox for Hewlett Packard - * Copyrig...
226b8ab875e18375567fec4e1065a339b7b77c8e
Analyze and fix the following issue in the Linux kernel code: parisc: sba_iommu: Fix kdoc warnings
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index ecd870087a3d..9f02afa7e5a1 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c @@ -95,8 +95,6 @@ #define DBG_RES(x...) #endif -#define SBA_INLINE __inline__ - #define DEFAULT_DMA_HINT_REG 0 struct sba_device ...
99ef0c67bc85e2ea547e2c6c9ed29480cd361446
Analyze and fix the following issue in the Linux kernel code: sticon/parisc: Fix STI console on 64-bit only machines
Problem Details: Fix the STI console to be able to execute either the 64-bit STI ROM code or the 32-bit STI ROM code. This is necessary on 64-bit only machines (e.g. C8000 workstation) which otherwise won't show the STI text console with HP graphic cards like Visualize-FX5/FX10/FXe. Note that when calling 32-bit code...
```diff diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c index 66d82f6d17c7..c746deb79afc 100644 --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c @@ -71,9 +71,9 @@ #include <video/sticore.h> -/* REGION_BASE(fb_info, index) returns the virtual address for region <index> */ +...
c4551d1bddceb76aaaa5aefc236e10c91abfe197
Analyze and fix the following issue in the Linux kernel code: parisc: Fix missing prototype warning for arch_report_meminfo()
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202306122223.HHER4zOo-lkp@intel.com/
```diff diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c index 80943a00e245..b651d020e0e5 100644 --- a/arch/parisc/kernel/pdt.c +++ b/arch/parisc/kernel/pdt.c @@ -23,6 +23,7 @@ #include <asm/pdc.h> #include <asm/pdcpat.h> #include <asm/sections.h> +#include <asm/pgtable.h> enum pdt_access_type { ...
2255234460f0575603a171afd878e6a6083b23f1
Analyze and fix the following issue in the Linux kernel code: parisc: Move TLB_PTLOCK option to Kconfig.debug
Problem Details: Move this debug option to the Kconfig.debug file. Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index c0b4b1c253d1..3d7436c7cfa3 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -304,16 +304,6 @@ config IRQSTACKS for handling hard and soft interrupts. This can help avoid overflowing the process kernel stacks. -config TLB_PTLOCK...
7c1f23ad34fcdace50275a6aa1e1969b41c6233f
Analyze and fix the following issue in the Linux kernel code: spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
Problem Details: If neither a "hif_mspi" nor "mspi" resource is present, the driver will just early exit in probe but still return success. Apart from not doing anything meaningful, this would then also lead to a null pointer access on removal, as platform_get_drvdata() would return NULL, which it would then try to der...
```diff diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index 6b46a3b67c41..d91dfbe47aa5 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -1543,13 +1543,9 @@ int bcm_qspi_probe(struct platform_device *pdev, res = platform_get_resource_byname(pdev, IORESOURCE_MEM, ...
85a61b1ce461a3f62f1019e5e6423c393c542bff
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wcd938x: fix codec initialisation race
Problem Details: Make sure to resume the codec and soundwire device before trying to read the codec variant and configure the device during component probe. This specifically avoids interpreting (a masked and shifted) -EBUSY errno as the variant: wcd938x_codec audio-codec: ASoC: error at soc_component_read_no_lock o...
```diff diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index e7d6a02cdec0..e3ae4fb2c4db 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -3085,6 +3085,10 @@ static int wcd938x_soc_codec_probe(struct snd_soc_component *component) snd_soc_component_init_regmap(componen...
0303c9729afc4094ef53e552b7b8cff7436028d6
Analyze and fix the following issue in the Linux kernel code: x86/efi: Make efi_set_virtual_address_map IBT safe
Problem Details: Niklāvs reported a boot regression on an Alderlake machine and bisected it to commit 9df9d2f0471b ("init: Invoke arch_cpu_finalize_init() earlier"). By moving the invocation of arch_cpu_finalize_init() further down he identified that efi_enter_virtual_mode() is the function which causes the boot hang....
```diff diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index 232acf418cfb..77f7ac3668cb 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c @@ -853,9 +853,9 @@ efi_set_virtual_address_map(unsigned long memory_map_size, /* Disable interrupts around EFI calls...
fa700d73494abbd343c47c6f54837c9874c61bbe
Analyze and fix the following issue in the Linux kernel code: mmc: Revert "mmc: core: Allow mmc_start_host() synchronously detect a card"
Problem Details: It has turned out that some mmc host drivers were not ready to deal with this change. Let's fix those host drivers first, then we can give this a new try. Fixes: 2cc83bf7d411 (mmc: core: Allow mmc_start_host() synchronously detect a card) Cc: Dennis Zhou <dennis@kernel.org> Reported-by: Geert Uytterho...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index ec4108a3e5b9..3d3e0ca52614 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2199,8 +2199,10 @@ int mmc_card_alternative_gpt_sector(struct mmc_card *card, sector_t *gpt_sector) } EXPORT_SYMBOL(mmc_card_alternative_gpt_se...
dc94bb8f271c079f69583d0f12a489aaf5202751
Analyze and fix the following issue in the Linux kernel code: ceph: fix blindly expanding the readahead windows
Problem Details: Blindly expanding the readahead windows will cause unneccessary pagecache thrashing and also will introduce the network workload. We should disable expanding the windows if the readahead is disabled and also shouldn't expand the windows too much. Expanding forward firstly instead of expanding backward...
```diff diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 19c4f08454d2..59cbfb80edbd 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -187,16 +187,42 @@ static void ceph_netfs_expand_readahead(struct netfs_io_request *rreq) struct inode *inode = rreq->inode; struct ceph_inode_info *ci = ceph_inode(inode); str...
23ee27dce30e7d3091d6c3143b79f48dab6f9a3e
Analyze and fix the following issue in the Linux kernel code: ceph: add a dedicated private data for netfs rreq
Problem Details: We need to save the 'f_ra.ra_pages' to expand the readahead window later. Cc: stable@vger.kernel.org Fixes: 49870056005c ("ceph: convert ceph_readpages to ceph_readahead") Link: https://lore.kernel.org/ceph-devel/20230504082510.247-1-sehuww@mail.scut.edu.cn Link: https://www.spinics.net/lists/ceph-use...
```diff diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 6bb251a4d613..19c4f08454d2 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -362,18 +362,28 @@ static int ceph_init_request(struct netfs_io_request *rreq, struct file *file) { struct inode *inode = rreq->inode; int got = 0, want = CEPH_CAP_FILE_CACHE; +...
1c519980aced3da1fae37c1339cf43b24eccdee7
Analyze and fix the following issue in the Linux kernel code: drm/panel: simple: Add Powertip PH800480T013 drm_display_mode flags
Problem Details: Add missing drm_display_mode DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC flags. Those are used by various bridges in the pipeline to correctly configure its sync signals polarity. Fixes: d69de69f2be1 ("drm/panel: simple: Add Powertip PH800480T013 panel") Signed-off-by: Marek Vasut <marex@denx.de> Revi...
```diff diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 454a13cca43a..7e10ae9f8d5d 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -3110,6 +3110,7 @@ static const struct drm_display_mode powertip_ph800480t013_idf02_mode = { ...
0fcfc9e51990246a9813475716746ff5eb98c6aa
Analyze and fix the following issue in the Linux kernel code: cpufreq: intel_pstate: Fix scaling for hybrid-capable systems with disabled E-cores
Problem Details: Some system BIOS configuration may provide option to disable E-cores. As part of this change, CPUID feature for hybrid (Leaf 7 sub leaf 0, EDX[15] = 0) may not be set. But HWP performance limits will still be using a scaling factor like any other hybrid enabled system. The current check for applying s...
```diff diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index f29182512b98..8ca2bce4341a 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -302,6 +302,13 @@ static bool hwp_forced __read_mostly; static struct cpufreq_driver *intel_pstate_driver __read_mo...
17e8e5d6e09adb4b4f4fb5c89b3ec3fcae2c64a6
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix bpf_nf failure upon test rerun
Problem Details: Alexei reported: After fast forwarding bpf-next today bpf_nf test started to fail when run twice: $ ./test_progs -t bpf_nf #17 bpf_nf:OK Summary: 1/10 PASSED, 0 SKIPPED, 0 FAILED $ ./test_progs -t bpf_nf All error logs: test_bpf_nf_ct:PASS:test_bpf_nf__open_and_load 0 nsec tes...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_nf.c b/tools/testing/selftests/bpf/prog_tests/bpf_nf.c index c8ba4009e4ab..b30ff6b3b81a 100644 --- a/tools/testing/selftests/bpf/prog_tests/bpf_nf.c +++ b/tools/testing/selftests/bpf/prog_tests/bpf_nf.c @@ -123,12 +123,13 @@ static void test_bpf_nf_ct(int ...
e55e5df193d247a38a5e1ac65a5316a0adcc22fa
Analyze and fix the following issue in the Linux kernel code: csky: fix up lock_mm_and_find_vma() conversion
Problem Details: As already mentioned in my merge message for the 'expand-stack' branch, we have something like 24 different versions of the page fault path for all our different architectures, all just _slightly_ different due to various historical reasons (usually related to exactly when they branched off the origina...
```diff diff --git a/arch/csky/mm/fault.c b/arch/csky/mm/fault.c index ae9781b7d92e..a885518ce1dd 100644 --- a/arch/csky/mm/fault.c +++ b/arch/csky/mm/fault.c @@ -237,7 +237,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs) if (is_write(regs)) flags |= FAULT_FLAG_WRITE; retry: - vma = lock_mm_and_find_vma(...
ea3f8272876f2958463992f6736ab690fde7fa9c
Analyze and fix the following issue in the Linux kernel code: parisc: fix expand_stack() conversion
Problem Details: In commit 8d7071af8907 ("mm: always expand the stack with the mmap write lock held") I tried to deal with the remaining odd page fault handling cases. The oddest one is ia64, which has stacks that grow both up and down. And because ia64 was _so_ odd, I asked people to verify the end result. But a cl...
```diff diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index 6e894afa4249..a4c7c7630f48 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c @@ -289,7 +289,7 @@ retry: mmap_read_lock(mm); vma = find_vma_prev(mm, address, &prev_vma); if (!vma || address < vma->vm_start) { - if (!prev || ...
36cee69f572c72610da2681a358318d0dc9740b0
Analyze and fix the following issue in the Linux kernel code: perf tools: Do not remove addr_location.thread in thread__find_map()
Problem Details: The thread__find_map() is to find a map for a given address in the given thread's address space. It searches maps based on the cpu mode and fills various information in the addr_location data structure. It might change al->maps and al->map, but not al->thread. Then I think no reason to not set the a...
```diff diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 3860b0c74829..4cbb092e0684 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -581,15 +581,14 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr, maps__zput(al->maps); map__zput(al->map); threa...
0b26eadbf200abf6c97c6d870286c73219cdac65
Analyze and fix the following issue in the Linux kernel code: sparc32: fix lock_mm_and_find_vma() conversion
Problem Details: The sparc32 conversion to lock_mm_and_find_vma() in commit a050ba1e7422 ("mm/fault: convert remaining simple cases to lock_mm_and_find_vma()") missed the fact that we didn't actually have a 'regs' pointer available in the 'force_user_fault()' case. It's there in the regular page fault path ("do_sparc_...
```diff diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index a3ccc0267bc2..86a831ebd8c8 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c @@ -312,7 +312,7 @@ static void force_user_fault(unsigned long address, int write) code = SEGV_MAPERR; - vma = lock_mm_and_find_vma(mm, add...
08fc75735fda3be97194bfbf3c899c87abb3d0fe
Analyze and fix the following issue in the Linux kernel code: mlxsw: minimal: fix potential memory leak in mlxsw_m_linecards_init
Problem Details: The line cards array is not freed in the error path of mlxsw_m_linecards_init(), which can lead to a memory leak. Fix by freeing the array in the error path, thereby making the error path identical to mlxsw_m_linecards_fini(). Fixes: 01328e23a476 ("mlxsw: minimal: Extend module to port mapping with sl...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c index 6b56eadd736e..6b98c3287b49 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c @@ -417,6 +417,7 @@ static int mlxsw_m_linecards_init(struct ...
59bba51ec2a50e3dc5c3ee80f0a23207346303ff
Analyze and fix the following issue in the Linux kernel code: drm/panel: Fine tune Starry-ili9882t panel HFP and HBP
Problem Details: Because the setting of hporch is too small, there will be warning in kernel log[1]. After fine tune the HFP and HBP, this warning can be solved. The actual measurement frame rate is 60.1Hz. [1]: WARNING kernel:[drm] HFP + HBP less than d-phy, FPS will under 60Hz Fixes: 8716a6473e6c ("drm/panel: Suppo...
```diff diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index 3cc9fb0d4f5d..dc276c346fd1 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -2139,9 +2139,9 @@ static const struct panel_desc star...
3cf62c8177adb0db9e15c8b898c44f997acf3ebf
Analyze and fix the following issue in the Linux kernel code: net: dsa: vsc73xx: fix MTU configuration
Problem Details: Switch in MAXLEN register stores the maximum size of a data frame. The MTU size is 18 bytes smaller than the frame size. The current settings are causing problems with packet forwarding. This patch fixes the MTU settings to proper values. Fixes: fb77ffc6ec86 ("net: dsa: vsc73xx: make the MTU configur...
```diff diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index ae55167ce0a6..ef1a4a7c47b2 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -1025,17 +1025,17 @@ static int vsc73xx_change_mtu(struct dsa_switch *ds, int port, in...
fe77cc2e5a6a7c85f5c6ef8a39d7694ffc7f41c9
Analyze and fix the following issue in the Linux kernel code: cxl: Fix one kernel-doc comment
Problem Details: Fix a merge error that updated the argument to cxl_mem_get_fw_info() but not the kernel-doc. drivers/cxl/core/memdev.c:678: warning: Function parameter or member 'mds' not described in 'cxl_mem_get_fw_info' drivers/cxl/core/memdev.c:678: warning: Excess function parameter 'cxlds' description in 'cxl_m...
```diff diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c index 90237b9487a7..f99e7ec3cc40 100644 --- a/drivers/cxl/core/memdev.c +++ b/drivers/cxl/core/memdev.c @@ -666,7 +666,7 @@ static int cxl_memdev_release_file(struct inode *inode, struct file *file) /** * cxl_mem_get_fw_info - Get Firmware ...
554588e8e932e7a0fac7d3ae2132f2b727d9acfe
Analyze and fix the following issue in the Linux kernel code: sysctl: fix unused proc_cap_handler() function warning
Problem Details: Since usermodehelper_table() is marked static now, we get a warning about it being unused when SYSCTL is disabled: kernel/umh.c:497:12: error: 'proc_cap_handler' defined but not used [-Werror=unused-function] Just move it inside of the same #ifdef. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested...
```diff diff --git a/kernel/umh.c b/kernel/umh.c index 41088c5c39fd..1b13c5d34624 100644 --- a/kernel/umh.c +++ b/kernel/umh.c @@ -494,6 +494,7 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait) } EXPORT_SYMBOL(call_usermodehelper); +#if defined(CONFIG_SYSCTL) static int proc_cap_hand...
5b4a82a0724af1dfd1320826e0266117b6a57fbd
Analyze and fix the following issue in the Linux kernel code: Revert "NFSv4: Retry LOCK on OLD_STATEID during delegation return"
Problem Details: Olga Kornievskaia reports that this patch breaks NFSv4.0 state recovery. It also introduces additional complexity in the error paths for cases not related to the original problem. Let's revert it for now, and address the original problem in another manner. This reverts commit f5ea16137a3fa2858620dc90...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 212971ddb149..e1a886b58354 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -7160,7 +7160,6 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) { struct nfs4_lockdata *data = calldata; struct nfs4_lock_state *lsp = data->lsp...
e901f17b0742e36c9d79885a912b666cc1deb210
Analyze and fix the following issue in the Linux kernel code: NFS: Don't cleanup sysfs superblock entry if uninitialized
Problem Details: Its possible to end up in nfs_free_server() before the server's superblock sysfs entry has been initialized, in which case calling kobject_put() will emit a WARNING. Check if the kobject has been initialized before cleaning it up. Fixes: 1c7251187dc0 ("NFS: add superblock sysfs entries") Reported-by:...
```diff diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 48c9d8411c0e..e4c5f193ed5e 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -1021,8 +1021,10 @@ void nfs_free_server(struct nfs_server *server) nfs_put_client(server->nfs_client); - nfs_sysfs_remove_server(server); - kobject_put(&server->kobj); + i...