id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
c04efbfd76d23157e64e6d6147518c187ab4233a | Analyze and fix the following issue in the Linux kernel code: ASoC: hdaudio.c: Add missing check for devm_kstrdup | Problem Details:
Because of the potential failure of the devm_kstrdup(), the
dl[i].codecs->name could be NULL.
Therefore, we need to check it and return -ENOMEM in order to transfer
the error.
Fixes: 97030a43371e ("ASoC: Intel: avs: Add HDAudio machine board")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: A... | ```diff
diff --git a/sound/soc/intel/avs/boards/hdaudio.c b/sound/soc/intel/avs/boards/hdaudio.c
index cb00bc86ac94..8876558f19a1 100644
--- a/sound/soc/intel/avs/boards/hdaudio.c
+++ b/sound/soc/intel/avs/boards/hdaudio.c
@@ -55,6 +55,9 @@ static int avs_create_dai_links(struct device *dev, struct hda_codec *codec, in... |
26dfc43461102957e33454e766d592df330ef7a0 | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: ipc4-pcm: fixup dailink based on copier format | Problem Details:
When a copier exposes a single format, we can fixup the BE dailink with
that format. This is helpful when some codec have format restrictions and
e.g. don't support a 32-bit format. In that case, the copier output
formats mirror that restriction in the topology file.
An alternate solution was suggeste... | ```diff
diff --git a/sound/soc/sof/ipc4-pcm.c b/sound/soc/sof/ipc4-pcm.c
index db19cd03ecad..775c864313fa 100644
--- a/sound/soc/sof/ipc4-pcm.c
+++ b/sound/soc/sof/ipc4-pcm.c
@@ -517,11 +517,14 @@ static int sof_ipc4_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
{
struct snd_soc_component *component = snd_soc_... |
6d08ad2166f7770341ea56afad45fa41cd16ae62 | Analyze and fix the following issue in the Linux kernel code: sched/topology: Fix sched_numa_find_nth_cpu() comment | Problem Details:
Reword sched_numa_find_nth_cpu() comment and make it kernel-doc compatible.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Link: https://lore.kernel.org/r/20230819141239.287290-7-yury.norov@gmail.com | ```diff
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index a60ecf45360c..a7b50bba7829 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -2112,13 +2112,15 @@ static int hop_cmp(const void *a, const void *b)
return -1;
}
-/*
- * sched_numa_find_nth_cpu() - given the NUMA topolog... |
8ab63d418d4339d996f80d02a00dbce0aa3ff972 | Analyze and fix the following issue in the Linux kernel code: sched/topology: Fix sched_numa_find_nth_cpu() in non-NUMA case | Problem Details:
When CONFIG_NUMA is enabled, sched_numa_find_nth_cpu() searches for a
CPU in sched_domains_numa_masks. The masks includes only online CPUs,
so effectively offline CPUs are skipped.
When CONFIG_NUMA is disabled, the fallback function should be consistent.
Fixes: cd7f55359c90 ("sched: add sched_numa_fi... | ```diff
diff --git a/include/linux/topology.h b/include/linux/topology.h
index fea32377f7c7..52f5850730b3 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -251,7 +251,7 @@ extern const struct cpumask *sched_numa_hop_mask(unsigned int node, unsigned int
#else
static __always_inline int sched_num... |
617f2c38cb5ce60226042081c09e2ee3a90d03f8 | Analyze and fix the following issue in the Linux kernel code: sched/topology: Fix sched_numa_find_nth_cpu() in CPU-less case | Problem Details:
When the node provided by user is CPU-less, corresponding record in
sched_domains_numa_masks is not set. Trying to dereference it in the
following code leads to kernel crash.
To avoid it, start searching from the nearest node with CPUs.
Fixes: cd7f55359c90 ("sched: add sched_numa_find_nth_cpu()")
Rep... | ```diff
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 05a5bc678c08..423d08947962 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -2122,12 +2122,16 @@ static int hop_cmp(const void *a, const void *b)
*/
int sched_numa_find_nth_cpu(const struct cpumask *cpus, int cpu, int n... |
d1db9fb432d50b0eecdfdd85d17cc15a59cc093b | Analyze and fix the following issue in the Linux kernel code: sched/fair: Fix open-coded numa_nearest_node() | Problem Details:
task_numa_placement() searches for a nearest node to migrate by calling
for_each_node_state(). Now that we have numa_nearest_node(), switch to
using it.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Link: https://lore.ke... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8dbff6e7ad4f..41cfd61b4d6b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2847,19 +2847,7 @@ static void task_numa_placement(struct task_struct *p)
}
/* Cannot migrate task to CPU-less node */
- if (max_nid != NUMA_NO_NODE && !no... |
21b6c2812f3d9cbcfce9eca76632e2cc8fef214f | Analyze and fix the following issue in the Linux kernel code: drm/sysfs: Register "ddc" symlink later | Problem Details:
Currently drm_sysfs_connector_add() attempts to register
the "ddc" symlink (based one connector->ddc) before the
driver's .early_register() hook has been called. That is
too early for i915 which only fully registers the aux ch
and associated i2c bus from said hook (to prevent half
initialized stuff get... | ```diff
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 20e94b4ce60e..f239de0085c3 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -631,6 +631,10 @@ int drm_connector_register(struct drm_connector *connector)
goto err_debugfs;
}
+ ret = ... |
322e0c500073ac4b2f74d8c850c0aeee81be8df3 | Analyze and fix the following issue in the Linux kernel code: ALSA: riptide: Fix -Wformat-truncation warning for longname string | Problem Details:
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915091313.5988-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index b37c877c2c16..9dee0345f22c 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -2105,15 +2105,15 @@ __snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
strcpy(card->driver, "RIPT... |
ba8bb7dce1b2d2e3d582733f015778e3c31d042b | Analyze and fix the following issue in the Linux kernel code: ALSA: cs4231: Fix -Wformat-truncation warning for longname string | Problem Details:
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915091313.5988-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
index 1e8923385366..c87be4be6df1 100644
--- a/sound/isa/cs423x/cs4231.c
+++ b/sound/isa/cs423x/cs4231.c
@@ -98,13 +98,13 @@ static int snd_cs4231_probe(struct device *dev, unsigned int n)
strscpy(card->shortname, chip->pcm->name, sizeof(card->... |
60a9c7f7fb98163150964236e07bc57e731ad4f2 | Analyze and fix the following issue in the Linux kernel code: ALSA: ad1848: Fix -Wformat-truncation warning for longname string | Problem Details:
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915091313.5988-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index c471ac2aa450..401d8df28d87 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -96,13 +96,13 @@ static int snd_ad1848_probe(struct device *dev, unsigned int n)
strscpy(card->shortname, chip->pcm->name, sizeof(card->... |
5f6af0050a7a6f8d7972267ddd3a75970e13931e | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: generic: Check potential mixer name string truncation | Problem Details:
add_control_with_pfx() constructs a mixer name element with the fixed
size, and it got compile warnings with -Wformat-truncation.
Although the size overflow is very unlikely, let's have a sanity check
of the string size and returns the error if it really doesn't fit
instead of silent truncation.
Link... | ```diff
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index dbf7aa88e0e3..bf685d01259d 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -998,7 +998,11 @@ static int add_control_with_pfx(struct hda_gen_spec *spec, int type,
const char *sfx, int cidx, unsigned lo... |
28329936d1e2ff4b962daca1c943f0150890d51e | Analyze and fix the following issue in the Linux kernel code: ALSA: cmipci: Fix -Wformat-truncation warning | Problem Details:
CMIPCI driver got compile warnings with -Wformat-truncation at a
couple of plain sprintf() usages. Use scnprintf() for filling the
longname string for avoiding the warnings.
Link: https://lore.kernel.org/r/20230915082802.28684-13-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index 1415baac9c36..08e34b184780 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -3102,11 +3102,13 @@ static int snd_cmipci_create(struct snd_card *card, struct pci_dev *pci,
}
sprintf(card->shortname, "C-Media CMI%d", val);
if (cm->chip_ver... |
ea77850e98410987525eb392c229949c87779835 | Analyze and fix the following issue in the Linux kernel code: ALSA: firewire: Fix -Wformat-truncation warning for MIDI stream names | Problem Details:
The compile warnings at filling MIDI stream name strings are all
false-positive; the number of streams can't go so high.
For suppressing the warning, replace snprintf() with scnprintf().
As stated in the above, truncation doesn't matter.
Link: https://lore.kernel.org/r/20230915082802.28684-12-tiwai@s... | ```diff
diff --git a/sound/firewire/bebob/bebob_midi.c b/sound/firewire/bebob/bebob_midi.c
index 6f597d03e7c1..b1425bf98c3b 100644
--- a/sound/firewire/bebob/bebob_midi.c
+++ b/sound/firewire/bebob/bebob_midi.c
@@ -84,9 +84,9 @@ static void set_midi_substream_names(struct snd_bebob *bebob,
struct snd_rawmidi_substrea... |
641e969114c781ff269e1bf1b1f8d3cc33bc4a1a | Analyze and fix the following issue in the Linux kernel code: ALSA: firewire: Fix -Wformat-truncation warning for longname string | Problem Details:
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915082802.28684-11-tiwai@suse.de
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tes... | ```diff
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c
index dd4298876ac0..e3ed4e094ccd 100644
--- a/sound/firewire/fireworks/fireworks.c
+++ b/sound/firewire/fireworks/fireworks.c
@@ -93,11 +93,11 @@ get_hardware_info(struct snd_efw *efw)
strcpy(efw->card->driver, "Fireworks... |
7272b8bfba35b2333b33d77f73ce75ee161880c2 | Analyze and fix the following issue in the Linux kernel code: ALSA: xen: Fix -Wformat-truncation warning | Problem Details:
The compile warning with -Wformat-truncation at
xen_snd_front_cfg_card() is false-positive; the loop can be only for
SNDRV_PCM_DEVICES which is at most 32.
For suppressing the warning, replace snprintf() with scnprintf().
As stated in the above, truncation doesn't matter.
Link: https://lore.kernel.or... | ```diff
diff --git a/sound/xen/xen_snd_front_cfg.c b/sound/xen/xen_snd_front_cfg.c
index 63b0398c3276..55ecf766ca67 100644
--- a/sound/xen/xen_snd_front_cfg.c
+++ b/sound/xen/xen_snd_front_cfg.c
@@ -483,7 +483,7 @@ int xen_snd_front_cfg_card(struct xen_snd_front_info *front_info,
*stream_cnt = 0;
num_devices = 0;
... |
bc44e10abb90ac65a7b5337cb3323ec1ce79fb9a | Analyze and fix the following issue in the Linux kernel code: ALSA: opti9x: Fix -Wformat-truncation warning | Problem Details:
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915082802.28684-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 59242baed576..59792f2fada1 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -1344,10 +1344,10 @@ static int snd_miro_probe(struct snd_card *card)
}
strcpy(card->driver, "miro");
- snprintf(card->longname, sizeof(... |
1e97acf3a6609c1329e23c2bf1e703c012bec848 | Analyze and fix the following issue in the Linux kernel code: ALSA: es1688: Fix -Wformat-truncation warning | Problem Details:
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915082802.28684-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index f935b56eeec7..97728bf45474 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -130,9 +130,9 @@ static int snd_es1688_probe(struct snd_card *card, unsigned int n)
strscpy(card->driver, "ES1688", sizeof(card->drive... |
399245d3046d7182a9ae97cb0671fc9ed8a579a6 | Analyze and fix the following issue in the Linux kernel code: ALSA: cs4236: Fix -Wformat-truncation warning | Problem Details:
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915082802.28684-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index 10112e1bb25d..7226cbf2d7de 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -367,14 +367,14 @@ static int snd_cs423x_probe(struct snd_card *card, int dev)
strscpy(card->driver, chip->pcm->name, sizeof(card->drive... |
2a471452599a2e94fcc53ee2b7eac87fccd4ba04 | Analyze and fix the following issue in the Linux kernel code: ALSA: sscape: Fix -Wformat-truncation warning | Problem Details:
The warning with -Wformat-truncation at sscape_upload_microcode() is
false-positive; the version number can be only a single digit, hence
fitting with the given string size.
For suppressing the warning, replace snprintf() with scnprintf().
As stated in the above, truncation doesn't matter.
Link: http... | ```diff
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 0bc0025f7c19..cc56fafd27b1 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -557,7 +557,7 @@ static int sscape_upload_microcode(struct snd_card *card, int version)
char name[14];
int err;
- snprintf(name, sizeof(name), "sndscape.co%d", ... |
e9dde5a98288d05313bea24466f76484b8d324bb | Analyze and fix the following issue in the Linux kernel code: ALSA: caiaq: Fix -Wformat-truncation warning | Problem Details:
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915082802.28684-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
index 49f63f878e6f..b5cbf1f195c4 100644
--- a/sound/usb/caiaq/device.c
+++ b/sound/usb/caiaq/device.c
@@ -485,7 +485,7 @@ static int init_card(struct snd_usb_caiaqdev *cdev)
}
usb_make_path(usb_dev, usbpath, sizeof(usbpath));
- snprintf(card... |
78bd8f5126f854872cc109cbac21c675d8539f3f | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: scarlett_gen2: Fix -Wformat-truncation warning | Problem Details:
The recent enablement of -Wformat-truncation leads to a false-positive
warning for mixer_scarlett_gen2.c.
For suppressing the warning, replace snprintf() with scnprintf().
As stated in the above, truncation doesn't matter.
Link: https://lore.kernel.org/r/20230915082802.28684-4-tiwai@suse.de
Signed-of... | ```diff
diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c
index 9d11bb08667e..5c6f50f38840 100644
--- a/sound/usb/mixer_scarlett_gen2.c
+++ b/sound/usb/mixer_scarlett_gen2.c
@@ -3218,8 +3218,8 @@ static int scarlett2_add_line_in_ctls(struct usb_mixer_interface *mixer)
int from = i * inf... |
9830c3851fd6f7ca977691632b786ba11a44be77 | Analyze and fix the following issue in the Linux kernel code: ALSA: seq: midi: Fix -Wformat-truncation warning | Problem Details:
The compile warnings with -Wformat-truncation appearing at
snd_seq_midisynth_probe() in seq_midi.c are false-positive; those must
fit within the given string size.
For suppressing the warning, replace snprintf() with scnprintf().
As stated in the above, truncation doesn't matter.
Link: https://lore.k... | ```diff
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index 44302d98950e..18320a248aa7 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -349,9 +349,9 @@ snd_seq_midisynth_probe(struct device *_dev)
if (! port->name[0]) {
if (info->name[0]) {
if (ports > 1)
- ... |
0d42260867f9ff3e3a5bcfa8750fa06a658e0b1c | Analyze and fix the following issue in the Linux kernel code: ALSA: seq: ump: Fix -Wformat-truncation warning | Problem Details:
The filling of a port name string got a warning with W=1 due to the
potentially too long group name. Add the string precision to limit
the size.
Fixes: 81fd444aa371 ("ALSA: seq: Bind UMP device")
Link: https://lore.kernel.org/r/20230915082802.28684-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@s... | ```diff
diff --git a/sound/core/seq/seq_ump_client.c b/sound/core/seq/seq_ump_client.c
index a60e3f069a80..2db371d79930 100644
--- a/sound/core/seq/seq_ump_client.c
+++ b/sound/core/seq/seq_ump_client.c
@@ -207,7 +207,7 @@ static void fill_port_info(struct snd_seq_port_info *port,
SNDRV_SEQ_PORT_TYPE_PORT;
port->m... |
81995ee1620318b4c7bbeb02bcc372da2c078c76 | Analyze and fix the following issue in the Linux kernel code: drm: bridge: it66121: ->get_edid callback must not return err pointers | Problem Details:
The drm stack does not expect error valued pointers for EDID anywhere.
Fixes: e66856508746 ("drm: bridge: it66121: Set DDC preamble only once before reading EDID")
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Phong LE <ple@baylibre.com>
Cc: Neil Armstrong <neil... | ```diff
diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index 3c9b42c9d2ee..1cf3fb1f13dc 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -884,14 +884,14 @@ static struct edid *it66121_bridge_get_edid(struct drm_bridge *bridge,
mu... |
464bd8ec2f06707f3773676a1bd2c64832a3c805 | Analyze and fix the following issue in the Linux kernel code: hwrng: geode - fix accessing registers | Problem Details:
When the membase and pci_dev pointer were moved to a new struct in priv,
the actual membase users were left untouched, and they started reading
out arbitrary memory behind the struct instead of registers. This
unfortunately turned the RNG into a constant number generator, depending
on the content of wh... | ```diff
diff --git a/drivers/char/hw_random/geode-rng.c b/drivers/char/hw_random/geode-rng.c
index 12fbe8091831..159baf00a867 100644
--- a/drivers/char/hw_random/geode-rng.c
+++ b/drivers/char/hw_random/geode-rng.c
@@ -58,7 +58,8 @@ struct amd_geode_priv {
static int geode_rng_data_read(struct hwrng *rng, u32 *data)... |
453b3d0278d73e355bedce47147663070004e807 | Analyze and fix the following issue in the Linux kernel code: hwrng: octeon - Fix warnings on 32-bit platforms | Problem Details:
Use unsigned long instead of u64 to silence compile warnings on
32-bit platforms. Also remove the __force bit which seems no
longer needed with a current sparse.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c
index 8561a09b4681..412f54405036 100644
--- a/drivers/char/hw_random/octeon-rng.c
+++ b/drivers/char/hw_random/octeon-rng.c
@@ -33,7 +33,7 @@ static int octeon_rng_init(struct hwrng *rng)
ctl.u64 = 0;
ctl.s.ent_en = 1; /*... |
b58a36008bfa1aadf55f516bcbfae40c779eb54b | Analyze and fix the following issue in the Linux kernel code: hwrng: bcm2835 - Fix hwrng throughput regression | Problem Details:
The last RCU stall fix caused a massive throughput regression of the
hwrng on Raspberry Pi 0 - 3. hwrng_msleep doesn't sleep precisely enough
and usleep_range doesn't allow scheduling. So try to restore the
best possible throughput by introducing hwrng_yield which interruptable
sleeps for one jiffy.
S... | ```diff
diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
index eb04b12f9f01..b03e80300627 100644
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
@@ -70,7 +70,7 @@ static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max,
while (... |
c977950146720abff14e46d8c53f5638b06a9182 | Analyze and fix the following issue in the Linux kernel code: crypto: hisilicon/hpre - Fix a erroneous check after snprintf() | Problem Details:
This error handling looks really strange.
Check if the string has been truncated instead.
Fixes: 02ab994635eb ("crypto: hisilicon - Fixed some tiny bugs of HPRE")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c
index 39297ce70f44..db44d889438a 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_main.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_main.c
@@ -1033,7 +1033,7 @@ static int hpre_cluster_debugfs_init(struct hisi_qm *qm... |
8f4f68e788c3a7a696546291258bfa5fdb215523 | Analyze and fix the following issue in the Linux kernel code: crypto: pcrypt - Fix hungtask for PADATA_RESET | Problem Details:
We found a hungtask bug in test_aead_vec_cfg as follows:
INFO: task cryptomgr_test:391009 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Call trace:
__switch_to+0x98/0xe0
__schedule+0x6c4/0xf40
schedule+0xd8/0x1b4
schedule_timeout+0x474... | ```diff
diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
index 8c1d0ca41213..d0d954fe9d54 100644
--- a/crypto/pcrypt.c
+++ b/crypto/pcrypt.c
@@ -117,6 +117,8 @@ static int pcrypt_aead_encrypt(struct aead_request *req)
err = padata_do_parallel(ictx->psenc, padata, &ctx->cb_cpu);
if (!err)
return -EINPROGRESS;
+ if ... |
7b3c2348d314a18f6ed84bab67023ae5d1ec6b1e | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Fix some unfused tests | Problem Details:
Some of the tests for unfused parts referenced a named member parameter,
but when the test suite was switched to call a python ctypes library they
weren't updated. Adjust them to refer to the first argument of the
process_param() call and set the data type of the signature appropriately.
Fixes: 15f8a... | ```diff
diff --git a/tools/crypto/ccp/test_dbc.py b/tools/crypto/ccp/test_dbc.py
index a28a1f94c1d2..79de3638a01a 100755
--- a/tools/crypto/ccp/test_dbc.py
+++ b/tools/crypto/ccp/test_dbc.py
@@ -33,8 +33,8 @@ def system_is_secured() -> bool:
class DynamicBoostControlTest(unittest.TestCase):
def __init__(self, dat... |
2ad01eb5fad24627ab4e196dc54a220753b2238b | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Fix sample application signature passing | Problem Details:
When parameters are sent the PSP returns back it's own signature
for the application to verify the authenticity of the result.
Display this signature to the caller instead of the one the caller
sent.
Fixes: f40d42f116cf ("crypto: ccp - Add a sample python script for Dynamic Boost Control")
Fixes: feb... | ```diff
diff --git a/tools/crypto/ccp/dbc.c b/tools/crypto/ccp/dbc.c
index 7774e981849f..a807df0f0597 100644
--- a/tools/crypto/ccp/dbc.c
+++ b/tools/crypto/ccp/dbc.c
@@ -68,5 +68,6 @@ int process_param(int fd, int msg_index, __u8 *signature, int *data)
return errno;
*data = tmp.param;
+ memcpy(signature, tmp.si... |
70f242c1933e9e881c13c31640bb6d56e8b7e738 | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Fix DBC sample application error handling | Problem Details:
The sample application was taking values from ioctl() and treating
those as the error codes to present to a user.
This is incorrect when ret is non-zero, the error is stored to `errno`.
Use this value instead.
Fixes: f40d42f116cf ("crypto: ccp - Add a sample python script for Dynamic Boost Control")
... | ```diff
diff --git a/tools/crypto/ccp/dbc.c b/tools/crypto/ccp/dbc.c
index 37e813175642..7774e981849f 100644
--- a/tools/crypto/ccp/dbc.c
+++ b/tools/crypto/ccp/dbc.c
@@ -8,6 +8,7 @@
*/
#include <assert.h>
+#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
@@ -22,16 +23,14 @@ int get_nonce(int fd, ... |
7f71c3e033824e1da237916a1885e3c0699f86b2 | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Fix ioctl unit tests | Problem Details:
A local environment change was importing ioctl_opt which is required
for ioctl tests to pass. Add the missing import for it.
Fixes: 15f8aa7bb3e5 ("crypto: ccp - Add unit tests for dynamic boost control")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@g... | ```diff
diff --git a/tools/crypto/ccp/test_dbc.py b/tools/crypto/ccp/test_dbc.py
index 998bb3e3cd04..a28a1f94c1d2 100755
--- a/tools/crypto/ccp/test_dbc.py
+++ b/tools/crypto/ccp/test_dbc.py
@@ -4,6 +4,12 @@ import unittest
import os
import time
import glob
+import fcntl
+try:
+ import ioctl_opt as ioctl
+except ... |
53f7f779f45cbe1771bc4ae05f0320e204a18611 | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Get a free page to use while fetching initial nonce | Problem Details:
dbc_dev_init() gets a free page from `GFP_KERNEL`, but if that page has
any data in it the first nonce request will fail.
This prevents dynamic boost control from probing. To fix this, explicitly
request a zeroed page with `__GFP_ZERO` to ensure first nonce fetch works.
Fixes: c04cf9e14f10 ("crypto: c... | ```diff
diff --git a/drivers/crypto/ccp/dbc.c b/drivers/crypto/ccp/dbc.c
index 839ea14b9a85..6f33149ef80d 100644
--- a/drivers/crypto/ccp/dbc.c
+++ b/drivers/crypto/ccp/dbc.c
@@ -205,7 +205,7 @@ int dbc_dev_init(struct psp_device *psp)
return -ENOMEM;
BUILD_BUG_ON(sizeof(union dbc_buffer) > PAGE_SIZE);
- dbc_dev... |
7ba98583448b7a0dbfa8121c7be642651e0abd61 | Analyze and fix the following issue in the Linux kernel code: Documentation: ABI: debugfs-driver-qat: fix fw_counters path | Problem Details:
The debugfs description for fw_counters reports an incorrect path
indicating a qat folder that does not exist. Fix it.
Fixes: 865b50fe6ea8 ("crypto: qat - add fw_counters debugfs file")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/Documentation/ABI/testing/debugfs-driver-qat b/Documentation/ABI/testing/debugfs-driver-qat
index 6731ffacc5f0..3f9b4f708051 100644
--- a/Documentation/ABI/testing/debugfs-driver-qat
+++ b/Documentation/ABI/testing/debugfs-driver-qat
@@ -1,4 +1,4 @@
-What: /sys/kernel/debug/qat_<device>_<BDF>/qat/... |
0a596b0682a7ce37e26c36629816f105c6459d06 | Analyze and fix the following issue in the Linux kernel code: KEYS: Include linux/errno.h in linux/verification.h | Problem Details:
Add inclusion of linux/errno.h as otherwise the reference to EINVAL
may be invalid.
Fixes: f3cf4134c5c6 ("bpf: Add bpf_lookup_*_key() and bpf_key_put() kfuncs")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308261414.HKw1Mrip-lkp@intel.com/
Signed-off-... | ```diff
diff --git a/include/linux/verification.h b/include/linux/verification.h
index f34e50ebcf60..cb2d47f28091 100644
--- a/include/linux/verification.h
+++ b/include/linux/verification.h
@@ -8,6 +8,7 @@
#ifndef _LINUX_VERIFICATION_H
#define _LINUX_VERIFICATION_H
+#include <linux/errno.h>
#include <linux/types.... |
d44f588eb12a0e338a6629ee92fd6e53182b99ad | Analyze and fix the following issue in the Linux kernel code: hwrng: st - add MODULE_DESCRIPTION | Problem Details:
Add a MODULE_DESCRIPTION to fix the W=1 warning
WARNING: modpost: missing MODULE_DESCRIPTION() in
drivers/char/hw_random/st-rng.o
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
index 6e9dfac9fc9f..23749817d83c 100644
--- a/drivers/char/hw_random/st-rng.c
+++ b/drivers/char/hw_random/st-rng.c
@@ -121,4 +121,5 @@ static struct platform_driver st_rng_driver = {
module_platform_driver(st_rng_driver);
MODULE... |
6007d34fce334bf4c8da70d3bc4ebcdf37172ed3 | Analyze and fix the following issue in the Linux kernel code: hwrng: nomadik - add MODULE_DESCRIPTION | Problem Details:
Add a MODULE_DESCRIPTION to fix the W=1 warning
WARNING: modpost: missing MODULE_DESCRIPTION() in
drivers/char/hw_random/nomadik-rng.o
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/drivers/char/hw_random/nomadik-rng.c b/drivers/char/hw_random/nomadik-rng.c
index 8c6a40d6ce3d..a2009fc4ad3c 100644
--- a/drivers/char/hw_random/nomadik-rng.c
+++ b/drivers/char/hw_random/nomadik-rng.c
@@ -88,4 +88,5 @@ static struct amba_driver nmk_rng_driver = {
module_amba_driver(nmk_rng_driv... |
308092d080852f8997126e5b3507536162416f4a | Analyze and fix the following issue in the Linux kernel code: thunderbolt: Restart XDomain discovery handshake after failure | Problem Details:
Alex reported that after rebooting the other host the peer-to-peer link
does not come up anymore. The reason for this is that the host that was
not rebooted tries to send the UUID request only 10 times according to
the USB4 Inter-Domain spec and gives up if it does not get reply. Then
when the other si... | ```diff
diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
index 5b5566862318..9803f0bbf20d 100644
--- a/drivers/thunderbolt/xdomain.c
+++ b/drivers/thunderbolt/xdomain.c
@@ -703,6 +703,27 @@ out_unlock:
mutex_unlock(&xdomain_lock);
}
+static void start_handshake(struct tb_xdomain *xd)
+{
+... |
e19f714ea63f861d95d3d92d45d5fd5ca2e05c8c | Analyze and fix the following issue in the Linux kernel code: thunderbolt: Correct TMU mode initialization from hardware | Problem Details:
David reported that cppcheck found following possible copy & paste
error from tmu_mode_init():
tmu.c:385:50: style: Expression is always false because 'else if' condition matches previous condition at line 383. [multiCondition]
And indeed this is a bug. Fix it to use correct index
(TB_SWITCH_TMU_MO... | ```diff
diff --git a/drivers/thunderbolt/tmu.c b/drivers/thunderbolt/tmu.c
index 747f88703d5c..11f2aec2a5d3 100644
--- a/drivers/thunderbolt/tmu.c
+++ b/drivers/thunderbolt/tmu.c
@@ -382,7 +382,7 @@ static int tmu_mode_init(struct tb_switch *sw)
} else if (ucap && tb_port_tmu_is_unidirectional(up)) {
if (tmu_rat... |
a9fdf5f933a6f2b358fad0194b1287b67f6704b1 | Analyze and fix the following issue in the Linux kernel code: thunderbolt: Check that lane 1 is in CL0 before enabling lane bonding | Problem Details:
Marek reported that when BlackMagic UltraStudio device is connected the
kernel repeatedly tries to enable lane bonding without success making
the device non-functional. It looks like the device does not have lane 1
connected at all so even though it is enabled we should not try to bond
the lanes. For t... | ```diff
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 43171cc1cc2d..bd5815f8f23b 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2725,6 +2725,13 @@ int tb_switch_lane_bonding_enable(struct tb_switch *sw)
!tb_port_is_width_supported(down, TB_LINK_WI... |
582620d9f6b352552bc9a3316fe2b1c3acd8742d | Analyze and fix the following issue in the Linux kernel code: thunderbolt: Workaround an IOMMU fault on certain systems with Intel Maple Ridge | Problem Details:
On some systems the IOMMU blocks the first couple of driver ready
messages to the connection manager firmware as can be seen in below
excerpts:
thunderbolt 0000:06:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0010 address=0xbb0e3400 flags=0x0020]
or
DMAR: DRHD: handling fault status reg 2
... | ```diff
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index dbdcad8d73bf..d8b9c734abd3 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -41,6 +41,7 @@
#define PHY_PORT_CS1_LINK_STATE_SHIFT 26
#define ICM_TIMEOUT 5000 /* ms */
+#define ICM_RETRIES 3
#define ICM_APPR... |
75ad80ed88a182ab2ad5513e448cf07b403af5c3 | Analyze and fix the following issue in the Linux kernel code: net/core: Fix ETH_P_1588 flow dissector | Problem Details:
When a PTP ethernet raw frame with a size of more than 256 bytes followed
by a 0xff pattern is sent to __skb_flow_dissect, nhoff value calculation
is wrong. For example: hdr->message_length takes the wrong value (0xffff)
and it does not replicate real header length. In this case, 'nhoff' value
was over... | ```diff
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index b3b3af0e7844..272f09251343 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -1446,7 +1446,7 @@ proto_again:
break;
}
- nhoff += ntohs(hdr->message_length);
+ nhoff += sizeof(struct ptp_header);
fdret ... |
3c70de9b580998e5d644f4e80a9944c30aa1197b | Analyze and fix the following issue in the Linux kernel code: Revert "firewire: core: obsolete usage of GFP_ATOMIC at building node tree" | Problem Details:
This reverts commit 06f45435d985d60d7d2fe2424fbb9909d177a63d.
John Ogness reports the case that the allocation is in atomic context under
acquired spin-lock.
[ 12.555784] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306
[ 12.555808] in_atomic(): 1, irqs_disabled(... | ```diff
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index a3104e35412c..aa597cda0d88 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -1211,7 +1211,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
* without actually ha... |
a8f367f7e131e76713b2949b168ac97f671fce7a | Analyze and fix the following issue in the Linux kernel code: net: ti: icssg-prueth: add PTP dependency | Problem Details:
The driver can now use PTP if enabled but fails to link built-in
if PTP is a loadable module:
aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_get_ptp_clock_idx':
icss_iep.c:(.text+0x200): undefined reference to `ptp_clock_index'
Add the usual dependency to avoid this... | ```diff
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index 88b5b1b47779..0a3346650e03 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -199,6 +199,7 @@ config TI_ICSSG_PRUETH
config TI_ICSS_IEP
tristate "TI PRU ICSS IEP driver"
+ depends on PTP... |
83cd5eb654b320c1972254f243531f3f3cebcccf | Analyze and fix the following issue in the Linux kernel code: ipv6: lockless IPV6_ROUTER_ALERT_ISOLATE implementation | Problem Details:
Reads from np->rtalert_isolate are racy.
Move this flag to inet->inet_flags to fix data-races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index e62413371ea4..f288a35f157f 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -246,11 +246,10 @@ struct ipv6_pinfo {
__u16 sndflow:1,
pmtudisc:3,
padding:1, /* 1 bit hole */
- srcprefs:3, /* 001: prefer temporary addres... |
3cccda8db2cf2f2a224d55d5b6e2251d478c58ca | Analyze and fix the following issue in the Linux kernel code: ipv6: move np->repflow to atomic flags | Problem Details:
Move np->repflow to inet->inet_flags to fix data-races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 53f4f1b97a78..e62413371ea4 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -244,7 +244,6 @@ struct ipv6_pinfo {
/* sockopt flags */
__u16 sndflow:1,
- repflow:1,
pmtudisc:3,
padding:1, /* 1 bit hole */
srcpr... |
3fa29971c69519629370b119b0b618ee88ade6b9 | Analyze and fix the following issue in the Linux kernel code: ipv6: lockless IPV6_RECVERR implemetation | Problem Details:
np->recverr is moved to inet->inet_flags to fix data-races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 57d563f1d4b1..53f4f1b97a78 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -243,8 +243,7 @@ struct ipv6_pinfo {
} rxopt;
/* sockopt flags */
- __u16 recverr:1,
- sndflow:1,
+ __u16 sndflow:1,
re... |
1086ca7cce292bb498d7f8f85f4593c9ef4902b7 | Analyze and fix the following issue in the Linux kernel code: ipv6: lockless IPV6_DONTFRAG implementation | Problem Details:
Move np->dontfrag flag to inet->inet_flags to fix data-races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index e3be5dc21b7d..57d563f1d4b1 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -252,7 +252,6 @@ struct ipv6_pinfo {
* 010: prefer public address
* 100: prefer care-of address
*/
- dontfrag:1,
rtalert_isola... |
5121516b0c4736b7977d977b239e36d23ec64401 | Analyze and fix the following issue in the Linux kernel code: ipv6: lockless IPV6_AUTOFLOWLABEL implementation | Problem Details:
Move np->autoflowlabel and np->autoflowlabel_set in inet->inet_flags,
to fix data-races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index d88e91b7f0a3..e3be5dc21b7d 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -253,8 +253,6 @@ struct ipv6_pinfo {
* 100: prefer care-of address
*/
dontfrag:1,
- autoflowlabel:1,
- autoflowlabel_set:1,
rt... |
6559c0ff3bc27d7e4d447d31c1d7e8eae0e959f5 | Analyze and fix the following issue in the Linux kernel code: ipv6: lockless IPV6_MULTICAST_ALL implementation | Problem Details:
Move np->mc_all to an atomic flags to fix data-races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 0d2b0a1b2dae..d88e91b7f0a3 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -255,7 +255,6 @@ struct ipv6_pinfo {
dontfrag:1,
autoflowlabel:1,
autoflowlabel_set:1,
- mc_all:1,
rtalert_isolate:1;
__u8 min_hopc... |
dcae74622c051b219ee628669a31716473efda2c | Analyze and fix the following issue in the Linux kernel code: ipv6: lockless IPV6_RECVERR_RFC4884 implementation | Problem Details:
Move np->recverr_rfc4884 to an atomic flag to fix data-races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 9cc278b5e4f4..0d2b0a1b2dae 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -256,7 +256,6 @@ struct ipv6_pinfo {
autoflowlabel:1,
autoflowlabel_set:1,
mc_all:1,
- recverr_rfc4884:1,
rtalert_isolate:1;
__u8 m... |
2da23eb07c91241d962f3ff05565065484cd8929 | Analyze and fix the following issue in the Linux kernel code: ipv6: lockless IPV6_MULTICAST_HOPS implementation | Problem Details:
This fixes data-races around np->mcast_hops,
and make IPV6_MULTICAST_HOPS lockless.
Note that np->mcast_hops is never negative,
thus can fit an u8 field instead of s16.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <dave... | ```diff
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 68cf1ca94914..9cc278b5e4f4 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -214,15 +214,8 @@ struct ipv6_pinfo {
__u32 frag_size;
s16 hop_limit;
+ u8 mcast_hops;
-#if defined(__BIG_ENDIAN_BITFIELD)
- /* Packed in 16bits... |
cccd32816506cbac3a4c65d9dff51b3125ef1a03 | Analyze and fix the following issue in the Linux kernel code: panic: Reenable preemption in WARN slowpath | Problem Details:
Commit:
5a5d7e9badd2 ("cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG")
amended warn_slowpath_fmt() to disable preemption until the WARN splat
has been emitted.
However the commit neglected to reenable preemption in the !fmt codepath,
i.e. when a WARN splat is emitted without addition... | ```diff
diff --git a/kernel/panic.c b/kernel/panic.c
index 07239d4ad81e..ffa037fa777d 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -697,6 +697,7 @@ void warn_slowpath_fmt(const char *file, int line, unsigned taint,
if (!fmt) {
__warn(file, line, __builtin_return_address(0), taint,
NULL, NULL);
+ ... |
21484e43b936c4f323d232c6a71c1f47a6af3278 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l56: Fix missing RESET GPIO if _SUB is missing | Problem Details:
In cs35l56_hda_read_acpi() do not return if ACPI _SUB is missing.
A missing _SUB means that the driver cannot load a system-specific
firmware, because the firmware is identified by the _SUB. But it can
fallback to a generic firmware. Unfortunately this was being handled
by immediately returning 0, whi... | ```diff
diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index bc75865b5de8..87ffe8fbff99 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -865,15 +865,13 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id)
sub = acpi_get_subsystem_id(ACPI_HANDLE... |
c326ca98446e0ae4fee43a40acf79412b74cfedb | Analyze and fix the following issue in the Linux kernel code: selftests: tls: swap the TX and RX sockets in some tests | Problem Details:
tls.sendmsg_large and tls.sendmsg_multiple are trying to send through
the self->cfd socket (only configured with TLS_RX) and to receive through
the self->fd socket (only configured with TLS_TX), so they're not using
kTLS at all. Swap the sockets.
Fixes: 7f657d5bf507 ("selftests: tls: add selftests for... | ```diff
diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index 297d972558fb..464853a7f982 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -613,11 +613,11 @@ TEST_F(tls, sendmsg_large)
msg.msg_iov = &vec;
msg.msg_iovlen = 1;
- EXPECT_EQ... |
2c75426c1fea591bb338ba072068f83d2f6be088 | Analyze and fix the following issue in the Linux kernel code: smb3: fix some minor typos and repeated words | Problem Details:
Minor cleanup pointed out by checkpatch (repeated words, missing blank
lines) in smb2pdu.c and old header location referred to in transport.c
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
index 3403188e3100..44d4943e9c56 100644
--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@ -89,6 +89,7 @@ smb2_hdr_assemble(struct smb2_hdr *shdr, __le16 smb2_cmd,
struct TCP_Server_Info *server)
{
struct smb3_hdr_req *smb3_hdr;
... |
2a2dffd911d4139258b828b9c5056cb64b826758 | Analyze and fix the following issue in the Linux kernel code: net: microchip: sparx5: Fix possible memory leaks in vcap_api_kunit | Problem Details:
Inject fault while probing kunit-example-test.ko, the duprule which
is allocated by kzalloc in vcap_dup_rule() of
test_vcap_xn_rule_creator() is not freed, and it cause the memory leaks
below. Use vcap_del_rule() to free them as other functions do it.
unreferenced object 0xffff6eb4846f6180 (size 192):... | ```diff
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
index 99f04a53a442..fe4e166de8a0 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
@@ -1597,6 +1597,11 @@ static voi... |
20146fa73ab8db2ab9f4916bbaf4610646787a09 | Analyze and fix the following issue in the Linux kernel code: net: microchip: sparx5: Fix possible memory leaks in test_vcap_xn_rule_creator() | Problem Details:
Inject fault while probing kunit-example-test.ko, the rule which
is allocated by kzalloc in vcap_alloc_rule(), the field which is
allocated by kzalloc in vcap_rule_add_action() and
vcap_rule_add_key() is not freed, and it cause the memory leaks
below. Use vcap_free_rule() to free them as other drivers ... | ```diff
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
index 8c61a5dbce55..99f04a53a442 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
@@ -243,10 +243,9 @@ static void ... |
89e3af0277388f32d56915a6715c735e4afae5d6 | Analyze and fix the following issue in the Linux kernel code: net: microchip: sparx5: Fix possible memory leak in vcap_api_encode_rule_test() | Problem Details:
Inject fault while probing kunit-example-test.ko, the duprule which
is allocated in vcap_dup_rule() and the vcap enabled port which
is allocated in vcap_enable() of vcap_enable_lookups in
vcap_api_encode_rule_test() is not freed, and it cause the memory
leaks below.
Use vcap_enable_lookups() with fals... | ```diff
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
index f268383a7570..8c61a5dbce55 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
@@ -1439,6 +1439,10 @@ static voi... |
39d0ccc185315408e7cecfcaf06d167927b51052 | Analyze and fix the following issue in the Linux kernel code: net: microchip: sparx5: Fix memory leak for vcap_api_rule_add_actionvalue_test() | Problem Details:
Inject fault while probing kunit-example-test.ko, the field which
is allocated by kzalloc in vcap_rule_add_action() of
vcap_rule_add_action_bit/u32() is not freed, and it cause
the memory leaks below.
unreferenced object 0xffff0276c496b300 (size 64):
comm "kunit_try_catch", pid 286, jiffies 42948942... | ```diff
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
index 2fb0b8cf2b0c..f268383a7570 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
@@ -1095,6 +1095,17 @@ static voi... |
f037fc9905ffa6fa19b89bfbc86946798cede071 | Analyze and fix the following issue in the Linux kernel code: net: microchip: sparx5: Fix memory leak for vcap_api_rule_add_keyvalue_test() | Problem Details:
Inject fault while probing kunit-example-test.ko, the field which
is allocated by kzalloc in vcap_rule_add_key() of
vcap_rule_add_key_bit/u32/u128() is not freed, and it cause
the memory leaks below.
unreferenced object 0xffff0276c14b7240 (size 64):
comm "kunit_try_catch", pid 284, jiffies 429489422... | ```diff
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
index c07f25e791c7..2fb0b8cf2b0c 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
@@ -995,6 +995,16 @@ static void ... |
18f35dc9314db89e2d215951e5afa3e636b72baf | Analyze and fix the following issue in the Linux kernel code: cxl/region: Refactor granularity select in cxl_port_setup_targets() | Problem Details:
In cxl_port_setup_targets() the region driver validates the
configuration of auto-discovered region decoders, as well
as decoders the driver is preparing to program.
The existing calculations use the encoded interleave granularity
value to create an interleave granularity that properly fans out
when r... | ```diff
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index b4c6a749406f..6d63b8798c29 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -1176,16 +1176,15 @@ static int cxl_port_setup_targets(struct cxl_port *port,
}
/*
- * If @parent_port is masking address bits, pic... |
9e4edf1a2196fa4bea6e8201f166785bd066446a | Analyze and fix the following issue in the Linux kernel code: cxl/region: Match auto-discovered region decoders by HPA range | Problem Details:
Currently, when the region driver attaches a region to a port, it
selects the ports next available decoder to program.
With the addition of auto-discovered regions, a port decoder has
already been programmed so grabbing the next available decoder can
be a mismatch when there is more than one region us... | ```diff
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index e115ba382e04..b4c6a749406f 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -717,13 +717,35 @@ static int match_free_decoder(struct device *dev, void *data)
return 0;
}
+static int match_auto_decoder(struct de... |
e3da4c401f2d088cf049769eb1e39c299867ee9d | Analyze and fix the following issue in the Linux kernel code: ata: pata_parport: Fix code style issues | Problem Details:
Fix indentation and other code style issues in the comm.c file.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309150646.n3iBvbPj-lkp@intel.com/
Signed-off-by: Damien Le Moal <dlemoal@kernel.org> | ```diff
diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c
index 4839becbbd56..94b8d352102e 100644
--- a/drivers/ata/pata_parport/comm.c
+++ b/drivers/ata/pata_parport/comm.c
@@ -37,7 +37,7 @@ static int comm_read_regr(struct pi_adapter *pi, int cont, int regr)
{
int l, h, r;
- r... |
737dd811a3dbfd7edd4ad2ba5152e93d99074f83 | Analyze and fix the following issue in the Linux kernel code: ata: libahci: clear pending interrupt status | Problem Details:
When a CRC error occurs, the HBA asserts an interrupt to indicate an
interface fatal error (PxIS.IFS). The ISR clears PxIE and PxIS, then
does error recovery. If the adapter receives another SDB FIS
with an error (PxIS.TFES) from the device before the start of the EH
recovery process, the interrupt sig... | ```diff
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index e2bacedf28ef..f1263364fa97 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1256,6 +1256,26 @@ static ssize_t ahci_activity_show(struct ata_device *dev, char *buf)
return sprintf(buf, "%d\n", emp->blink_policy);
}
+static vo... |
41ebaa5e0eebea4c3bac96b72f9f8ae0d77c0bdb | Analyze and fix the following issue in the Linux kernel code: media: uvcvideo: Fix OOB read | Problem Details:
If the index provided by the user is bigger than the mask size, we might do
an out of bound read.
CC: stable@kernel.org
Fixes: 40140eda661e ("media: uvcvideo: Implement mask for V4L2_CTRL_TYPE_MENU")
Reported-by: Zubin Mithra <zsm@chromium.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Rev... | ```diff
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 5e9d3da862dd..e59a463c2761 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -1402,6 +1402,9 @@ int uvc_query_v4l2_menu(struct uvc_video_chain *chain,
query_menu->id = id;
query_menu-... |
861ab817b5ebe5e34bfbf01943b86ded6bba97b3 | Analyze and fix the following issue in the Linux kernel code: media: bt8xx: bttv_risc_packed(): remove field checks | Problem Details:
Do not turn on the vcr_hack based on the btv->field value.
This was a change in the bttv vb2 conversion that caused
green lines at the bottom of the picture in tvtime.
It was originally added to the vb2 conversion based on
faulty information that without this there would be glitches
in the video. How... | ```diff
diff --git a/drivers/media/pci/bt8xx/bttv-risc.c b/drivers/media/pci/bt8xx/bttv-risc.c
index 436baf6c8b08..241a696e374a 100644
--- a/drivers/media/pci/bt8xx/bttv-risc.c
+++ b/drivers/media/pci/bt8xx/bttv-risc.c
@@ -68,9 +68,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
sg = sglist;
for ... |
12d21fc2ba88e3bb41167afb5c6c0e961f2ab0c9 | Analyze and fix the following issue in the Linux kernel code: media: i2c: rdacm21: Remove an incorrect fwnode_handle_put() call | Problem Details:
The commit in Fixes has removed an fwnode_handle_put() call in the error
handling path of the probe.
Remove the same call from the remove function.
Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Re... | ```diff
diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
index a36a709243fd..3e22df36354f 100644
--- a/drivers/media/i2c/rdacm21.c
+++ b/drivers/media/i2c/rdacm21.c
@@ -608,7 +608,6 @@ static void rdacm21_remove(struct i2c_client *client)
v4l2_async_unregister_subdev(&dev->sd);
v4l2_ctrl_handl... |
faece4ad72b06308101d7f9cacaf8dd6df4fdc1f | Analyze and fix the following issue in the Linux kernel code: media: i2c: imx219: Perform a full mode set unconditionally | Problem Details:
The .set_fmt() handler tries to avoid updating the sensor configuration
when the mode hasn't changed. It does so by comparing both the mode and
the media bus code. While the latter correctly uses the media bus code
stored in the subdev state, the former compares the mode being set with
the active mode,... | ```diff
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index f19c828b6943..ec53abe2e84e 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -762,9 +762,6 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
format = v4l2_subdev_get_pad_format(sd, sd_state, 0);
cr... |
bb2d01127f5d8e5034daa60a08e68f719ad71ec2 | Analyze and fix the following issue in the Linux kernel code: media: i2c: imx219: Fix crop rectangle setting when changing format | Problem Details:
When moving the imx219 driver to the subdev active state, commit
e8a5b1df000e ("media: i2c: imx219: Use subdev active state") used the
pad crop rectangle stored in the subdev state to report the crop
rectangle of the active mode. That crop rectangle was however not set in
the state when setting the for... | ```diff
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index 6f88e002c8d8..f19c828b6943 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -750,6 +750,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
const struct imx219_mode *mode;
int exposure_max, exposu... |
5cb218ffc54f1865edbe0c2a5ac4e906753817fb | Analyze and fix the following issue in the Linux kernel code: media: i2c: imx219: Fix a typo referring to a wrong variable | Problem Details:
The imx219_init_cfg() function has stopped operating on the try format
since commit 7e700847b1fe ("media: i2c: imx219: Switch from open to
init_cfg"), but a comment in the function wasn't updated. Fix it.
While at it, improve spelling in a second comment in the function.
Fixes: 7e700847b1fe ("media: ... | ```diff
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index a1136fdfbed2..6f88e002c8d8 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -691,12 +691,12 @@ static int imx219_init_cfg(struct v4l2_subdev *sd,
struct v4l2_mbus_framefmt *format;
struct v4l2_rect *crop;
... |
e784e78efba87571bcfaab09e8bd81a77c8feaa1 | Analyze and fix the following issue in the Linux kernel code: media: i2c: max9286: Remove an incorrect fwnode_handle_put() call | Problem Details:
The commit in Fixes has removed an fwnode_handle_put() call in the error
handling path of max9286_v4l2_register().
Remove the same call from max9286_v4l2_unregister().
Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
Signed-off-by: Christophe JAILLET <christophe.ja... | ```diff
diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
index 20e7c7cf5eeb..be84ff1e2b17 100644
--- a/drivers/media/i2c/max9286.c
+++ b/drivers/media/i2c/max9286.c
@@ -1110,7 +1110,6 @@ err_async:
static void max9286_v4l2_unregister(struct max9286_priv *priv)
{
- fwnode_handle_put(priv->sd.fw... |
c42d116ccb72b6a33728e2b4b76ab175197ffb07 | Analyze and fix the following issue in the Linux kernel code: media: ivsc: Depend on VIDEO_DEV | Problem Details:
CONFIG_VIDEO_DEV is required by other selected symbols. Depend on it.
Link: https://lore.kernel.org/linux-media/20230828085718.3912335-1-sakari.ailus@linux.intel.com
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 29006e196a56 ("media: pci: intel: ivsc: Add CSI submodule")
Signed-off-by: Saka... | ```diff
diff --git a/drivers/media/pci/intel/ivsc/Kconfig b/drivers/media/pci/intel/ivsc/Kconfig
index 92c975e98cb1..212753450576 100644
--- a/drivers/media/pci/intel/ivsc/Kconfig
+++ b/drivers/media/pci/intel/ivsc/Kconfig
@@ -3,7 +3,7 @@
config INTEL_VSC
tristate "Intel Visual Sensing Controller"
- depends on INT... |
8e7f82deb0c0386a03b62e30082574347f8b57d5 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix race between reading a directory and adding entries to it | Problem Details:
When opening a directory (opendir(3)) or rewinding it (rewinddir(3)), we
are not holding the directory's inode locked, and this can result in later
attempting to add two entries to the directory with the same index number,
resulting in a transaction abort, with -EEXIST (-17), when inserting the
second ... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 2961f1e1e778..5e1b15e69ed6 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5769,21 +5769,24 @@ out:
static int btrfs_get_dir_last_index(struct btrfs_inode *dir, u64 *index)
{
- if (dir->index_cnt == (u64)-1) {
- int ret;
+ int ret = 0;
+ btr... |
e60aa5da14d01fed8411202dbe4adf6c44bd2a57 | Analyze and fix the following issue in the Linux kernel code: btrfs: refresh dir last index during a rewinddir(3) call | Problem Details:
When opening a directory we find what's the index of its last entry and
then store it in the directory's file handle private data (struct
btrfs_file_private::last_index), so that in the case new directory entries
are added to a directory after an opendir(3) call we don't end up in an
infinite loop (see... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index dee4fce6ab72..2961f1e1e778 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5818,6 +5818,19 @@ static int btrfs_opendir(struct inode *inode, struct file *file)
return 0;
}
+static loff_t btrfs_dir_llseek(struct file *file, loff_t offset, int wh... |
357950361cbc6d54fb68ed878265c647384684ae | Analyze and fix the following issue in the Linux kernel code: btrfs: set last dir index to the current last index when opening dir | Problem Details:
When opening a directory for reading it, we set the last index where we
stop iteration to the value in struct btrfs_inode::index_cnt. That value
does not match the index of the most recently added directory entry but
it's instead the index number that will be assigned the next directory
entry.
This me... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 616fdcf40467..dee4fce6ab72 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5780,7 +5780,8 @@ static int btrfs_get_dir_last_index(struct btrfs_inode *dir, u64 *index)
}
}
- *index = dir->index_cnt;
+ /* index_cnt is the index number of next n... |
d2f706058826b803f5b9dc3f6d4c213ae0c54eb9 | Analyze and fix the following issue in the Linux kernel code: cxl/mbox: Fix CEL logic for poison and security commands | Problem Details:
The following debug output was observed while testing CXL
cxl_core:cxl_walk_cel:721: cxl_mock_mem cxl_mem.0: Opcode 0x4300 unsupported by driver
opcode 0x4300 (Get Poison) is supported by the driver and the mock
device supports it. The logic should be checking that the opcode is
both not poison and ... | ```diff
diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index ca60bb8114f2..4df4f614f490 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -715,24 +715,25 @@ static void cxl_walk_cel(struct cxl_memdev_state *mds, size_t size, u8 *cel)
for (i = 0; i < cel_entries; i++) {
u16 opcod... |
6cc834ba62998c65c42d0c63499bdd35067151ec | Analyze and fix the following issue in the Linux kernel code: nvme: avoid bogus CRTO values | Problem Details:
Some devices are reporting controller ready mode support, but return 0
for CRTO. These devices require a much higher time to ready than that,
so they are failing to initialize after the driver starter preferring
that value over CAP.TO.
The spec requires that CAP.TO match the appropritate CRTO value, o... | ```diff
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 37b6fa746662..0685ed4f2dc4 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2245,25 +2245,8 @@ int nvme_enable_ctrl(struct nvme_ctrl *ctrl)
else
ctrl->ctrl_config = NVME_CC_CSS_NVM;
- if (ctrl->cap & NVME_CAP_C... |
dd28a3cb92389deb2d5a0ab3e91b97007c8bc366 | Analyze and fix the following issue in the Linux kernel code: thermal: int340x: processor_thermal: Add interrupt configuration function | Problem Details:
Some features like workload type prediction and power floor events
require interrupt support to avoid polling. Here interrupts are enabled
and disabled via sending mailbox commands. The mailbox command ID is
0x1E for read and 0x1F for write.
The interrupt configuration will require mutex protection as... | ```diff
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.h b/drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
index bae6e3e4e22e..0e7725829c24 100644
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
+++ b/drivers/thermal/intel/int340x_thermal/processor_th... |
fb2c10245f201278804a6f28e196e95436059d6d | Analyze and fix the following issue in the Linux kernel code: thermal: core: Fix disabled trip point check in handle_thermal_trip() | Problem Details:
Commit bc840ea5f9a9 ("thermal: core: Do not handle trip points with
invalid temperature") added a check for invalid temperature to the
disabled trip point check in handle_thermal_trip(), but that check was
added at a point when the trip structure has not been initialized yet.
This may cause handle_the... | ```diff
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 8717a3343512..58533ea75cd9 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -348,12 +348,14 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip_id)
struct thermal_trip ... |
971f7c32147f2d0953a815a109b22b8ed45949d4 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Skip module_fentry_shadow test when bpf_testmod is not available | Problem Details:
This test relies on bpf_testmod, so skip it if the module is not available.
Fixes: aa3d65de4b900 ("bpf/selftests: Test fentry attachment to shadowed functions")
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/2023091... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c b/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c
index c7636e18b1eb..aa9f67eb1c95 100644
--- a/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c
+++ b/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow... |
f5f3bd903a5d3e3b2ba89f11e0e29db25e60c048 | Analyze and fix the following issue in the Linux kernel code: f2fs: set the default compress_level on ioctl | Problem Details:
Otherwise, we'll get a broken inode.
# touch $FILE
# f2fs_io setflags compression $FILE
# f2fs_io set_coption 2 8 $FILE
[ 112.227612] F2FS-fs (dm-51): sanity_check_compress_inode: inode (ino=8d3fe) has unsupported compress level: 0, run fsck to fix
Cc: stable@vger.kernel.org
Signed-off-by: Jaege... | ```diff
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index ca5904129b16..09716127e107 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -4005,6 +4005,15 @@ static int f2fs_ioc_set_compress_option(struct file *filp, unsigned long arg)
F2FS_I(inode)->i_compress_algorithm = option.algorithm;
F2FS_I(inode)->i_log_clu... |
552c5013f2bc648611395ea80df6250aa4fe28f6 | Analyze and fix the following issue in the Linux kernel code: kbuild: avoid long argument lists in make modules_install | Problem Details:
Running "make modules_install" may fail with
make[2]: execvp: /bin/sh: Argument list too long
if many modules are built and INSTALL_MOD_PATH is long. This is because
scripts/Makefile.modinst creates all directories with one mkdir command.
Use $(foreach ...) instead to prevent an excessive argument ... | ```diff
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index c59cc57286ba..346f5ec50682 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -113,7 +113,7 @@ quiet_cmd_sign :=
endif
# Create necessary directories
-$(shell mkdir -p $(sort $(dir $(install-y))))
+$(foreach dir, $(s... |
c86e9ae5e3ad82969fe395414d1d9f173f8e9fd4 | Analyze and fix the following issue in the Linux kernel code: kbuild: fix kernel-devel RPM package and linux-headers Deb package | Problem Details:
Since commit fe66b5d2ae72 ("kbuild: refactor kernel-devel RPM package
and linux-headers Deb package"), the kernel-devel RPM package and
linux-headers Deb package are broken.
I double-quoted the $(find ... -type d), which resulted in newlines
being included in the argument to the outer find comment.
... | ```diff
diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build
index af7fe9f5b1e4..8a7051fad087 100755
--- a/scripts/package/install-extmod-build
+++ b/scripts/package/install-extmod-build
@@ -20,7 +20,7 @@ mkdir -p "${destdir}"
find "arch/${SRCARCH}" -maxdepth 1 -name 'Makefile*'
... |
c8870379a21fbd9ad14ca36204ccfbe9d25def43 | Analyze and fix the following issue in the Linux kernel code: md: Put the right device in md_seq_next | Problem Details:
If there are multiple arrays in system and one mddevice is marked
with MD_DELETED and md_seq_next() is called in the middle of removal
then it _get()s proper device but it may _put() deleted one. As a result,
active counter may never be zeroed for mddevice and it cannot
be removed.
Put the device whic... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 73758b754127..a104a025084d 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8265,7 +8265,7 @@ static void *md_seq_next(struct seq_file *seq, void *v, loff_t *pos)
spin_unlock(&all_mddevs_lock);
if (to_put)
- mddev_put(mddev);
+ mddev_put(to_put)... |
9af45bbdcbbbb411b6b7440220593a46282fd64b | Analyze and fix the following issue in the Linux kernel code: remoteproc: zynqmp: fix TCM carveouts in lockstep mode | Problem Details:
In lockstep mode following is TCM address map:
| *TCM* | *R5 View* | *Linux view* |
| R5_0 ATCM (128 KB) | 0x0000_0000 | 0xFFE0_0000 |
| R5_0 BTCM (128 KB) | 0x0002_0000 | 0xFFE2_0000 |
Current driver keeps single TCM carveout in lockstep mode
as ATCM and BTCM addresses form contiguo... | ```diff
diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
index feca6de68da2..efd758c2f4ed 100644
--- a/drivers/remoteproc/xlnx_r5_remoteproc.c
+++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
@@ -75,13 +75,21 @@ struct mbox_info {
* Hardcoded TCM bank values. This will be re... |
f822899c28572a854f2c746da5ed707d752458ab | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sa8775p: correct PMIC GPIO label in gpio-ranges | Problem Details:
There are several PMICs with GPIO nodes and one of the nodes referenced
other's in gpio-ranges which could result in deferred-probes like:
qcom-spmi-gpio c440000.spmi:pmic@2:gpio@8800: can't add gpio chip
Reported-by: Brian Masney <bmasney@redhat.com>
Closes: https://lore.kernel.org/all/ZN5KIlI+RDu... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
index 3c3b6287cd27..eaa43f022a65 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
@@ -173,7 +173,7 @@
compatible = "qcom,pmm8654au-gpio", "qcom,spm... |
c21a8027ad8a68c340d0d58bf1cc61dcb0bc4d2f | Analyze and fix the following issue in the Linux kernel code: io_uring/net: fix iter retargeting for selected buf | Problem Details:
When using selected buffer feature, io_uring delays data iter setup
until later. If io_setup_async_msg() is called before that it might see
not correctly setup iterator. Pre-init nr_segs and judge from its state
whether we repointing.
Cc: stable@vger.kernel.org
Reported-by: syzbot+a4c6e5ef999b68b26ed1... | ```diff
diff --git a/io_uring/net.c b/io_uring/net.c
index 3d07bf79c1e0..7a8e298af81b 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -183,6 +183,10 @@ static int io_setup_async_msg(struct io_kiocb *req,
memcpy(async_msg, kmsg, sizeof(*kmsg));
if (async_msg->msg.msg_name)
async_msg->msg.msg_name = &async_msg... |
cba320408d631422fef0ad8407954fb9d6f8f650 | Analyze and fix the following issue in the Linux kernel code: power: supply: rt9467: Fix rt9467_run_aicl() | Problem Details:
It is spurious to bail-out on a wait_for_completion_timeout() call that
does NOT timeout.
Reverse the logic to return -ETIMEDOUT instead, in case of tiemout.
Fixes: 6f7f70e3a8dd ("power: supply: rt9467: Add Richtek RT9467 charger driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.... | ```diff
diff --git a/drivers/power/supply/rt9467-charger.c b/drivers/power/supply/rt9467-charger.c
index 683adb18253d..fdfdc83ab045 100644
--- a/drivers/power/supply/rt9467-charger.c
+++ b/drivers/power/supply/rt9467-charger.c
@@ -598,8 +598,8 @@ static int rt9467_run_aicl(struct rt9467_chg_data *data)
reinit_compl... |
7fda67e8c3ab6069f75888f67958a6d30454a9f6 | Analyze and fix the following issue in the Linux kernel code: ext4: fix rec_len verify error | Problem Details:
With the configuration PAGE_SIZE 64k and filesystem blocksize 64k,
a problem occurred when more than 13 million files were directly created
under a directory:
EXT4-fs error (device xx): ext4_dx_csum_set:492: inode #xxxx: comm xxxxx: dir seems corrupt? Run e2fsck -D.
EXT4-fs error (device xx): ext4_dx... | ```diff
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index c0f0b4e2413b..c1ceccab05f5 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -343,17 +343,17 @@ static struct ext4_dir_entry_tail *get_dirent_tail(struct inode *inode,
struct buffer_head *bh)
{
struct ext4_dir_entry_tail *t;
+ int blocksize =... |
5229a658f6453362fbb9da6bf96872ef25a7097e | Analyze and fix the following issue in the Linux kernel code: ext4: do not let fstrim block system suspend | Problem Details:
Len Brown has reported that system suspend sometimes fail due to
inability to freeze a task working in ext4_trim_fs() for one minute.
Trimming a large filesystem on a disk that slowly processes discard
requests can indeed take a long time. Since discard is just an advisory
call, it is perfectly fine to... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 09091adfde64..1e599305d85f 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -16,6 +16,7 @@
#include <linux/slab.h>
#include <linux/nospec.h>
#include <linux/backing-dev.h>
+#include <linux/freezer.h>
#include <trace/events/ext4.h>
/*
@@ -6... |
1bb0763f1eb7dd015989fdc77dea17a349df2ea9 | Analyze and fix the following issue in the Linux kernel code: jbd2: Fix memory leak in journal_init_common() | Problem Details:
There is a memory leak reported by kmemleak:
unreferenced object 0xff11000105903b80 (size 64):
comm "mount", pid 3382, jiffies 4295032021 (age 27.826s)
hex dump (first 32 bytes):
04 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
ff ff ff ff 00 00 00 00 00 00 00 00... | ```diff
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 15e33c26c6cd..3ffda557dbdf 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1604,6 +1604,8 @@ static journal_t *journal_init_common(struct block_device *bdev,
err_cleanup:
percpu_counter_destroy(&journal->j_checkpoint_jh_count);
+ if (journ... |
cbcdfbf5a6cd66e47e5ee5d49c4c5a27a07ba082 | Analyze and fix the following issue in the Linux kernel code: power: supply: rk817: Add missing module alias | Problem Details:
Similar to the rk817 codec alias that was missing, the rk817 charger
driver is missing a module alias as well. This absence prevents the
driver from autoprobing on OF systems when it is built as a module.
Add the right MODULE_ALIAS to fix this.
Fixes: 11cb8da0189b ("power: supply: Add charger driver ... | ```diff
diff --git a/drivers/power/supply/rk817_charger.c b/drivers/power/supply/rk817_charger.c
index 8328bcea1a29..c2510078eb2d 100644
--- a/drivers/power/supply/rk817_charger.c
+++ b/drivers/power/supply/rk817_charger.c
@@ -1211,3 +1211,4 @@ MODULE_DESCRIPTION("Battery power supply driver for RK817 PMIC");
MODULE_A... |
e35059949daa83f8dadf710d0f829ab3c3a72fe2 | Analyze and fix the following issue in the Linux kernel code: power: supply: ucs1002: fix error code in ucs1002_get_property() | Problem Details:
This function is supposed to return 0 for success instead of returning
the val->intval. This makes it the same as the other case statements
in this function.
Fixes: 81196e2e57fc ("power: supply: ucs1002: fix some health status issues")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: htt... | ```diff
diff --git a/drivers/power/supply/ucs1002_power.c b/drivers/power/supply/ucs1002_power.c
index 954feba6600b..7970843a4f48 100644
--- a/drivers/power/supply/ucs1002_power.c
+++ b/drivers/power/supply/ucs1002_power.c
@@ -384,7 +384,8 @@ static int ucs1002_get_property(struct power_supply *psy,
case POWER_SUPPLY... |
59bb1d698028d7f01650f9def579efdfdfb7039f | Analyze and fix the following issue in the Linux kernel code: ipv6: mcast: Remove redundant comparison in igmp6_mcf_get_next() | Problem Details:
The 'state->im' value will always be non-zero after
the 'while' statement, so the check can be removed.
Found by InfoTeCS on behalf of Linux Verification Center
(linuxtesting.org) with SVACE.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Reviewed-by... | ```diff
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 5ce25bcb9974..421264a69e97 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -3011,8 +3011,6 @@ static struct ip6_sf_list *igmp6_mcf_get_next(struct seq_file *seq, struct ip6_s
continue;
state->im = rcu_dereference(state->idev->mc_list);
}... |
f6007dce0cd35d634d9be91ef3515a6385dcee16 | Analyze and fix the following issue in the Linux kernel code: dm: fix a race condition in retrieve_deps | Problem Details:
There's a race condition in the multipath target when retrieve_deps
races with multipath_message calling dm_get_device and dm_put_device.
retrieve_deps walks the list of open devices without holding any lock
but multipath may add or remove devices to the list while it is
running. The end result may be ... | ```diff
diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h
index 0d93661f88d3..095b9b49aa82 100644
--- a/drivers/md/dm-core.h
+++ b/drivers/md/dm-core.h
@@ -214,6 +214,7 @@ struct dm_table {
/* a list of devices used by this table */
struct list_head devices;
+ struct rw_semaphore devices_lock;
/* event... |
642d1de63cea161c629afd2e82d9db5a1582ffea | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: ipc4-topology: Add deep buffer size to debug prints | Problem Details:
Print deep_buffer_dma_ms and dma_buffer_size for debug purpose.
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Si... | ```diff
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index f2a30cd31378..ef065e4c51cd 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -1726,9 +1726,14 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
SOF_IPC4_MIN_DMA_BUFFER_SIZE * copi... |
bb0216d4db9ecaa51af45d8504757becbe5c050d | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: sof-audio: Fix DSP core put imbalance on widget setup failure | Problem Details:
In case the widget setup fails we should only decrement the core usage
count if the sof_widget_free_unlocked() has not been called as part of
the error handling.
sof_widget_free_unlocked() calls snd_sof_dsp_core_put() and the additional
core_put will cause imbalance in core usage count.
Use the existin... | ```diff
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index e7ef77012c35..e5405f854a91 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -212,7 +212,8 @@ widget_free:
sof_widget_free_unlocked(sdev, swidget);
use_count_decremented = true;
core_put:
- snd_sof_dsp_core_put... |
6ba59c008f08e84b3c87be10f3391c9735e4f833 | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: ipc4-topology: fix wrong sizeof argument | Problem Details:
available_fmt is a pointer.
Fixes: 4fdef47a44d6 ("ASoC: SOF: ipc4-topology: Add new tokens for input/output pin format count")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart... | ```diff
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index f2a30cd31378..7cb63e6b24dc 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -231,7 +231,7 @@ static int sof_ipc4_get_audio_fmt(struct snd_soc_component *scomp,
ret = sof_update_ipc_object(scomp,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.