id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
e13b63c47578a27dbf8907974f0dcba0bb2efe58 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wm8994: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-11-krzy... | ```diff
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index a48e904a9740..fc9894975a1d 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -262,7 +262,7 @@ static int check_clk_sys(struct snd_soc_dapm_widget *source,
else
clk = "AIF1CLK";
- return strcmp(source->name, c... |
e54db8826f48c9ca52f2abd108d6e030ff20cae5 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wm8962: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231023095428.166563-10-krzy... | ```diff
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 83ce5dbecc45..fb90ae6a8a34 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -1854,10 +1854,10 @@ static int tp_event(struct snd_soc_dapm_widget *w,
reg = WM8962_ADDITIONAL_CONTROL_4;
- if (!strcmp(w->name, "T... |
7df1e6a3c608ab0c345b8898f9ee5d5ac19f2eb4 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wcd9335: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broo... | ```diff
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index a05b553e6472..43c648efd0d9 100644
--- a/sound/soc/codecs/wcd9335.c
+++ b/sound/soc/codecs/wcd9335.c
@@ -3296,31 +3296,31 @@ static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w,
int val;
int offset_val = 0;
- ... |
e2d38e1196f61735716f9c2dd89dff32c0655529 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: rtq9128: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broo... | ```diff
diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c
index 371d622c6214..c22b047115cc 100644
--- a/sound/soc/codecs/rtq9128.c
+++ b/sound/soc/codecs/rtq9128.c
@@ -291,11 +291,11 @@ static int rtq9128_dac_power_event(struct snd_soc_dapm_widget *w, struct snd_kco
dev_dbg(comp->dev, "%s: %s eve... |
b2056ce3cf61a39796041dc5c94d7255de7f9f0c | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: rt5682s: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broo... | ```diff
diff --git a/sound/soc/codecs/rt5682s.c b/sound/soc/codecs/rt5682s.c
index 68ac5ea50396..c261c33c4be7 100644
--- a/sound/soc/codecs/rt5682s.c
+++ b/sound/soc/codecs/rt5682s.c
@@ -1323,9 +1323,9 @@ static int set_i2s_event(struct snd_soc_dapm_widget *w,
if (SND_SOC_DAPM_EVENT_ON(event))
on = 1;
- if (!str... |
a1fa72a780f428ddc956cf5ed4b97e2be76ceba3 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: max9867: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-6-krzysztof.kozlowski@... | ```diff
diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index b616ad39858c..3b9dd158c34b 100644
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -56,13 +56,13 @@ static int max9867_adc_dac_event(struct snd_soc_dapm_widget *w,
struct max9867_priv *max9867 = snd_soc_component_ge... |
5efc1c903e2b43a267ad13696698fcc152ed873a | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: lpass-rx-macro: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broo... | ```diff
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 29197d34ec09..f35187d69cac 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -2906,14 +2906,14 @@ static int rx_macro_enable_echo(struct snd_soc_dapm_widget *w,
val = snd_soc_comp... |
ecea1812b911fed5e675b2d37b29ad4265c067ce | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: adav80x: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-4-krzysztof.kozlowski@... | ```diff
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index bb08969c5917..c8c0fc928211 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -229,7 +229,7 @@ static int adav80x_dapm_sysclk_check(struct snd_soc_dapm_widget *source,
return 0;
}
- return strcmp(source->n... |
7a0762587a814387e631c07ae81169a7c646f012 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: adau1373: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231023095428.166563-3-krzysztof.kozlowski@... | ```diff
diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
index b0ab0a69b207..3582c4b968a0 100644
--- a/sound/soc/codecs/adau1373.c
+++ b/sound/soc/codecs/adau1373.c
@@ -834,7 +834,7 @@ static int adau1373_check_aif_clk(struct snd_soc_dapm_widget *source,
else
clk = "SYSCLK2";
- return strcm... |
ccd0c6c7097b52b01a2c5951cfe96714d4421cd2 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: 88pm860x: Handle component name prefix | Problem Details:
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231023095428.166563-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broo... | ```diff
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index d99b674d574b..be01f0928393 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -400,9 +400,9 @@ static int pm860x_dac_event(struct snd_soc_dapm_widget *w,
unsigned int dac = 0;
int ... |
cdcd6aef9db5797995d4153ea19fdf56d189f0e4 | Analyze and fix the following issue in the Linux kernel code: drm/vc4: tests: Fix UAF in the mock helpers | Problem Details:
The VC4 mock helpers allocate the CRTC, encoders and connectors using a
call to kunit_kzalloc(), but the DRM device they are attache to survives
for longer than the test itself which leads to use-after-frees reported
by KASAN.
Switch to drmm_kzalloc to tie the lifetime of these objects to the main
DRM... | ```diff
diff --git a/drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c b/drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c
index 5d12d7beef0e..ade3309ae042 100644
--- a/drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock_crtc.c
@@ -26,7 +26,7 @@ struct vc4_dummy_crtc *vc4_mock_pv(struct kunit *test,
st... |
c39fc2aca32a93d88e4e90ec6f2148b3491ad88f | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Move enable_ips module parameter under display | Problem Details:
Move enable_ips module parameter under display and change it as boolean.
v2:
- Change enable_ip as boolean
- Fix copy paste error (i915_param -> intel_display_param)
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Luca Coelho <lu... | ```diff
diff --git a/drivers/gpu/drm/i915/display/hsw_ips.c b/drivers/gpu/drm/i915/display/hsw_ips.c
index 7dc38ac02092..611a7d6ef80c 100644
--- a/drivers/gpu/drm/i915/display/hsw_ips.c
+++ b/drivers/gpu/drm/i915/display/hsw_ips.c
@@ -193,7 +193,7 @@ bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_s... |
942d654171bdaf41bc5c298857c5a342031d8154 | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Move psr related module parameters under display | Problem Details:
Move psr related module parameters under display. Also fix error in
enable_psr2_sel_fetch module parameter descrtiption. It was saying disabled
by default while it's vice versa. Also psr_safest_params was missing
default value in description. This is now added.
v2:
- Fix enable_psr2_sel_fetch descri... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_display_params.c b/drivers/gpu/drm/i915/display/intel_display_params.c
index 330613cd64db..0e86d0d10bfa 100644
--- a/drivers/gpu/drm/i915/display/intel_display_params.c
+++ b/drivers/gpu/drm/i915/display/intel_display_params.c
@@ -31,6 +31,22 @@ intel_display_para... |
3a75b205de43365f80a33b98ec9289785da56243 | Analyze and fix the following issue in the Linux kernel code: tty: n_gsm: fix race condition in status line change on dead connections | Problem Details:
gsm_cleanup_mux() cleans up the gsm by closing all DLCIs, stopping all
timers, removing the virtual tty devices and clearing the data queues.
This procedure, however, may cause subsequent changes of the virtual modem
status lines of a DLCI. More data is being added the outgoing data queue
and the delet... | ```diff
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 1f3aba607cd5..0ee7531c9201 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -4108,6 +4108,8 @@ static int gsm_modem_upd_via_msc(struct gsm_dlci *dlci, u8 brk)
static int gsm_modem_update(struct gsm_dlci *dlci, u8 brk)
{
+ if (dlci->gs... |
51c2385f608b08025600dd8015c43a8811c714c6 | Analyze and fix the following issue in the Linux kernel code: drm/doc: ci: Require more context for flaky tests | Problem Details:
Flaky tests can be very difficult to reproduce after the facts, which
will make it even harder to ever fix.
Let's document the metadata we agreed on to provide more context to
anyone trying to address these fixes.
Link: https://lore.kernel.org/dri-devel/CAPj87rPbJ1V1-R7WMTHkDat2A4nwSd61Df9mdGH2PR=Zzx... | ```diff
diff --git a/Documentation/gpu/automated_testing.rst b/Documentation/gpu/automated_testing.rst
index 469b6fb65c30..792428a2bfdc 100644
--- a/Documentation/gpu/automated_testing.rst
+++ b/Documentation/gpu/automated_testing.rst
@@ -67,6 +67,19 @@ Lists the tests that for a given driver on a specific hardware rev... |
3e6b0bb22a803532a7ddf8ba255c46213c24a478 | Analyze and fix the following issue in the Linux kernel code: HID: logitech-hidpp: Stop IO before calling hid_connect() | Problem Details:
hid_connect() will call hid_pidff_init() which does
hid_device_io_start() leading to an "io already started" warning.
To fix this call hid_device_io_stop() before calling hid_connect(),
stopping IO means that connect events may be lost while hid_connect()
runs, re-enable IO and move the hidpp_connect_... | ```diff
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index c1bc89560612..fd6d8f1d9b8f 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -4461,19 +4461,22 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
else
... |
b132ac51d7a50c37683be56c96ff64f8c887930f | Analyze and fix the following issue in the Linux kernel code: accel/ivpu/37xx: Fix missing VPUIP interrupts | Problem Details:
Move sequence of masking and unmasking global interrupts from buttress
interrupt handler to generic one that handles both VPUIP and BTRS
interrupts. Unmasking global interrupts will re-trigger MSI for any
pending interrupts.
Lack of this sequence will cause the driver to miss any
VPUIP interrupt that ... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_hw_37xx.c b/drivers/accel/ivpu/ivpu_hw_37xx.c
index 976019429164..18be8b98e9a8 100644
--- a/drivers/accel/ivpu/ivpu_hw_37xx.c
+++ b/drivers/accel/ivpu/ivpu_hw_37xx.c
@@ -940,9 +940,6 @@ static u32 ivpu_hw_37xx_irqb_handler(struct ivpu_device *vdev, int irq)
if (status == 0... |
47846d51348dd62e5231a83be040981b17c955fa | Analyze and fix the following issue in the Linux kernel code: audit: don't take task_lock() in audit_exe_compare() code path | Problem Details:
The get_task_exe_file() function locks the given task with task_lock()
which when used inside audit_exe_compare() can cause deadlocks on
systems that generate audit records when the task_lock() is held. We
resolve this problem with two changes: ignoring those cases where the
task being audited is not t... | ```diff
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index 65075f1e4ac8..91e82e34b51e 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -527,11 +527,18 @@ int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)
unsigned long ino;
dev_t dev;
- exe_file = get_task_... |
29e06c10702e81a7d0b75020ca514d2f2962704a | Analyze and fix the following issue in the Linux kernel code: eventfs: Fix typo in eventfs_inode union comment | Problem Details:
It's eventfs_inode not eventfs_indoe. There's no deer involved!
Link: https://lore.kernel.org/linux-trace-kernel/20231024131024.5634c743@gandalf.local.home
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Fixes: 5790b1fb3d672 ("eventfs: Remove eventfs_file and just u... | ```diff
diff --git a/fs/tracefs/internal.h b/fs/tracefs/internal.h
index 298d3ecaf621..64fde9490f52 100644
--- a/fs/tracefs/internal.h
+++ b/fs/tracefs/internal.h
@@ -37,7 +37,7 @@ struct eventfs_inode {
/*
* Union - used for deletion
* @del_list: list of eventfs_inode to delete
- * @rcu: eventfs_indoe to dele... |
a9de4eb15ad430fe45747c211e367da745a90093 | Analyze and fix the following issue in the Linux kernel code: eventfs: Fix WARN_ON() in create_file_dentry() | Problem Details:
As the comment right above a WARN_ON() in create_file_dentry() states:
* Note, with the mutex held, the e_dentry cannot have content
* and the ei->is_freed be true at the same time.
But the WARN_ON() only has:
WARN_ON_ONCE(ei->is_free);
Where to match the comment (and what it should actually ... | ```diff
diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index 09ab93357957..4d2da7480e5f 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -264,8 +264,9 @@ create_file_dentry(struct eventfs_inode *ei, struct dentry **e_dentry,
* Note, with the mutex held, the e_dentry cannot h... |
0f7f544af60a6082cfaa3ed4c8f4ca1a858807ee | Analyze and fix the following issue in the Linux kernel code: powerpc: Remove initialisation of readpos | Problem Details:
While powerpc doesn't use the seq_buf readpos, it did explicitly
initialise it for no good reason.
Link: https://lore.kernel.org/linux-trace-kernel/20231024145600.739451-1-willy@infradead.org
Cc: Christoph Hellwig <hch@lst.de>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Kent Overstreet <kent.overst... | ```diff
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 2f1026fba00d..34975532e44c 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -601,7 +601,6 @@ struct seq_buf ppc_hw_desc __initdata = {
.buffer = ppc_hw_desc_buf,
.size = size... |
629df6701c8a9172f4274af6de9dfa99e2c7ac56 | Analyze and fix the following issue in the Linux kernel code: net: ipv6/addrconf: clamp preferred_lft to the minimum required | Problem Details:
If the preferred lifetime was less than the minimum required lifetime,
ipv6_create_tempaddr would error out without creating any new address.
On my machine and network, this error happened immediately with the
preferred lifetime set to 1 second, after a few minutes with the
preferred lifetime set to 4 ... | ```diff
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 26aedaab3647..3aaea56b5166 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1407,15 +1407,23 @@ retry:
write_unlock_bh(&idev->lock);
- /* A temporary address is created only if this calculated Preferred
- * Lifetime is greater tha... |
03d6c848bfb406e9ef6d9846d759e97beaeea113 | Analyze and fix the following issue in the Linux kernel code: ipv6: avoid atomic fragment on GSO packets | Problem Details:
When the ipv6 stack output a GSO packet, if its gso_size is larger than
dst MTU, then all segments would be fragmented. However, it is possible
for a GSO packet to have a trailing segment with smaller actual size
than both gso_size as well as the MTU, which leads to an "atomic
fragment". Atomic fragmen... | ```diff
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 4010dd97aaf8..a722a43dd668 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -164,7 +164,13 @@ ip6_finish_output_gso_slowpath_drop(struct net *net, struct sock *sk,
int err;
skb_mark_not_on_list(segs);
- err = ip6_fragment... |
53798666648af3aa0dd512c2380576627237a800 | Analyze and fix the following issue in the Linux kernel code: iavf: in iavf_down, disable queues when removing the driver | Problem Details:
In iavf_down, we're skipping the scheduling of certain operations if
the driver is being removed. However, the IAVF_FLAG_AQ_DISABLE_QUEUES
request must not be skipped in this case, because iavf_close waits
for the transition to the __IAVF_DOWN state, which happens in
iavf_virtchnl_completion after the ... | ```diff
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 5b5c0525aa13..b3434dbc90d6 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -1437,9 +1437,9 @@ void iavf_down(struct iavf_adapter *adapter)
... |
7f1ee4e2070883d18a431c761db8bb30a958b654 | Analyze and fix the following issue in the Linux kernel code: mempolicy trivia: delete those ancient pr_debug()s | Problem Details:
Delete those ancient pr_debug()s - PDprintk()s in Andi Kleen's original
submission of core NUMA API, and useful when debugging shared mempolicy
lifetime back then, but not used recently.
Link: https://lkml.kernel.org/r/f25135-ffb2-40d8-9577-720772b333@google.com
Signed-off-by: Hugh Dickins <hughd@goog... | ```diff
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index b6d82c8bc479..02a9b89c10aa 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -264,9 +264,6 @@ static struct mempolicy *mpol_new(unsigned short mode, unsigned short flags,
{
struct mempolicy *policy;
- pr_debug("setting mode %d flags %d nodes[0] %lx\n",
-... |
1cb5d11a370f661c5d0d888bb0cfc2cdc5791382 | Analyze and fix the following issue in the Linux kernel code: mempolicy: fix migrate_pages(2) syscall return nr_failed | Problem Details:
"man 2 migrate_pages" says "On success migrate_pages() returns the number
of pages that could not be moved". Although 5.3 and 5.4 commits fixed
mbind(MPOL_MF_STRICT|MPOL_MF_MOVE*) to fail with EIO when not all pages
could be moved (because some could not be isolated for migration),
migrate_pages(2) wa... | ```diff
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 8bb5b4b4b395..b6d82c8bc479 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -111,7 +111,8 @@
/* Internal flags */
#define MPOL_MF_DISCONTIG_OK (MPOL_MF_INTERNAL << 0) /* Skip checks for continuous vmas */
-#define MPOL_MF_INVERT (MPOL_MF_INTERNAL << 1) ... |
4b981bc1aa73c204c2aa7f99b5f4f74d03b0e381 | Analyze and fix the following issue in the Linux kernel code: kernfs: drop shared NUMA mempolicy hooks | Problem Details:
It seems strange that kernfs should be an outlier with a set_policy and
get_policy in its kernfs_vm_ops. Ah, it dates back to v2.6.30's commit
095160aee954 ("sysfs: fix some bin_vm_ops errors"), when I had crashed on
powerpc's pci_mmap_legacy_page_range() fallback to shmem_zero_setup().
Well, that wa... | ```diff
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index 180906c36f51..aaa76410e550 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -429,60 +429,11 @@ static int kernfs_vma_access(struct vm_area_struct *vma, unsigned long addr,
return ret;
}
-#ifdef CONFIG_NUMA
-static int kernfs_vma_set_policy(struc... |
b8ee5575f763c239902f8523d82103a45c153b29 | Analyze and fix the following issue in the Linux kernel code: mm/damon/sysfs-test: add a unit test for damon_sysfs_set_targets() | Problem Details:
damon_sysfs_set_targets() had a bug that can result in unexpected memory
usage and monitoring overhead increase. The bug has fixed by a previous
commit. Add a unit test for avoiding a similar bug of future.
Link: https://lkml.kernel.org/r/20231022210735.46409-3-sj@kernel.org
Signed-off-by: SeongJae ... | ```diff
diff --git a/mm/damon/Kconfig b/mm/damon/Kconfig
index 436c6b4cb5ec..29f43fbc2eff 100644
--- a/mm/damon/Kconfig
+++ b/mm/damon/Kconfig
@@ -59,6 +59,18 @@ config DAMON_SYSFS
This builds the sysfs interface for DAMON. The user space can use
the interface for arbitrary data access monitoring.
+config DA... |
62f76a7b53bfa2ecfe1570a5b1d0d574c576a56d | Analyze and fix the following issue in the Linux kernel code: mm/damon/core: avoid divide-by-zero from pseudo-moving window length calculation | Problem Details:
When calculating the pseudo-moving access rate, DAMON divides some values
by the maximum nr_accesses. However, due to the type of the related
variables, simple division-based calculation of the divisor can return
zero. As a result, divide-by-zero is possible. Fix it by using
damon_max_nr_accesses(),... | ```diff
diff --git a/mm/damon/core.c b/mm/damon/core.c
index e194c8075235..aa2dc7087cd9 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -1665,7 +1665,7 @@ void damon_update_region_access_rate(struct damon_region *r, bool accessed,
* aggr_interval, owing to validation of damon_set_attrs().
*/
if (attrs->sa... |
44063f125af4bb4efd1d500d8091fa33a98af325 | Analyze and fix the following issue in the Linux kernel code: mm/damon/lru_sort: avoid divide-by-zero in hot threshold calculation | Problem Details:
When calculating the hotness threshold for lru_prio scheme of
DAMON_LRU_SORT, the module divides some values by the maximum nr_accesses.
However, due to the type of the related variables, simple division-based
calculation of the divisor can return zero. As a result, divide-by-zero
is possible. Fix it... | ```diff
diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c
index 3ecdcc029443..f2e5f9431892 100644
--- a/mm/damon/lru_sort.c
+++ b/mm/damon/lru_sort.c
@@ -195,9 +195,7 @@ static int damon_lru_sort_apply_parameters(void)
if (err)
return err;
- /* aggr_interval / sample_interval is the maximum nr_accesses */
-... |
3bafc47d3c4a2fc4d3b382aeb3c087f8fc84d9fd | Analyze and fix the following issue in the Linux kernel code: mm/damon/ops-common: avoid divide-by-zero during region hotness calculation | Problem Details:
When calculating the hotness of each region for the under-quota regions
prioritization, DAMON divides some values by the maximum nr_accesses.
However, due to the type of the related variables, simple division-based
calculation of the divisor can return zero. As a result, divide-by-zero
is possible. ... | ```diff
diff --git a/mm/damon/ops-common.c b/mm/damon/ops-common.c
index ac1c3fa80f98..d25d99cb5f2b 100644
--- a/mm/damon/ops-common.c
+++ b/mm/damon/ops-common.c
@@ -73,7 +73,6 @@ void damon_pmdp_mkold(pmd_t *pmd, struct vm_area_struct *vma, unsigned long addr
int damon_hot_score(struct damon_ctx *c, struct damon_reg... |
d35963bfb05877455228ecec6b194f624489f96a | Analyze and fix the following issue in the Linux kernel code: mm/damon/core: avoid divide-by-zero during monitoring results update | Problem Details:
When monitoring attributes are changed, DAMON updates access rate of the
monitoring results accordingly. For that, it divides some values by the
maximum nr_accesses. However, due to the type of the related variables,
simple division-based calculation of the divisor can return zero. As a
result, divi... | ```diff
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 9f4f7c378cf3..e194c8075235 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -500,20 +500,14 @@ static unsigned int damon_age_for_new_attrs(unsigned int age,
static unsigned int damon_accesses_bp_to_nr_accesses(
unsigned int accesses_bp, struct damon_... |
35f5d94187a6a3a8df2cba54beccca1c2379edb8 | Analyze and fix the following issue in the Linux kernel code: mm/damon: implement a function for max nr_accesses safe calculation | Problem Details:
Patch series "avoid divide-by-zero due to max_nr_accesses overflow".
The maximum nr_accesses of given DAMON context can be calculated by
dividing the aggregation interval by the sampling interval. Some logics
in DAMON uses the maximum nr_accesses as a divisor. Hence, the value
shouldn't be zero. Su... | ```diff
diff --git a/include/linux/damon.h b/include/linux/damon.h
index 27b995c22497..ab2f17d9926b 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -681,6 +681,13 @@ static inline bool damon_target_has_pid(const struct damon_ctx *ctx)
return ctx->ops.id == DAMON_OPS_VADDR || ctx->ops.id == DAMON_OPS... |
b1454b463c217e5bc553acc44b2389d9257c9708 | Analyze and fix the following issue in the Linux kernel code: mm: mlock: avoid folio_within_range() on KSM pages | Problem Details:
Since commit dc68badcede4 ("mm: mlock: update mlock_pte_range to handle
large folio") I've just occasionally seen VM_WARN_ON_FOLIO(folio_test_ksm)
warnings from folio_within_range(), in a splurge after testing with KSM
hyperactive.
folio_referenced_one()'s use of folio_within_vma() is safe because it
... | ```diff
diff --git a/mm/mlock.c b/mm/mlock.c
index aa44456200e3..086546ac5766 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -346,6 +346,10 @@ static inline bool allow_mlock_munlock(struct folio *folio,
if (!(vma->vm_flags & VM_LOCKED))
return true;
+ /* folio_within_range() cannot take KSM, but any small folio is ... |
1cbf0a58847b30507611f92ad69964ef37264d14 | Analyze and fix the following issue in the Linux kernel code: ext4: add __GFP_NOWARN to GFP_NOWAIT in readahead | Problem Details:
Since commit e509ad4d77e6 ("ext4: use bdev_getblk() to avoid memory
reclaim in readahead path") rightly replaced GFP_NOFAIL allocations by
GFP_NOWAIT allocations, I've occasionally been seeing "page allocation
failure: order:0" warnings under load: all with
ext4_sb_breadahead_unmovable() in the stack. ... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c00ec159dea5..56a08fc5c5d5 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -262,7 +262,7 @@ struct buffer_head *ext4_sb_bread_unmovable(struct super_block *sb,
void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block)
{
struct buffer... |
e5b16c862884a62c09ab60cbfc6c7b544670bf9e | Analyze and fix the following issue in the Linux kernel code: mm: hugetlb_vmemmap: fix reference to nonexistent file | Problem Details:
The directory this file is in was renamed but the reference didn't get
updated. Fix it.
Link: https://lkml.kernel.org/r/20231022185619.919397-1-vegard.nossum@oracle.com
Fixes: ee65728e103b ("docs: rename Documentation/vm to Documentation/mm")
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Ac... | ```diff
diff --git a/mm/hugetlb_vmemmap.h b/mm/hugetlb_vmemmap.h
index 9fd0cb270502..2fcae92d3359 100644
--- a/mm/hugetlb_vmemmap.h
+++ b/mm/hugetlb_vmemmap.h
@@ -12,7 +12,7 @@
/*
* Reserve one vmemmap page, all vmemmap addresses are mapped to it. See
- * Documentation/vm/vmemmap_dedup.rst.
+ * Documentation/mm/vm... |
be16dd764a69752a31096d1a6b2ad775b728b1bd | Analyze and fix the following issue in the Linux kernel code: mm: fix multiple typos in multiple files | Problem Details:
Link: https://lkml.kernel.org/r/20231023124405.36981-1-m.muzzammilashraf@gmail.com
Signed-off-by: Muhammad Muzammil <m.muzzammilashraf@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Matthew Wilcox (Oracle) <willy@infra... | ```diff
diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
index 48e329ea5ba3..e651500e597a 100644
--- a/mm/debug_vm_pgtable.c
+++ b/mm/debug_vm_pgtable.c
@@ -1322,8 +1322,8 @@ static int __init debug_vm_pgtable(void)
* true irrespective of the starting protection value for a
* given page table entry.
... |
b7812c86c7403283f8b3775ee11c6c01d457016c | Analyze and fix the following issue in the Linux kernel code: mm: memory_hotplug: drop memoryless node from fallback lists | Problem Details:
In offline_pages(), if a node becomes memoryless, we will clear its
N_MEMORY state by calling node_states_clear_node(). But we do this
after rebuilding the zonelists by calling build_all_zonelists(), which
will cause this memoryless node to still be in the fallback nodes
(node_order[]) of other nodes.... | ```diff
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 3b301c4023ff..ab41a511e20a 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -2012,12 +2012,16 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages,
/* reinitialise watermarks and update pcp limits */
init_per_zon... |
c2baef394af88af19e3945f861145679e92ff3e4 | Analyze and fix the following issue in the Linux kernel code: mm: page_alloc: skip memoryless nodes entirely | Problem Details:
Patch series "handle memoryless nodes more appropriately", v3.
Currently, in the process of initialization or offline memory, memoryless
nodes will still be built into the fallback list of itself or other nodes.
This is not what we expected, so this patch series removes memoryless
nodes from the fall... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d52718284029..aa90758950a7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5020,8 +5020,11 @@ int find_next_best_node(int node, nodemask_t *used_node_mask)
int min_val = INT_MAX;
int best_node = NUMA_NO_NODE;
- /* Use the local node if we haven't... |
a259945efe6ada94087ef666e9b38f8e34ea34ba | Analyze and fix the following issue in the Linux kernel code: mm/migrate: correct nr_failed in migrate_pages_sync() | Problem Details:
nr_failed was missing the large folio splits from migrate_pages_batch()
and can cause a mismatch between migrate_pages() return value and the
number of not migrated pages, i.e., when the return value of
migrate_pages() is 0, there are still pages left in the from page list.
It will happen when a non-P... | ```diff
diff --git a/mm/migrate.c b/mm/migrate.c
index 71fc5064cec6..53244d283c3e 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1495,6 +1495,7 @@ struct migrate_pages_stats {
int nr_thp_succeeded; /* THP migrated successfully */
int nr_thp_failed; /* THP failed to be migrated */
int nr_thp_split; /* THP split ... |
5e4fc577db2514fee3cc2729415d0e2589d5d056 | Analyze and fix the following issue in the Linux kernel code: mm/kmemleak: fix partially freeing unknown object warning | Problem Details:
delete_object_part() can be called by multiple callers in the same time.
If an object is found and removed by a caller, and then another caller try
to find it too, it failed and return directly. It still be recorded by
kmemleak even if it has already been freed to buddy. With DEBUG on,
kmemleak will... | ```diff
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index f63c220eb49e..22bab3738a9e 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -816,16 +816,25 @@ static void delete_object_full(unsigned long ptr)
*/
static void delete_object_part(unsigned long ptr, size_t size, bool is_phys)
{
- struct kmemleak_object *objec... |
2e1d47385f98aa0fa7d71aeee32d26cc6f8493e0 | Analyze and fix the following issue in the Linux kernel code: mm: kmemleak: use mem_pool_free() to free object | Problem Details:
The kmemleak object is allocated by mem_pool_alloc(), which could be from
slab or mem_pool[], so it's not suitable using __kmem_cache_free() to free
the object, use __mem_pool_free() instead.
Link: https://lkml.kernel.org/r/20231018102952.3339837-6-liushixin2@huawei.com
Fixes: 0647398a8c7b ("mm: kmeml... | ```diff
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 39732dcaf45b..82322b029f1c 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -668,8 +668,8 @@ static struct kmemleak_object *__alloc_object(gfp_t gfp)
return object;
}
-static void __link_object(struct kmemleak_object *object, unsigned long ptr,
- size_t... |
62047e0f3e3a707599afe6d43cf684a2a02d05d5 | Analyze and fix the following issue in the Linux kernel code: mm/kmemleak: fix print format of pointer in pr_debug() | Problem Details:
With 0x%p, the pointer will be hashed and print (____ptrval____) instead.
And with 0x%pa, the pointer can be successfully printed but with duplicate
prefixes, which looks like:
kmemleak: kmemleak_free(0x(____ptrval____))
kmemleak: kmemleak_free_percpu(0x(____ptrval____))
kmemleak: kmemleak_free_pa... | ```diff
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 54c2c90d3abc..289b3be5ee6e 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -975,7 +975,7 @@ static void object_no_scan(unsigned long ptr)
void __ref kmemleak_alloc(const void *ptr, size_t size, int min_count,
gfp_t gfp)
{
- pr_debug("%s(0x%p, %zu, %d)\n... |
80203f1ca086835100843f1474bd6dd4a48cc73b | Analyze and fix the following issue in the Linux kernel code: bootmem: use kmemleak_free_part_phys in free_bootmem_page | Problem Details:
Since kmemleak_alloc_phys() rather than kmemleak_alloc() was called from
memblock_alloc_range_nid(), kmemleak_free_part_phys() should be used to
delete kmemleak object in free_bootmem_page(). In debug mode, there are
following warning:
kmemleak: Partially freeing unknown object at 0xffff97345aff7000... | ```diff
diff --git a/include/linux/bootmem_info.h b/include/linux/bootmem_info.h
index e1a3c9c9754c..cffa38a73618 100644
--- a/include/linux/bootmem_info.h
+++ b/include/linux/bootmem_info.h
@@ -60,7 +60,7 @@ static inline void get_page_bootmem(unsigned long info, struct page *page,
static inline void free_bootmem_p... |
6d4e2cda62af38f7c21052b6847ffff08ea7173f | Analyze and fix the following issue in the Linux kernel code: bootmem: use kmemleak_free_part_phys in put_page_bootmem | Problem Details:
Patch series "Some bugfix about kmemleak", v3.
Some bugfixes for kmemleak and the printed info from debug mode.
This patch (of 7):
Since kmemleak_alloc_phys() rather than kmemleak_alloc() was called from
memblock_alloc_range_nid(), kmemleak_free_part_phys() should be used to
delete kmemleak object ... | ```diff
diff --git a/mm/bootmem_info.c b/mm/bootmem_info.c
index b1efebfcf94b..fa7cb0c87c03 100644
--- a/mm/bootmem_info.c
+++ b/mm/bootmem_info.c
@@ -34,7 +34,7 @@ void put_page_bootmem(struct page *page)
ClearPagePrivate(page);
set_page_private(page, 0);
INIT_LIST_HEAD(&page->lru);
- kmemleak_free_part(page... |
52166607ecc980391b1fffbce0be3074a96d0c7b | Analyze and fix the following issue in the Linux kernel code: mm: restrict the pcp batch scale factor to avoid too long latency | Problem Details:
In page allocator, PCP (Per-CPU Pageset) is refilled and drained in
batches to increase page allocation throughput, reduce page
allocation/freeing latency per page, and reduce zone lock contention. But
too large batch size will cause too long maximal allocation/freeing
latency, which may punish arbitr... | ```diff
diff --git a/mm/Kconfig b/mm/Kconfig
index 45f2971ef642..89971a894b60 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -705,6 +705,17 @@ config HUGETLB_PAGE_SIZE_VARIABLE
config CONTIG_ALLOC
def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
+config PCP_BATCH_SCALE_MAX
+ int "Maximum scale factor of PCP (Per-CPU ... |
09aec5f9b2505c73a9380800f61ad920cc64a7cd | Analyze and fix the following issue in the Linux kernel code: mm: kmsan: panic on failure to allocate early boot metadata | Problem Details:
Given large enough allocations and a machine with low enough memory (i.e a
default QEMU VM), it's entirely possible that
kmsan_init_alloc_meta_for_range's shadow+origin allocation fails.
Instead of eating a NULL deref kernel oops, check explicitly for
memblock_alloc() failure and panic with a nice err... | ```diff
diff --git a/mm/kmsan/shadow.c b/mm/kmsan/shadow.c
index 87318f9170f1..b9d05aff313e 100644
--- a/mm/kmsan/shadow.c
+++ b/mm/kmsan/shadow.c
@@ -285,12 +285,17 @@ void __init kmsan_init_alloc_meta_for_range(void *start, void *end)
size = PAGE_ALIGN((u64)end - (u64)start);
shadow = memblock_alloc(size, PAGE_SI... |
fa8c4f9a665bd0cf5a475327aea4fd179e896216 | Analyze and fix the following issue in the Linux kernel code: mm: fix draining remote pageset | Problem Details:
If there is no memory allocation/freeing in the PCP (Per-CPU Pageset) of a
remote zone (zone in remote NUMA node) after some time (3 seconds for
now), the pages of the PCP of the remote zone will be drained to avoid
memory wastage.
This behavior was introduced in the commit 4ae7c03943fc ("[PATCH]
Peri... | ```diff
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 894e4c88d241..88ea95d4221c 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -857,8 +857,10 @@ static int refresh_cpu_vm_stats(bool do_pagesets)
continue;
}
- if (__this_cpu_dec_return(pcp->expire))
+ if (__this_cpu_dec_return(pcp->expire)) {
+ changes+... |
53b08c4985158430fd6d035fb49443bada535210 | Analyze and fix the following issue in the Linux kernel code: vsock/virtio: initialize the_virtio_vsock before using VQs | Problem Details:
Once VQs are filled with empty buffers and we kick the host, it can send
connection requests. If the_virtio_vsock is not initialized before,
replies are silently dropped and do not reach the host.
virtio_transport_send_pkt() can queue packets once the_virtio_vsock is
set, but they won't be processed u... | ```diff
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index e95df847176b..b80bf681327b 100644
--- a/net/vmw_vsock/virtio_transport.c
+++ b/net/vmw_vsock/virtio_transport.c
@@ -555,6 +555,11 @@ static int virtio_vsock_vqs_init(struct virtio_vsock *vsock)
virtio_device_ready(vdev);
... |
3779416eed25a843364b940decee452620a1de4b | Analyze and fix the following issue in the Linux kernel code: perf vendor events intel: Fix broadwellde tma_info_system_dram_bw_use metric | Problem Details:
Broadwell-de has a consumer core and server uncore. The uncore_arb PMU
isn't present and the broadwellx style cbox PMU should be used
instead. Fix the tma_info_system_dram_bw_use metric to use the server
metric rather than client.
The associated converter script fix is in:
https://github.com/intel/per... | ```diff
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json b/tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json
index 8fc62b8f667d..d0ef46c9bb61 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.js... |
9b5c6281838fc84683dd99b47302d81fce399918 | Analyze and fix the following issue in the Linux kernel code: 9p: v9fs_listxattr: fix %s null argument warning | Problem Details:
W=1 warns about null argument to kprintf:
In file included from fs/9p/xattr.c:12:
In function ‘v9fs_xattr_get’,
inlined from ‘v9fs_listxattr’ at fs/9p/xattr.c:142:9:
include/net/9p/9p.h:55:2: error: ‘%s’ directive argument is null
[-Werror=format-overflow=]
55 | _p9_debug(level, __func__, fmt, ... | ```diff
diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
index e00cf8109b3f..3c4572ef3a48 100644
--- a/fs/9p/xattr.c
+++ b/fs/9p/xattr.c
@@ -68,7 +68,7 @@ ssize_t v9fs_xattr_get(struct dentry *dentry, const char *name,
struct p9_fid *fid;
int ret;
- p9_debug(P9_DEBUG_VFS, "name = %s value_len = %zu\n",
+ p9_debug(P9_DE... |
355f074609dbf3042900ea9d30fcd2b0c323a365 | Analyze and fix the following issue in the Linux kernel code: 9p/trans_fd: Annotate data-racy writes to file::f_flags | Problem Details:
syzbot reported:
| BUG: KCSAN: data-race in p9_fd_create / p9_fd_create
|
| read-write to 0xffff888130fb3d48 of 4 bytes by task 15599 on cpu 0:
| p9_fd_open net/9p/trans_fd.c:842 [inline]
| p9_fd_create+0x210/0x250 net/9p/trans_fd.c:1092
| p9_client_create+0x595/0xa70 net/9p/client.c:1010
| ... | ```diff
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index f226953577b2..1a3948b8c493 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -836,14 +836,21 @@ static int p9_fd_open(struct p9_client *client, int rfd, int wfd)
goto out_free_ts;
if (!(ts->rd->f_mode & FMODE_READ))
goto out_put_rd;
- /* p... |
d621a46d05107f4e510383d6a38f2160c62d28f7 | Analyze and fix the following issue in the Linux kernel code: Revert "hwmon: (sch56xx-common) Add automatic module loading on supported devices" | Problem Details:
This reverts commit 393935baa45e5ccb9603cf7f9f020ed1bc0915f7.
As reported by Ian Nartowicz, this and the next patch
result in a failure to load the driver on Celsius W280.
While the alternative would be to add the board to the DMI
override table, it is quite likely that other systems are
also affected... | ```diff
diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
index 3ece53adabd6..ac1f72580715 100644
--- a/drivers/hwmon/sch56xx-common.c
+++ b/drivers/hwmon/sch56xx-common.c
@@ -7,10 +7,8 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
-#include <linux/mod_devicetab... |
28da9dee3594423534f3ea1e1f61e6bb2d2fa651 | Analyze and fix the following issue in the Linux kernel code: Revert "hwmon: (sch56xx-common) Add DMI override table" | Problem Details:
This reverts commit fd2d53c367ae9983c2100ac733a834e0c79d7537.
As reported by Ian Nartowicz, this and the preceding patch
result in a failure to load the driver on Celsius W280.
While the alternative would be to add the board to the DMI
override table, it is quite likely that other systems are
also aff... | ```diff
diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
index de3a0886c2f7..3ece53adabd6 100644
--- a/drivers/hwmon/sch56xx-common.c
+++ b/drivers/hwmon/sch56xx-common.c
@@ -523,28 +523,6 @@ static int __init sch56xx_device_add(int address, const char *name)
return PTR_ERR_OR_ZERO(sch56xx... |
56e144fe98260a0f8a17326993ceb576ef859ed5 | Analyze and fix the following issue in the Linux kernel code: perf mem_info: Add and use map_symbol__exit and addr_map_symbol__exit | Problem Details:
Fix leak where mem_info__put wouldn't release the maps/map as used by
perf mem. Add exit functions and use elsewhere that the maps and map
are released.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Sandipan Da... | ```diff
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 0ea5a9d368d4..96058f949ec9 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -49,6 +49,7 @@ perf-y += dso.o
perf-y += dsos.o
perf-y += symbol.o
perf-y += symbol_fprintf.o
+perf-y += map_symbol.o
perf-y += color.o
perf-y += col... |
c1149037f65bcf0334886180ebe3d5efcf214912 | Analyze and fix the following issue in the Linux kernel code: perf hist: Add missing puts to hist__account_cycles | Problem Details:
Caught using reference count checking on perf top with
"--call-graph=lbr". After this no memory leaks were detected.
Fixes: 57849998e2cd ("perf report: Add processing for cycle histograms")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Ravi Bangoria <r... | ```diff
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index cde0078e6c90..0aa7e231172a 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -2676,8 +2676,6 @@ void hist__account_cycles(struct branch_stack *bs, struct addr_location *al,
/* If we have branch cycles always annotate them. ... |
75265320d290c5f5891f16967b94883676c46705 | Analyze and fix the following issue in the Linux kernel code: libperf rc_check: Make implicit enabling work for GCC | Problem Details:
Make the implicit REFCOUNT_CHECKING robust to when building with GCC.
Fixes: 9be6ab181b7b ("libperf rc_check: Enable implicitly with sanitizers")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Sandipan Das <sand... | ```diff
diff --git a/tools/lib/perf/include/internal/rc_check.h b/tools/lib/perf/include/internal/rc_check.h
index d5d771ccdc7b..e88a6d8a0b0f 100644
--- a/tools/lib/perf/include/internal/rc_check.h
+++ b/tools/lib/perf/include/internal/rc_check.h
@@ -9,8 +9,12 @@
* Enable reference count checking implicitly with leak... |
ab8ce150781d326c6bfbe1e09f175ffde1186f80 | Analyze and fix the following issue in the Linux kernel code: perf machine: Avoid out of bounds LBR memory read | Problem Details:
Running perf top with address sanitizer and "--call-graph=lbr" fails
due to reading sample 0 when no samples exist. Add a guard to prevent
this.
Fixes: e2b23483eb1d ("perf machine: Factor out lbr_callchain_add_lbr_ip()")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: K Prateek Nayak <kprateek.naya... | ```diff
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index addfae2f63ef..e0e2c4a943e4 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2622,16 +2622,18 @@ static int lbr_callchain_add_lbr_ip(struct thread *thread,
save_lbr_cursor_node(thread, cursor, i);
}
- /* Add... |
7a8f349e9d14da1633e021c2fe87234b21ab181d | Analyze and fix the following issue in the Linux kernel code: perf rwsem: Add debug mode that uses a mutex | Problem Details:
Mutex error check will capture trying to take the lock recursively and
other problems that rwlock won't. At the expense of concurrency, adda
debug mode that uses a mutex in place of a rwsem.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Ravi Bangoria <... | ```diff
diff --git a/tools/perf/util/rwsem.c b/tools/perf/util/rwsem.c
index f3d29d8ddc99..5109167f27f7 100644
--- a/tools/perf/util/rwsem.c
+++ b/tools/perf/util/rwsem.c
@@ -2,32 +2,66 @@
#include "util.h"
#include "rwsem.h"
+#if RWS_ERRORCHECK
+#include "mutex.h"
+#endif
+
int init_rwsem(struct rw_semaphore *sem... |
61d4fb0b349ec1b33119913c3b0bd109de30142c | Analyze and fix the following issue in the Linux kernel code: file, i915: fix file reference for mmap_singleton() | Problem Details:
Today we got a report at [1] for rcu stalls on the i915 testsuite in [2]
due to the conversion of files to SLAB_TYPSSAFE_BY_RCU. Afaict,
get_file_rcu() goes into an infinite loop trying to carefully verify
that i915->gem.mmap_singleton hasn't changed - see the splat below.
So I stared at this code to ... | ```diff
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index 97bf10861cad..72b353737334 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -915,9 +915,7 @@ static struct file *mmap_singleton(struct drm_i915_private *i... |
920057ad521dc8669e534736c2a12c14ec9fb2d7 | Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) Fix incorrect variable reuse in fan_div calculation | Problem Details:
In the regmap conversion in commit 4ef2774511dc ("hwmon: (nct6775)
Convert register access to regmap API") I reused the 'reg' variable
for all three register reads in the fan speed calculation loop in
nct6775_update_device(), but failed to notice that the value from the
first one (data->REG_FAN[i]) is ... | ```diff
diff --git a/drivers/hwmon/nct6775-core.c b/drivers/hwmon/nct6775-core.c
index b5b81bd83bb1..d928eb8ae5a3 100644
--- a/drivers/hwmon/nct6775-core.c
+++ b/drivers/hwmon/nct6775-core.c
@@ -1614,17 +1614,21 @@ struct nct6775_data *nct6775_update_device(struct device *dev)
data->fan_div[i]);
if (dat... |
f199bf5bf84c19a4f488a39d7d694ab10787de35 | Analyze and fix the following issue in the Linux kernel code: irqchip/gic-v3-its: Don't override quirk settings with default values | Problem Details:
When splitting the allocation of the ITS node from its configuration,
some of the default settings were kept in the latter instead of
being moved to the former.
This has the side effect of negating some of the quirk detections that
have happened in between, amongst which the dreaded Synquacer hack
(th... | ```diff
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 75a2dd550625..a8c89df1a997 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5112,8 +5112,6 @@ static int __init its_probe_one(struct its_node *its)
}
its->cmd_base = (void *)page_ad... |
bf0e96108fb6707613dd055aff5e98b02b99bb14 | Analyze and fix the following issue in the Linux kernel code: mptcp: properly account fastopen data | Problem Details:
Currently the socket level counter aggregating the received data
does not take in account the data received via fastopen.
Address the issue updating the counter as required.
Fixes: 38967f424b5b ("mptcp: track some aggregate data counters")
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-... | ```diff
diff --git a/net/mptcp/fastopen.c b/net/mptcp/fastopen.c
index bceaab8dd8e4..74698582a285 100644
--- a/net/mptcp/fastopen.c
+++ b/net/mptcp/fastopen.c
@@ -52,6 +52,7 @@ void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subf
mptcp_set_owner_r(skb, sk);
__skb_queue_tail(&sk->sk_rec... |
bbfff736d30e5283ad09e748caff979d75ddef7f | Analyze and fix the following issue in the Linux kernel code: hwmon: (coretemp) Fix potentially truncated sysfs attribute name | Problem Details:
When build with W=1 and "-Werror=format-truncation", below error is
observed in coretemp driver,
drivers/hwmon/coretemp.c: In function 'create_core_data':
>> drivers/hwmon/coretemp.c:393:34: error: '%s' directive output may be truncated writing likely 5 or more bytes into a region of size between 3... | ```diff
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index eba94f68585a..ba82d1e79c13 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -42,7 +42,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
#define PKG_SYSFS_ATTR_NO 1 /* Sysfs attribute for package temp */
... |
2a5b3370a1d9750eca325292e291c8c7cb8cf2e0 | Analyze and fix the following issue in the Linux kernel code: hwmon: (axi-fan-control) Fix possible NULL pointer dereference | Problem Details:
axi_fan_control_irq_handler(), dependent on the private
axi_fan_control_data structure, might be called before the hwmon
device is registered. That will cause an "Unable to handle kernel
NULL pointer dereference" error.
Fixes: 8412b410fa5e ("hwmon: Support ADI Fan Control IP")
Signed-off-by: Dragos Bo... | ```diff
diff --git a/drivers/hwmon/axi-fan-control.c b/drivers/hwmon/axi-fan-control.c
index 5fd136baf1cd..19b9bf3d75ef 100644
--- a/drivers/hwmon/axi-fan-control.c
+++ b/drivers/hwmon/axi-fan-control.c
@@ -496,6 +496,21 @@ static int axi_fan_control_probe(struct platform_device *pdev)
return -ENODEV;
}
+ ret = ... |
1de0736c3af9dadb688cad23871f9760ff22265f | Analyze and fix the following issue in the Linux kernel code: ext2: Convert ext2_add_link() to use a folio | Problem Details:
Remove five hidden calls to compound_head() and fix a couple of
places that assumed PAGE_SIZE.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20230921200746.3303942-5-willy@infradead.org> | ```diff
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
index 5a8a02d6be9a..31333b23adf3 100644
--- a/fs/ext2/dir.c
+++ b/fs/ext2/dir.c
@@ -497,7 +497,7 @@ int ext2_add_link (struct dentry *dentry, struct inode *inode)
unsigned chunk_size = ext2_chunk_size(dir);
unsigned reclen = EXT2_DIR_REC_LEN(namelen);
unsigned sh... |
bc00d9f3813a40bc2d854ae0edab14c6b43a3219 | Analyze and fix the following issue in the Linux kernel code: regulator: qcom-rpmh: Fix smps4 regulator for pm8550ve | Problem Details:
The type of the smps4 regulator from pm8550ve is actually FTSMPS525
medium voltage. So fix it accordingly.
Fixes: e6e3776d682d ("regulator: qcom-rpmh: Add support for PM8550 regulators")
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20231024134626.2364426-1-abel.vesa@... | ```diff
diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index d990ba19c50e..b2e359ac3169 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -1095,7 +1095,7 @@ static const struct rpmh_vreg_init_data pm8550ve_vreg_data[] = ... |
a6e4a4a14a8eb6376278db0d3441a2ba124cc30c | Analyze and fix the following issue in the Linux kernel code: perf report: Fix hierarchy mode on pipe input | Problem Details:
The hierarchy mode needs to setup output formats for each evsel.
Normally setup_sorting() handles this at the beginning, but it cannot
do that if data comes from a pipe since there's no evsel info before
reading the data. And then perf report cannot process the samples
in hierarchy mode and think as i... | ```diff
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index dcedfe00f04d..ca8f2331795c 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -691,10 +691,25 @@ static int report__browse_hists(struct report *rep)
static int report__collapse_hists(struct report *rep)
{... |
e093a222d7cba1eb6c36887e58ce8a4ff249f1c6 | Analyze and fix the following issue in the Linux kernel code: perf evsel: Rename evsel__increase_rlimit to rlimit__increase_nofile | Problem Details:
evsel__increase_rlimit() helper does nothing with evsel, and description
of the functionality is inaccurate, rename it and move to util/rlimit.c.
By the way, fix a checkppatch warning about misplaced license tag:
WARNING: Misplaced SPDX-License-Identifier tag - use line 1 instead
#160: FILE: tool... | ```diff
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index 098f9e3bb2e7..c29d8a382b19 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -17,7 +17,7 @@
#include "util.h" // rm_rf_perf_data()
#include "debug.h"
#include "header.h"
-#include "evsel.h"
+#include "rlimit.h"
#include <in... |
680ee411a98e875f0f3baba735205ced61693e67 | Analyze and fix the following issue in the Linux kernel code: HID: logitech-hidpp: Fix connect event race | Problem Details:
There is a connect event race in hidpp_probe() in these 2 lines:
connected = hidpp_root_get_protocol_version(hidpp) == 0;
atomic_set(&hidpp->connected, connected);
Specifically the following can happen:
1. This line from hidpp_probe() is executed:
connected = hidpp_root_get_protocol_version(hidpp... | ```diff
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index e945e4e8180f..4793a3236f17 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -194,7 +194,6 @@ struct hidpp_device {
struct work_struct work;
struct kfifo delayed_work_fifo;
- atomic... |
ba9de350509504fb748837b71e23d7e84c83d93c | Analyze and fix the following issue in the Linux kernel code: HID: logitech-hidpp: Move get_wireless_feature_index() check to hidpp_connect_event() | Problem Details:
Calling get_wireless_feature_index() from probe() causes
the wireless_feature_index to only get set for unifying devices which
are already connected at probe() time. It does not get set for devices
which connect later.
Fix this by moving get_wireless_feature_index() to hidpp_connect_event(),
this does... | ```diff
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index c582d19b11d6..7bf12ca0eb4a 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -1835,15 +1835,14 @@ static int hidpp_battery_get_property(struct power_supply *psy,
/* ---------------------... |
55bf70362ffc4ddd7c8745e2fe880edac00e4aff | Analyze and fix the following issue in the Linux kernel code: HID: logitech-hidpp: Revert "Don't restart communication if not necessary" | Problem Details:
Commit 91cf9a98ae41 ("HID: logitech-hidpp: make .probe usbhid capable")
makes hidpp_probe() first call hid_hw_start(hdev, 0) to allow IO
without connecting any hid subdrivers (hid-input, hidraw).
This is done to allow to retrieve the device's name and serial number
and store these in hdev->name and hd... | ```diff
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index aa4f232c4518..c582d19b11d6 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -4394,7 +4394,6 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
bool conn... |
11ca0322a41920df2b462d2e45b0731e47ff475b | Analyze and fix the following issue in the Linux kernel code: HID: logitech-hidpp: Don't restart IO, instead defer hid_connect() only | Problem Details:
Restarting IO causes 2 problems:
1. Some devices do not like IO being restarted this was addressed in
commit 498ba2069035 ("HID: logitech-hidpp: Don't restart communication
if not necessary"), but that change has issues of its own and needs to
be reverted.
2. Restarting IO and specifically c... | ```diff
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index a209d51bd247..aa4f232c4518 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -4460,8 +4460,10 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
hdev-... |
2f2bd7cbd1d1548137b351040dc4e037d18cdfdc | Analyze and fix the following issue in the Linux kernel code: hid: lenovo: Resend all settings on reset_resume for compact keyboards | Problem Details:
The USB Compact Keyboard variant requires a reset_resume function to
restore keyboard configuration after a suspend in some situations. Move
configuration normally done on probe to lenovo_features_set_cptkbd(), then
recycle this for use on reset_resume.
Without, the keyboard and driver would end up in... | ```diff
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 9c1181313e44..7c1b33be9d13 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -526,6 +526,19 @@ static void lenovo_features_set_cptkbd(struct hid_device *hdev)
int ret;
struct lenovo_drvdata *cptkbd_data = hid_get_dr... |
6feb1a9641197ee630bf43b5c34ea1d9f8b4a0aa | Analyze and fix the following issue in the Linux kernel code: cpupower: fix reference to nonexistent document | Problem Details:
This file was renamed from .txt to .rst and left a dangling reference.
Fix it.
Fixes: 151f4e2bdc7a ("docs: power: convert docs to ReST and rename to *.rst")
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Srivatsa S... | ```diff
diff --git a/tools/power/cpupower/man/cpupower-powercap-info.1 b/tools/power/cpupower/man/cpupower-powercap-info.1
index df3087000efb..145d6f06fa72 100644
--- a/tools/power/cpupower/man/cpupower-powercap-info.1
+++ b/tools/power/cpupower/man/cpupower-powercap-info.1
@@ -17,7 +17,7 @@ settings of all cores, see ... |
a0b0bad10587ae2948a7c36ca4ffc206007fbcf3 | Analyze and fix the following issue in the Linux kernel code: genirq/matrix: Exclude managed interrupts in irq_matrix_allocated() | Problem Details:
When a CPU is about to be offlined, x86 validates that all active
interrupts which are targeted to this CPU can be migrated to the remaining
online CPUs. If not, the offline operation is aborted.
The validation uses irq_matrix_allocated() to retrieve the number of
vectors which are allocated on the ou... | ```diff
diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c
index 1698e77645ac..75d0ae490e29 100644
--- a/kernel/irq/matrix.c
+++ b/kernel/irq/matrix.c
@@ -466,16 +466,16 @@ unsigned int irq_matrix_reserved(struct irq_matrix *m)
}
/**
- * irq_matrix_allocated - Get the number of allocated irqs on the local cpu
+... |
553f7ac78fbb41b2c93ab9b9d78e42274d27daa9 | Analyze and fix the following issue in the Linux kernel code: sh: bios: Revive earlyprintk support | Problem Details:
The SuperH BIOS earlyprintk code is protected by CONFIG_EARLY_PRINTK.
However, when this protection was added, it was missed that SuperH no
longer defines an EARLY_PRINTK config symbol since commit
e76fe57447e88916 ("sh: Remove old early serial console code V2"), so
BIOS earlyprintk can no longer be us... | ```diff
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index c449e7c1b20f..8bcd6c1431a9 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -22,6 +22,17 @@ config STACK_DEBUG
every function call and will therefore incur a major
performance hit. Most users should say N.
+config EARLY_... |
d5090484b021794271280ab64d20253883b7f6fd | Analyze and fix the following issue in the Linux kernel code: swiotlb: do not try to allocate a TLB bigger than MAX_ORDER pages | Problem Details:
When allocating a new pool at runtime, reduce the number of slabs so
that the allocation order is at most MAX_ORDER. This avoids a kernel
warning in __alloc_pages().
The warning is relatively benign, because the pool size is subsequently
reduced when allocation fails, but it is silly to start with a ... | ```diff
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 01637677736f..dff067bd56b1 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -678,6 +678,11 @@ static struct io_tlb_pool *swiotlb_alloc_pool(struct device *dev,
size_t pool_size;
size_t tlb_size;
+ if (nslabs > SLABS_PER_PAGE << ... |
d45f72b3c275101a620dd69881343e0dda72f877 | Analyze and fix the following issue in the Linux kernel code: HID: uclogic: Fix a work->entry not empty bug in __queue_work() | Problem Details:
When CONFIG_HID_UCLOGIC=y and CONFIG_KUNIT_ALL_TESTS=y, launch
kernel and then the below work->entry not empty bug occurs.
In hid_test_uclogic_exec_event_hook_test(), the filter->work is not
initialized to be added to p.event_hooks->list, and then the
schedule_work() in uclogic_exec_event_hook() will ... | ```diff
diff --git a/drivers/hid/hid-uclogic-core-test.c b/drivers/hid/hid-uclogic-core-test.c
index 2bb916226a38..cb274cde3ad2 100644
--- a/drivers/hid/hid-uclogic-core-test.c
+++ b/drivers/hid/hid-uclogic-core-test.c
@@ -56,6 +56,11 @@ static struct uclogic_raw_event_hook_test test_events[] = {
},
};
+static voi... |
91cfe0bbaa1c434d4271eb6e1d7aaa1fe8d121f6 | Analyze and fix the following issue in the Linux kernel code: HID: uclogic: Fix user-memory-access bug in uclogic_params_ugee_v2_init_event_hooks() | Problem Details:
When CONFIG_HID_UCLOGIC=y and CONFIG_KUNIT_ALL_TESTS=y, launch kernel and
then the below user-memory-access bug occurs.
In hid_test_uclogic_params_cleanup_event_hooks(),it call
uclogic_params_ugee_v2_init_event_hooks() with the first arg=NULL, so
when it calls uclogic_params_ugee_v2_has_battery(), the... | ```diff
diff --git a/drivers/hid/hid-uclogic-params-test.c b/drivers/hid/hid-uclogic-params-test.c
index 678f50cbb160..a30121419a29 100644
--- a/drivers/hid/hid-uclogic-params-test.c
+++ b/drivers/hid/hid-uclogic-params-test.c
@@ -174,12 +174,26 @@ static void hid_test_uclogic_parse_ugee_v2_desc(struct kunit *test)
K... |
838b35bb6a89c36da07ca39520ec071d9250334d | Analyze and fix the following issue in the Linux kernel code: io_uring/rw: disable IOCB_DIO_CALLER_COMP | Problem Details:
If an application does O_DIRECT writes with io_uring and the file system
supports IOCB_DIO_CALLER_COMP, then completions of the dio write side is
done from the task_work that will post the completion event for said
write as well.
Whenever a dio write is done against a file, the inode i_dio_count is
el... | ```diff
diff --git a/io_uring/rw.c b/io_uring/rw.c
index c8c822fa7980..807d83ab756e 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -913,15 +913,6 @@ int io_write(struct io_kiocb *req, unsigned int issue_flags)
kiocb_start_write(kiocb);
kiocb->ki_flags |= IOCB_WRITE;
- /*
- * For non-polled IO, set IOCB_DIO_C... |
64ffd2f1d00c6235dabe9704bbb0d9ce3e28147f | Analyze and fix the following issue in the Linux kernel code: drm/amd: Disable ASPM for VI w/ all Intel systems | Problem Details:
Originally we were quirking ASPM disabled specifically for VI when
used with Alder Lake, but it appears to have problems with Rocket
Lake as well.
Like we've done in the case of dpm for newer platforms, disable
ASPM for all Intel systems.
Cc: stable@vger.kernel.org # 5.15+
Fixes: 0064b0ce85bb ("drm/a... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 6a8494f98d3e..fe8ba9e9837b 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -1124,7 +1124,7 @@ static void vi_program_aspm(struct amdgpu_device *adev)
bool bL1SS = false;
bool bClkReqSup... |
7644b1a1c9a7ae8ab99175989bfc8676055edb46 | Analyze and fix the following issue in the Linux kernel code: io_uring/fdinfo: lock SQ thread while retrieving thread cpu/pid | Problem Details:
We could race with SQ thread exit, and if we do, we'll hit a NULL pointer
dereference when the thread is cleared. Grab the SQPOLL data lock before
attempting to get the task cpu and pid for fdinfo, this ensures we have a
stable view of it.
Cc: stable@vger.kernel.org
Link: https://bugzilla.kernel.org/s... | ```diff
diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index c53678875416..f04a43044d91 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -53,7 +53,6 @@ static __cold int io_uring_show_cred(struct seq_file *m, unsigned int id,
__cold void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
{
struct... |
dc3115e6c5d9863ec1a9ff1acf004ede93c34361 | Analyze and fix the following issue in the Linux kernel code: hid: cp2112: Fix IRQ shutdown stopping polling for all IRQs on chip | Problem Details:
Previously cp2112_gpio_irq_shutdown() always cancelled the
gpio_poll_worker, even if other IRQs were still active, and did not set
the gpio_poll flag to false. This resulted in any call to _shutdown()
resulting in interrupts no longer functioning on the chip until a
_remove() occurred (a.e. the cp2112 ... | ```diff
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
index 36f76c6dfa20..20a0d1315d90 100644
--- a/drivers/hid/hid-cp2112.c
+++ b/drivers/hid/hid-cp2112.c
@@ -1166,7 +1166,11 @@ static void cp2112_gpio_irq_shutdown(struct irq_data *d)
struct cp2112_device *dev = gpiochip_get_data(gc);
cp2112_g... |
e78002aa9a5a9eaf18bc29ccaef7f405616fd68e | Analyze and fix the following issue in the Linux kernel code: s390/cio: fix virtual vs physical address confusion | Problem Details:
Fix virtual vs physical address confusion (which currently are the
same).
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> | ```diff
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 0abd77f4b664..cc6dc5076ffc 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -881,8 +881,8 @@ int __chsc_do_secm(struct channel_subsystem *css, int enable)
secm_area->request.code = 0x0016;
secm_area->key = PAGE_DEFAU... |
f139a7a2f88190ef28162d3e485324bab8a4e12e | Analyze and fix the following issue in the Linux kernel code: s390: delete the unused store_prefix() function | Problem Details:
Its last usage was deleted in commit 4df29d2b9024 ("s390/smp: rework
absolute lowcore access").
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> | ```diff
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h
index 3366431dcad5..5dc1b6345006 100644
--- a/arch/s390/include/asm/lowcore.h
+++ b/arch/s390/include/asm/lowcore.h
@@ -222,12 +222,4 @@ static inline void set_prefix(__u32 address)
asm volatile("spx %0" : : "Q" (address) : "memory... |
84bb41d5df48868055d159d9247b80927f1f70f9 | Analyze and fix the following issue in the Linux kernel code: s390/cmma: fix handling of swapper_pg_dir and invalid_pg_dir | Problem Details:
If the cmma no-dat feature is available the kernel page tables are walked
to identify and mark all pages which are used for address translation (all
region, segment, and page tables). In a subsequent loop all other pages are
marked as "no-dat" pages with the ESSA instruction.
This information is visib... | ```diff
diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c
index 20c0b160efee..a31acb2c4ef2 100644
--- a/arch/s390/mm/page-states.c
+++ b/arch/s390/mm/page-states.c
@@ -188,6 +188,12 @@ void __init cmma_init_nodat(void)
return;
/* Mark pages used in kernel page tables */
mark_kernel_pgd();
+ pa... |
44d93045247661acbd50b1629e62f415f2747577 | Analyze and fix the following issue in the Linux kernel code: s390/cmma: fix detection of DAT pages | Problem Details:
If the cmma no-dat feature is available the kernel page tables are walked
to identify and mark all pages which are used for address translation (all
region, segment, and page tables). In a subsequent loop all other pages are
marked as "no-dat" pages with the ESSA instruction.
This information is visib... | ```diff
diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c
index c3db3c0e75c0..20c0b160efee 100644
--- a/arch/s390/mm/page-states.c
+++ b/arch/s390/mm/page-states.c
@@ -121,7 +121,7 @@ static void mark_kernel_pud(p4d_t *p4d, unsigned long addr, unsigned long end)
continue;
if (!pud_folded(*pud)... |
1954da4a2b621a3328a63382cae7e5f5e2af502c | Analyze and fix the following issue in the Linux kernel code: s390/mm: add missing arch_set_page_dat() call to gmap allocations | Problem Details:
If the cmma no-dat feature is available all pages that are not used for
dynamic address translation are marked as "no-dat" with the ESSA
instruction. This information is visible to the hypervisor, so that the
hypervisor can optimize purging of guest TLB entries. This also means that
pages which are use... | ```diff
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index 906a7bfc2a78..20786f6883b2 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -21,10 +21,22 @@
#include <asm/pgalloc.h>
#include <asm/gmap.h>
+#include <asm/page.h>
#include <asm/tlb.h>
#define GMAP_SHADOW_FAKE_TABLE 1ULL
+static ... |
4cbed7702eb775cca22fff6827a549092cb59f61 | Analyze and fix the following issue in the Linux kernel code: drm/i915/pmu: Check if pmu is closed before stopping event | Problem Details:
When the driver unbinds, pmu is unregistered and i915->uabi_engines is
set to RB_ROOT. Due to this, when i915 PMU tries to stop the engine
events, it issues a warn_on because engine lookup fails.
All perf hooks are taking care of this using a pmu->closed flag that is
set when PMU unregisters. The stop... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index d35973b41186..7b1076b5e748 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -832,9 +832,18 @@ static void i915_pmu_event_start(struct perf_event *event, int flags)
static void i915_pmu_ev... |
78cc55e0b64c820673a796635daf82c7eadfe152 | Analyze and fix the following issue in the Linux kernel code: drm/i915/mcr: Hold GT forcewake during steering operations | Problem Details:
The steering control and semaphore registers are inside an "always on"
power domain with respect to RC6. However there are some issues if
higher-level platform sleep states are entering/exiting at the same time
these registers are accessed. Grabbing GT forcewake and holding it over
the entire lock/st... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
index 0b414eae1683..2c0f1f3e28ff 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
@@ -376,9 +376,26 @@ void intel_gt_mcr_lock(struct intel_gt *gt, unsigned long *flags)
... |
31f6a06f0c543b43a38fab10f39e5fc45ad62aa2 | Analyze and fix the following issue in the Linux kernel code: drm/i915/pmu: Check if pmu is closed before stopping event | Problem Details:
When the driver unbinds, pmu is unregistered and i915->uabi_engines is
set to RB_ROOT. Due to this, when i915 PMU tries to stop the engine
events, it issues a warn_on because engine lookup fails.
All perf hooks are taking care of this using a pmu->closed flag that is
set when PMU unregisters. The stop... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 108b675088ba..f861863eb7c1 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -831,9 +831,18 @@ static void i915_pmu_event_start(struct perf_event *event, int flags)
static void i915_pmu_ev... |
c1d7fd5f67253e9aac71cb6d7da222dfe43fd9aa | Analyze and fix the following issue in the Linux kernel code: staging: vc04_services: Drop VCHIQ_LOG_PREFIX macro | Problem Details:
The macro is not used anymore, so drop it.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20231024114428.443528-8-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index 7a36648d6dad..076c6d9ad56a 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_... |
9748de55a37ee331f33e9c77b9e24025c99156f6 | Analyze and fix the following issue in the Linux kernel code: staging: vc04: Convert vchiq_log_trace() to use dynamic debug | Problem Details:
Move vchiq_log_trace() custom logging wrapper based on printk
to use dynamic debug. The log category is dictated by enum
vchiq_log_category which will become the part of the trace
string format that will be logged to dynamic debug (for grep).
All the vchiq_log_trace() calls are adjusted to use the
mod... | ```diff
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 7a51c2f62586..a28b89908c92 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm... |
f67af5940d6d2e9a9fbc5893cf1e16bae166d9ff | Analyze and fix the following issue in the Linux kernel code: staging: vc04: Convert(and rename) vchiq_log_info() to use dynamic debug | Problem Details:
Convert(and rename) vchiq_log_info() custom logging wrapping based on
printk to use dynamic debug. The wrapper is now renamed to
vchiq_log_debug() since most of the usage is around printing debug
information. The log category is dictated by enum vchiq_log_category
which will become the part of the debu... | ```diff
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 8e8c6ebfa0c8..7a51c2f62586 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm... |
0b12086306d0563c897a2abc103a044f82088468 | Analyze and fix the following issue in the Linux kernel code: staging: vc04: Convert vchiq_log_warning() to use dynamic debug | Problem Details:
Move vchiq_log_warning() custom logging wrapper based on printk to use
dynamic debug. The log category is dictated by vchiq_log_category
which will become the part of the warning string format that will be
logged to dynamic debug (for grep).
All the vchiq_log_warning() calls are adjusted to use the
mo... | ```diff
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 2c760cf734f1..8e8c6ebfa0c8 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm... |
1d8915cf889932e085880f4bdbf7ae0f3d8605e5 | Analyze and fix the following issue in the Linux kernel code: staging: vc04: Convert vchiq_log_error() to use dynamic debug | Problem Details:
Move vchiq_log_error() custom logging wrapper based on printk,
to use dynamic debug. To categorise, enum vchiq_log_category
has been introduced, which will become the part of the error
string format that will be logged to dynamic debug (for grep).
All the vchiq_log_error() calls are adjusted to use th... | ```diff
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 8d15ac4e1700..2c760cf734f1 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm... |
33bdf010685806033821045acd17fce9ea5055f2 | Analyze and fix the following issue in the Linux kernel code: staging: vc04_services: Pass struct device to vchiq_init_slots() | Problem Details:
Pass struct device pointer to vchiq_init_slots(). In subsequent
commits, vchiq_log_* macros will be ported to use dynamic debug
(dev_dbg()), hence they need access to a struct device pointer.
No functional changes intended in this commit.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: ... | ```diff
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index eef9c8c06e66..8d15ac4e1700 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm... |
17dd991a81001af0f732053b80993cf8c3718fd0 | Analyze and fix the following issue in the Linux kernel code: staging: vc04_services: Pass struct device to vchiq_log_dump_mem() | Problem Details:
Pass struct device pointer to vchiq_log_dump_mem(). In subsequent
commits, vchiq_log_* macros will be ported to use dynamic debug
(dev_dbg()), hence they need access to a struct device pointer.
No functional changes intended in this commit.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link... | ```diff
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 596894338cb4..a12afac95dcd 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_... |
e26511f672432417cc1286e00bc65ab82012f5af | Analyze and fix the following issue in the Linux kernel code: staging: vme_user: prefer strscpy over strcpy | Problem Details:
Using strcpy has potential for buffer overflows. It should be replaced
with strscpy where possible. In this case the return value of strcpy is
not used, so we can safely replace it with strscpy.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20231023090001.727... | ```diff
diff --git a/drivers/staging/vme_user/vme_tsi148.c b/drivers/staging/vme_user/vme_tsi148.c
index d549c22da534..2ec9c2904404 100644
--- a/drivers/staging/vme_user/vme_tsi148.c
+++ b/drivers/staging/vme_user/vme_tsi148.c
@@ -2310,7 +2310,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.