id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
83e8864fee26f63a7435e941b7c36a20fd6fe93e | Analyze and fix the following issue in the Linux kernel code: trace/blktrace: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc:... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 918a7d12df8f..5743be559415 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -320,8 +320,8 @@ static void blk_trace_free(struct request_queue *q, struct blk_trace *bt)
* under 'q->debugfs_dir', thus lookup and remove the... |
01542f651a9f58a9b176c3d3dc3eefbacee53b78 | Analyze and fix the following issue in the Linux kernel code: blk-mq: correct stale comment of .get_budget | Problem Details:
Commit 88022d7201e96 ("blk-mq: don't handle failure in .get_budget")
remove BLK_STS_RESOURCE return value and we only check if we can get
the budget from .get_budget() now.
Correct stale comment that ".get_budget() returns BLK_STS_NO_RESOURCE"
to ".get_budget() fails to get the budget".
Fixes: 88022d7... | ```diff
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index ae40cdb7a383..06b312c69114 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -81,7 +81,7 @@ dispatch:
/*
* Only SCSI implements .get_budget and .put_budget, and SCSI restarts
* its queue by itself in its completion handler, so we ... |
47df9ce95cd568d3f84218c4f65e9fbd4dfeda55 | Analyze and fix the following issue in the Linux kernel code: blk-mq: Fix potential io hung for shared sbitmap per tagset | Problem Details:
Commit f906a6a0f4268 ("blk-mq: improve tag waiting setup for non-shared
tags") mark restart for unshared tags for improvement. At that time,
tags is only shared betweens queues and we can check if tags is shared
by test BLK_MQ_F_TAG_SHARED.
Afterwards, commit 32bc15afed04b ("blk-mq: Facilitate a shared... | ```diff
diff --git a/block/blk-mq.c b/block/blk-mq.c
index fa12f4e9310b..3ac732368866 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1831,7 +1831,8 @@ static bool blk_mq_mark_tag_wait(struct blk_mq_hw_ctx *hctx,
wait_queue_entry_t *wait;
bool ret;
- if (!(hctx->flags & BLK_MQ_F_TAG_QUEUE_SHARED)) {
+ if (!(... |
98b99e9412d0cde8c7b442bf5efb09528a2ede8b | Analyze and fix the following issue in the Linux kernel code: blk-mq: wait on correct sbitmap_queue in blk_mq_mark_tag_wait | Problem Details:
For shared queues case, we will only wait on bitmap_tags if we fail to get
driver tag. However, rq could be from breserved_tags, then two problems
will occur:
1. io hung if no tag is currently allocated from bitmap_tags.
2. unnecessary wakeup when tag is freed to bitmap_tags while no tag is
freed to br... | ```diff
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 351f160bf691..fa12f4e9310b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1826,7 +1826,7 @@ static int blk_mq_dispatch_wake(wait_queue_entry_t *wait, unsigned mode,
static bool blk_mq_mark_tag_wait(struct blk_mq_hw_ctx *hctx,
struct request *rq)
{... |
c31e76bcc379182fe67a82c618493b7b8868c672 | Analyze and fix the following issue in the Linux kernel code: blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx | Problem Details:
Commit 97889f9ac24f8 ("blk-mq: remove synchronize_rcu() from
blk_mq_del_queue_tag_set()") remove handle of TAG_SHARED in restart,
then shared_hctx_restart counted for how many hardware queues are marked
for restart is removed too.
Remove the stale comment that we still count hardware queues need restar... | ```diff
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index 23d1a90fec42..ae40cdb7a383 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -19,8 +19,7 @@
#include "blk-wbt.h"
/*
- * Mark a hardware queue as needing a restart. For shared queues, maintain
- * a count of how many hardware queues... |
6ee858a3d3270a68902d66bb47c151a83622535c | Analyze and fix the following issue in the Linux kernel code: blk-mq: avoid sleep in blk_mq_alloc_request_hctx | Problem Details:
Commit 1f5bd336b9150 ("blk-mq: add blk_mq_alloc_request_hctx") add
blk_mq_alloc_request_hctx to send commands to a specific queue. If
BLK_MQ_REQ_NOWAIT is not set in tag allocation, we may change to different
hctx after sleep and get tag from unexpected hctx. So BLK_MQ_REQ_NOWAIT
must be set in flags f... | ```diff
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 9d463f7563bc..351f160bf691 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -658,7 +658,8 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q,
* allocator for this for the rare use case of a command tied to
* a specific queue.
*/
- ... |
28e538a3093833cbac3e28dd511a8b74629d737a | Analyze and fix the following issue in the Linux kernel code: blk-cgroup: fix freeing NULL blkg in blkg_create | Problem Details:
new_blkg can be NULL if the caller didn't pass in a pre-allocated blkg.
Don't try to free it in that case.
Fixes: 27b642b07a4a ("blk-cgroup: simplify blkg freeing from initialization failure paths")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: ... | ```diff
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 8faeca6022be..c46778d1f3c2 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -383,7 +383,8 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, struct gendisk *disk,
err_put_css:
css_put(&blkcg->css);
err_free_blkg:
- blkg_free(new_... |
aa4a86055b6fd76c414c3ab2af5a1dbd93dd6c93 | Analyze and fix the following issue in the Linux kernel code: mm/slub: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 13459c69095a..4880e461fcc5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -6449,7 +6449,7 @@ static void debugfs_slab_add(struct kmem_cache *s)
void debugfs_slab_release(struct kmem_cache *s)
{
- debugfs_remove_recursive(debugfs_lookup(s->name, slab_debugfs_root));
+ debu... |
2f2bb1ffc9983e227424d0787289da5483b0c74f | Analyze and fix the following issue in the Linux kernel code: io_uring: mark task TASK_RUNNING before handling resume/task work | Problem Details:
Just like for task_work, set the task mode to TASK_RUNNING before doing
any potential resume work. We're not holding any locks at this point,
but we may have already set the task state to TASK_INTERRUPTIBLE in
preparation for going to sleep waiting for events. Ensure that we set it
back to TASK_RUNNING... | ```diff
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index f90816aac896..2711865f1e19 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -281,8 +281,10 @@ static inline int io_run_task_work(void)
* notify work that needs processing.
*/
if (current->flags & PF_IO_WORKER &&
- test_thread_... |
941811980df00161fe639c252dabe6488875887c | Analyze and fix the following issue in the Linux kernel code: spi: spidev: Fix double unlock in spidev_sync() | Problem Details:
This unlocks twice due to a merge issue.
Fixes: 35bba23e6732 ("Merge remote-tracking branch 'spi/for-6.2' into spi-6.2")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/Y+ETCk7XKfAy8yWQ@kili
Signed-off-by: Mark Brown <broonie@kernel.org> | ```diff
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index f836567c631b..5a038c667401 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -115,8 +115,6 @@ spidev_sync(struct spidev_data *spidev, struct spi_message *message)
else
status = spidev_sync_unlocked(spi, message);
- mutex_unlock(... |
c24def73a2863a8292693ab49a83303213ef3f23 | Analyze and fix the following issue in the Linux kernel code: watchdog: diag288_wdt: get rid of register asm | Problem Details:
Using register asm statements has been proven to be very error prone,
especially when using code instrumentation where gcc may add function
calls, which clobbers register contents in an unexpected way.
Therefore, get rid of register asm statements in watchdog code, and make
sure this bug class cannot ... | ```diff
diff --git a/drivers/watchdog/diag288_wdt.c b/drivers/watchdog/diag288_wdt.c
index 6ca5d9515d85..07ebbb709af4 100644
--- a/drivers/watchdog/diag288_wdt.c
+++ b/drivers/watchdog/diag288_wdt.c
@@ -73,20 +73,19 @@ MODULE_ALIAS("vmwatchdog");
static int __diag288(unsigned int func, unsigned int timeout,
un... |
3f16ba1c0768de6cdc6f65105757ef04dbfd8e5c | Analyze and fix the following issue in the Linux kernel code: HID: use standard debug APIs | Problem Details:
The custom "debug" module parameter is fairly inflexible.
It can only manage debugging for all calls dbg_hid() at the same time.
Furthermore it creates a mismatch between calls to hid_dbg() which can
be managed by CONFIG_DYNAMIC_DEBUG and dbg_hid() which is managed by the
module parameter.
Furthermor... | ```diff
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8ff08e6c2b13..7e7ae20e29ff 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -41,11 +41,6 @@
#define DRIVER_DESC "HID core driver"
-int hid_debug = 0;
-module_param_named(debug, hid_debug, int, 0600);
-MODULE_PARM_DESC(deb... |
283861a4c52c1ea4df3dd1b6fc75a50796ce3524 | Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb4: Fix potential null-ptr-deref in pass_establish() | Problem Details:
If get_ep_from_tid() fails to lookup non-NULL value for ep, ep is
dereferenced later regardless of whether it is empty.
This patch adds a simple sanity check to fix the issue.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 944661dd97f4 ("RDMA/iw_cxgb4: atomically lookup ep a... | ```diff
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index ea3ddf0d2411..ced615b5ea09 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2676,6 +2676,9 @@ static int pass_establish(struct c4iw_dev *dev, struct sk_buff *skb)
u16 tcp_opt = ntohs(... |
db370a8b9f67ae5f17e3d5482493294467784504 | Analyze and fix the following issue in the Linux kernel code: rtmutex: Ensure that the top waiter is always woken up | Problem Details:
Let L1 and L2 be two spinlocks.
Let T1 be a task holding L1 and blocked on L2. T1, currently, is the top
waiter of L2.
Let T2 be the task holding L2.
Let T3 be a task trying to acquire L1.
The following events will lead to a state in which the wait queue of L2
isn't empty, but no task actually hold... | ```diff
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 010cf4e6d0b8..728f434de2bb 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -901,8 +901,9 @@ static int __sched rt_mutex_adjust_prio_chain(struct task_struct *task,
* then we need to wake the new top waiter up to t... |
828cf5936bea2438c21a3a6c303b34a2a1f6c3c2 | Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix MR cache debugfs error in IB representors mode | Problem Details:
Block MR cache debugfs creation for IB representor flow as MR cache shouldn't be used
at all in that mode. As part of this change, add missing debugfs cleanup in error path
too.
This change fixes the following debugfs errors:
bond0: (slave enp8s0f1): Enslaving as a backup interface with an up link
... | ```diff
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index c396b942d0c8..a9808e022b1f 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -845,6 +845,9 @@ static void mlx5_mkey_cache_debugfs_add_ent(struct mlx5_ib_dev *dev,
int order = order_base_2(e... |
44e4c5684fcc82d8f099656c4ea39d9571e2a8ac | Analyze and fix the following issue in the Linux kernel code: drm/i915: Initialize the obj flags for shmem objects | Problem Details:
Obj flags for shmem objects is not being set correctly. Fixes in setting
BO_ALLOC_USER flag which applies to shmem objs as well.
v2: Add fixes tag (Tvrtko, Matt A)
Fixes: 13d29c823738 ("drm/i915/ehl: unconditionally flush the pages on acquire")
Cc: <stable@vger.kernel.org> # v5.15+
Cc: Matthew Auld <... | ```diff
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
index 9c759df700ca..937728840428 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
@@ -579,7 +579,7 @@ static int shmem_object_init(struct intel_memory_region *... |
251e8c5b1b1fadcc387a8e618c7437d330bdac3e | Analyze and fix the following issue in the Linux kernel code: drm/i915: Move fd_install after last use of fence | Problem Details:
Because eb_composite_fence_create() drops the fence_array reference
after creation of the sync_file, only the sync_file holds a ref to the
fence. But fd_install() makes that reference visable to userspace, so
it must be the last thing we do with the fence.
Signed-off-by: Rob Clark <robdclark@chromium... | ```diff
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index f266b68cf012..0f2e056c02dd 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -3483,6 +3483,13 @@ err_request:
eb.composite_... |
039a72ce7e570c56713fe7758a0658034dc48c9b | Analyze and fix the following issue in the Linux kernel code: drm/i915/fbdev: Implement fb_dirty for intel custom fb helper | Problem Details:
After disconnecting damage worker from update logic it's left to fbdev
emulation implementation to have fb_dirty function. Currently intel
fbdev doesn't have it. This is causing problems to features (PSR, FBC,
DRRS) relying on dirty callback.
Implement simple fb_dirty callback to deliver notifications... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 5575d7abdc09..f76c06b7f1d4 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -328,8 +328,20 @@ out_unlock:
return ret;
}
+static int intelfb_d... |
90d5e8301ac24550be80d193aa5582cab56c29fc | Analyze and fix the following issue in the Linux kernel code: drm/i915: Don't do the WM0->WM1 copy w/a if WM1 is already enabled | Problem Details:
Due to a workaround we have to make sure the WM1 watermarks block/lines
values are sensible even when WM1 is disabled. To that end we copy those
values from WM0.
However since we now keep each wm level enabled on a per-plane basis
it doesn't seem necessary to do that copy when we already have an
enabl... | ```diff
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index e0766d1be966..11554645e6ee 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -1587,7 +1587,8 @@ skl_crtc_allocate_plane_ddb(struct intel_at... |
05f5504b161054bdce74eef5d9ff602bbebaeca8 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: Fix unsigned comparison with less than zero | Problem Details:
The val is defined as unsigned int type, if(val<0) is redundant, so
delete it.
sound/soc/codecs/idt821034.c:449 idt821034_kctrl_gain_put() warn: unsigned 'val' is never less than zero.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3947
Signed-... | ```diff
diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c
index 5d01787b1c1f..2cc7b9166e69 100644
--- a/sound/soc/codecs/idt821034.c
+++ b/sound/soc/codecs/idt821034.c
@@ -446,8 +446,6 @@ static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol,
u8 ch;
val = ucontrol->value.integer... |
983272a2a223de59dbb4cb189aa4d02d7156d209 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: aw88395: initialize cur_scene_id to 0 | Problem Details:
cppcheck reports
sound/soc/codecs/aw88395/aw88395_lib.c:789:6: error: Uninitialized variable: cur_scene_id [uninitvar]
if (cur_scene_id == 0) {
^
Passing a garbage value to aw_dev_parse_data_by_sec_type_v1() will cause a crash
when the value is used as an array index. This check assumes cur_sce... | ```diff
diff --git a/sound/soc/codecs/aw88395/aw88395_lib.c b/sound/soc/codecs/aw88395/aw88395_lib.c
index 64dde972f3f0..d7c31a202adc 100644
--- a/sound/soc/codecs/aw88395/aw88395_lib.c
+++ b/sound/soc/codecs/aw88395/aw88395_lib.c
@@ -769,7 +769,7 @@ static int aw_dev_parse_dev_type_v1(struct aw_device *aw_dev,
{
st... |
fe1e7e8ce2c47bd8fd9885eab63fca0a522e94c9 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: es8326: Fix DTS properties reading | Problem Details:
Seems like properties parsing and reading was copy-pasted,
so "everest,interrupt-src" and "everest,interrupt-clk" are saved into
the es8326->jack_pol variable. This might lead to wrong settings
being saved into the reg 57 (ES8326_HP_DET).
Fix this by using proper variables while reading properties.
S... | ```diff
diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index 9ddf6a35e91c..28a0565c2a95 100755
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -729,14 +729,16 @@ static int es8326_probe(struct snd_soc_component *component)
}
dev_dbg(component->dev, "jack-pol %x", es8326->jack_... |
e0576cd642ced1ac65370b4516b7be9f536a0498 | Analyze and fix the following issue in the Linux kernel code: ASoC: tas5805m: add missing page switch. | Problem Details:
In tas5805m_refresh, we switch pages to update the DSP volume control,
but we need to switch back to page 0 before trying to alter the
soft-mute control. This latter page-switch was missing.
Fixes: ec45268467f4 ("ASoC: add support for TAS5805M digital amplifier")
Signed-off-by: Daniel Beer <daniel.bee... | ```diff
diff --git a/sound/soc/codecs/tas5805m.c b/sound/soc/codecs/tas5805m.c
index 6e2edf045446..4e38eb7acea1 100644
--- a/sound/soc/codecs/tas5805m.c
+++ b/sound/soc/codecs/tas5805m.c
@@ -203,6 +203,9 @@ static void tas5805m_refresh(struct tas5805m_priv *tas5805m)
set_dsp_scale(rm, 0x24, tas5805m->vol[0]);
set_d... |
147323792693bf013f60dca160be1d32bd4d180a | Analyze and fix the following issue in the Linux kernel code: ASoC: tas5805m: rework to avoid scheduling while atomic. | Problem Details:
There's some setup we need to do in order to get the DSP initialized,
and this can't be done until a bit-clock is ready. In an earlier version
of this driver, this work was done in a DAPM callback.
The DAPM callback doesn't guarantee that the bit-clock is running, so
the work was moved instead to the ... | ```diff
diff --git a/sound/soc/codecs/tas5805m.c b/sound/soc/codecs/tas5805m.c
index beb4ec629a03..6e2edf045446 100644
--- a/sound/soc/codecs/tas5805m.c
+++ b/sound/soc/codecs/tas5805m.c
@@ -154,6 +154,7 @@ static const uint32_t tas5805m_volume[] = {
#define TAS5805M_VOLUME_MIN 0
struct tas5805m_priv {
+ struct i2c... |
0349c41b05968befaffa5fbb7e73d0ee6004f610 | Analyze and fix the following issue in the Linux kernel code: drm/i915/hwmon: Enable PL1 power limit | Problem Details:
Previous documentation suggested that PL1 power limit is always
enabled. However we now find this not to be the case on some
platforms (such as ATSM). Therefore enable PL1 power limit during hwmon
initialization.
Bspec: 51864
v2: Add Bspec reference (Gwan-gyeong)
v3: Add Fixes tag
Fixes: 99f55efb791... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
index 1225bc432f0d..4683a5b96eff 100644
--- a/drivers/gpu/drm/i915/i915_hwmon.c
+++ b/drivers/gpu/drm/i915/i915_hwmon.c
@@ -687,6 +687,11 @@ hwm_get_preregistration_info(struct drm_i915_private *i915)
for_each_gt(gt, i915, i)
... |
47731fd2865fcbcd0b9cdbe90fcd6583c9559631 | Analyze and fix the following issue in the Linux kernel code: platform/x86/intel: Intel TPMI enumeration driver | Problem Details:
The TPMI (Topology Aware Register and PM Capsule Interface) provides a
flexible, extendable and PCIe enumerable MMIO interface for PM features.
For example Intel RAPL (Running Average Power Limit) provides a MMIO
interface using TPMI. This has advantage over traditional MSR
(Model Specific Register) i... | ```diff
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index d5a33473e838..bbbd9e54e9ee 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -182,6 +182,19 @@ config INTEL_SMARTCONNECT
This driver checks to determine whether the device has... |
65a8fc30fb6722fc25adec6d7dd5b53b0bb85820 | Analyze and fix the following issue in the Linux kernel code: RDMA/siw: Fix user page pinning accounting | Problem Details:
To avoid racing with other user memory reservations, immediately
account full amount of pages to be pinned.
Fixes: 2251334dcac9 ("rdma/siw: application buffer management")
Reported-by: Jason Gunthorpe <jgg@nvidia.com>
Suggested-by: Alistair Popple <apopple@nvidia.com>
Reviewed-by: Alistair Popple <apo... | ```diff
diff --git a/drivers/infiniband/sw/siw/siw_mem.c b/drivers/infiniband/sw/siw/siw_mem.c
index b2b33dd3b4fa..f51ab2ccf151 100644
--- a/drivers/infiniband/sw/siw/siw_mem.c
+++ b/drivers/infiniband/sw/siw/siw_mem.c
@@ -398,7 +398,7 @@ struct siw_umem *siw_umem_get(u64 start, u64 len, bool writable)
mlock_limit ... |
7a6952fa0366d4408eb8695af1a0578c39ec718a | Analyze and fix the following issue in the Linux kernel code: USB: gadget: pxa27x_udc: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.... | ```diff
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index ac980d6a4740..0ecdfd2ba9e9 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -215,7 +215,7 @@ static void pxa_init_debugfs(struct pxa_udc *udc)
static void pxa_cleanup_debu... |
7a038a681b7df78362d9fc7013e5395a694a9d3a | Analyze and fix the following issue in the Linux kernel code: USB: gadget: pxa25x_udc: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.... | ```diff
diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index c593fc383481..9e01ddf2b417 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -1340,7 +1340,7 @@ DEFINE_SHOW_ATTRIBUTE(udc_debug);
debugfs_create_file(dev->gadget.name, \
... |
e3965acaf3739fde9d74ad82979b46d37c6c208f | Analyze and fix the following issue in the Linux kernel code: USB: gadget: lpc32xx_udc: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Jakob Koschel <jakobkoschel@gmail.com>
Cc: Miaoqian Lin <linmq006@gmail.c... | ```diff
diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c
index cea10cdb83ae..fe62db32dd0e 100644
--- a/drivers/usb/gadget/udc/lpc32xx_udc.c
+++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
@@ -532,7 +532,7 @@ static void create_debug_file(struct lpc32xx_udc *udc)
static void remove_... |
a91c99b1fe5c6f7e52fb932ad9e57ec7cfe913ec | Analyze and fix the following issue in the Linux kernel code: USB: gadget: bcm63xx_udc: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Kevin Cernekee <cernekee@gmail.com>
Link: https://lore.kernel.org/r/20230... | ```diff
diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index c03afd354797..a3055dd4acfb 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -2253,7 +2253,7 @@ static void bcm63xx_udc_init_debugfs(struct bcm63xx_udc *udc)
*/
static ... |
73f4451368663ad28daa67980c6dd11d83b303eb | Analyze and fix the following issue in the Linux kernel code: USB: gadget: gr_udc: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Jakob Koschel <jakobkoschel@gmail.com>
Link: https://lore.kernel.org/r/20... | ```diff
diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c
index 85cdc0af3bf9..09762559912d 100644
--- a/drivers/usb/gadget/udc/gr_udc.c
+++ b/drivers/usb/gadget/udc/gr_udc.c
@@ -215,7 +215,7 @@ static void gr_dfs_create(struct gr_udc *dev)
static void gr_dfs_delete(struct gr_udc *dev)
{... |
c26e682afc14caa87d44beed271eec8991e93c65 | Analyze and fix the following issue in the Linux kernel code: USB: isp1362: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.or... | ```diff
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 0e14d1d07709..b0da143ef4be 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2170,7 +2170,7 @@ static void create_debug_file(struct isp1362_hcd *isp1362_hcd)
static void remove_debug_file(str... |
a95f62d5813facbec20ec087472eb313ee5fa8af | Analyze and fix the following issue in the Linux kernel code: USB: isp116x: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Olav Kongas <ok@artecdesign.ee>
Link: https://lore.kernel.org/r/202302021... | ```diff
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 4f564d71bb0b..49ae01487af4 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1205,7 +1205,7 @@ static void create_debug_file(struct isp116x *isp116x)
static void remove_debug_file(struct isp1... |
6b4040f452037a7e95472577891d57c6b18c89c5 | Analyze and fix the following issue in the Linux kernel code: USB: fotg210: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kern... | ```diff
diff --git a/drivers/usb/fotg210/fotg210-hcd.c b/drivers/usb/fotg210/fotg210-hcd.c
index 613d29f04bcb..929106c16b29 100644
--- a/drivers/usb/fotg210/fotg210-hcd.c
+++ b/drivers/usb/fotg210/fotg210-hcd.c
@@ -861,7 +861,7 @@ static inline void remove_debug_files(struct fotg210_hcd *fotg210)
{
struct usb_bus *b... |
e1523c4dbc54e164638ff8729d511cf91e27be04 | Analyze and fix the following issue in the Linux kernel code: USB: sl811: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.or... | ```diff
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index d206bd95c7bb..b8b90eec9107 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1501,7 +1501,7 @@ static void create_debug_file(struct sl811 *sl811)
static void remove_debug_file(struct sl811 *sl811)
{... |
0a3f82c79c86278e7f144564b1cb6cc5c3657144 | Analyze and fix the following issue in the Linux kernel code: USB: uhci: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20... | ```diff
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index c22b51af83fc..7cdc2fa7c28f 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -536,8 +536,8 @@ static void release_uhci(struct uhci_hcd *uhci)
uhci->is_initialized = 0;
spin_unlock_irq(&uhci->lock);
- d... |
8f4d25eba599c4bd4b5ea8ae8752cda480a9d563 | Analyze and fix the following issue in the Linux kernel code: USB: ULPI: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lor... | ```diff
diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index d7c8461976ce..38703781ee2d 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -271,7 +271,7 @@ static int ulpi_regs_show(struct seq_file *seq, void *data)
}
DEFINE_SHOW_ATTRIBUTE(ulpi_regs);
-#define ULPI_ROOT de... |
ff35f3ea3baba5b81416ac02d005cfbf6dd182fa | Analyze and fix the following issue in the Linux kernel code: USB: chipidea: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/202302... | ```diff
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index faf6b078b6c4..bbc610e5bd69 100644
--- a/drivers/usb/chipidea/debug.c
+++ b/drivers/usb/chipidea/debug.c
@@ -364,5 +364,5 @@ void dbg_create_files(struct ci_hdrc *ci)
*/
void dbg_remove_files(struct ci_hdrc *ci)
{
- debugfs_remove... |
93fd565919cf897adf7e1da81cace1a46e4db7f4 | Analyze and fix the following issue in the Linux kernel code: net: USB: Fix wrong-direction WARNING in plusb.c | Problem Details:
The syzbot fuzzer detected a bug in the plusb network driver: A
zero-length control-OUT transfer was treated as a read instead of a
write. In modern kernels this error provokes a WARNING:
usb 1-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType c0
WARNING: CPU: 0 PID: 4645 at drivers/usb/... | ```diff
diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c
index 2c82fbcaab22..7a2b0094de51 100644
--- a/drivers/net/usb/plusb.c
+++ b/drivers/net/usb/plusb.c
@@ -57,9 +57,7 @@
static inline int
pl_vendor_req(struct usbnet *dev, u8 req, u8 val, u8 index)
{
- return usbnet_read_cmd(dev, req,
- USB_DIR_... |
be308d68785b205e483b3a0c61ba3a82da468f2c | Analyze and fix the following issue in the Linux kernel code: USB: dwc3: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Note, the root dentry for the debugfs directory for the device needs to
be sa... | ```diff
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 8f9959ba9fd4..582ebd9cf9c2 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -1117,6 +1117,7 @@ struct dwc3_scratchpad_array {
* address.
* @num_ep_resized: carries the current number endpoints which have had its ... |
25746a3fa2dad79a6dfc42522b5bb38b4bdec844 | Analyze and fix the following issue in the Linux kernel code: drm/i915: fix up merge with usb-next branch | Problem Details:
In the manual fixup of the list_count_nodes() logic in
drivers/gpu/drm/i915/gt/intel_execlists_submission.c in the usb-next
branch, I missed that the print modifier was incorrect, resulting in
loads of build warnings on 32bit systems.
Fix this up by using "%su" instead of "%lu".
Reported-by: kernel t... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index 178ff20648c5..ee71cde2ffc6 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -4158,7 +4158,7 @@ void intel_... |
7ff6edf4fef38ab404ee7861f257e28eaaeed35f | Analyze and fix the following issue in the Linux kernel code: x86/microcode/AMD: Fix mixed steppings support | Problem Details:
The AMD side of the loader has always claimed to support mixed
steppings. But somewhere along the way, it broke that by assuming that
the cached patch blob is a single one instead of it being one per
*node*.
So turn it into a per-node one so that each node can stash the blob
relevant for it.
[ NB: ... | ```diff
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 1023be6a6954..9eb457b10341 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -55,7 +55,9 @@ struct cont_desc {
};
static u32 ucode_new_rev;
-static u8 amd_ucode_patch[PATC... |
84549c816dc317f012798e706e58669b3b013604 | Analyze and fix the following issue in the Linux kernel code: mtd: parsers: ofpart: add workaround for #size-cells 0 | Problem Details:
Add a mechanism to handle the case in which partitions are present as
direct child of the nand controller node and #size-cells is set to <0>.
This could happen if the nand-controller node in the DTS is supposed to
have #size-cells set to 0, but for some historical reason/bug it was set
to 1 in the pas... | ```diff
diff --git a/drivers/mtd/parsers/ofpart_core.c b/drivers/mtd/parsers/ofpart_core.c
index 192190c42fc8..e7b8e9d0a910 100644
--- a/drivers/mtd/parsers/ofpart_core.c
+++ b/drivers/mtd/parsers/ofpart_core.c
@@ -122,6 +122,25 @@ static int parse_fixed_partitions(struct mtd_info *master,
a_cells = of_n_addr_cell... |
3998a4611e8be2e9b5833e7aae29619ea0305437 | Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: sunxi: Update OOB layout to match hardware | Problem Details:
When using the hardware ECC engine, the OOB data is made available in
the NFC_REG_USER_DATA registers, as one 32-bit word per ECC step. Any
additional bytes are only accessible through raw reads and software
descrambling. For efficiency, and to match the vendor driver, ignore
these extra bytes when usi... | ```diff
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index e673ac46f2e8..3c32d31f20aa 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -1604,6 +1604,13 @@ static int sunxi_nand_ooblayout_free(struct mtd_info *mtd, int section,
return 0;
... |
5921b250f43870e7d8044ca14e402292ceb3e3a8 | Analyze and fix the following issue in the Linux kernel code: pinctrl: qcom: sm8450-lpass-lpi: correct swr_rx_data group | Problem Details:
According to hardware programming guide, the swr_rx_data pin group has
only two pins (GPIO5 and GPIO6). This is also visible in "struct
sm8450_groups" in the driver - GPIO15 does not have swr_rx_data
function.
Fixes: ec1652fc4d56 ("pinctrl: qcom: Add sm8450 lpass lpi pinctrl driver")
Cc: <stable@vger... | ```diff
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c
index c3c8c34148f1..e22d03ce292e 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c
@@ -105,7 +105,7 @@ static const struct pinctrl_pin_d... |
1c4e5c470a56f7f7c649c0c70e603abc1eab15c4 | Analyze and fix the following issue in the Linux kernel code: pinctrl: at91: use devm_kasprintf() to avoid potential leaks | Problem Details:
Use devm_kasprintf() instead of kasprintf() to avoid any potential
leaks. At the moment drivers have no remove functionality thus
there is no need for fixes tag.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230203132714.1931596-1-claudiu.beznea@microch... | ```diff
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 39b233f73e13..373eed8bc4be 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -1149,8 +1149,8 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
pin_desc[i].n... |
fde789e8339c60c8c58e5a71fa819fcfe52d839e | Analyze and fix the following issue in the Linux kernel code: drm/i915/ttm: fix sparse warning | Problem Details:
Sparse complains with:
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse:
expected restricted vm_fault_t [assigned] [usertype] ret
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int
Fixes: 516198d317d8 ("drm/i915: audit bo->resource usage v3")
Reported-by: kernel test robot <lkp@... | ```diff
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index 7420276827a5..4758f21c91e1 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -1067,11 +1067,12 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
.int... |
97e45d469eb180a7bd2809e4e079331552c73e42 | Analyze and fix the following issue in the Linux kernel code: powerpc/kexec_file: fix implicit decl error | Problem Details:
kexec (PPC64) code calls memory_hotplug_max(). Add the header
declaration for it from <asm/mmzone.h>. Using <linux/mmzone.h> does not
work since the #include for <asm/mmzone.h> depends on CONFIG_NUMA=y,
which is not always set.
Fixes this build error/warning:
arch/powerpc/kexec/file_load_64.c: In f... | ```diff
diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c
index 52085751f5f4..9be3e818a240 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -26,6 +26,7 @@
#include <asm/firmware.h>
#include <asm/kexec_ranges.h>
#include <asm/crashdump-ppc64.h>... |
563ca0e9eab8acc8a1309e8b440108ff8d23e951 | Analyze and fix the following issue in the Linux kernel code: RDMA/mana_ib: Prevent array underflow in mana_ib_create_qp_raw() | Problem Details:
The "port" comes from the user and if it is zero then the:
ndev = mc->ports[port - 1];
assignment does an out of bounds read. I have changed the if
statement to fix this and to mirror how it is done in
mana_ib_create_qp_rss().
Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Ne... | ```diff
diff --git a/drivers/infiniband/hw/mana/qp.c b/drivers/infiniband/hw/mana/qp.c
index ea15ec77e321..54b61930a7fd 100644
--- a/drivers/infiniband/hw/mana/qp.c
+++ b/drivers/infiniband/hw/mana/qp.c
@@ -289,7 +289,7 @@ static int mana_ib_create_qp_raw(struct ib_qp *ibqp, struct ib_pd *ibpd,
/* IB ports start wi... |
66b2c338adce580dfce2199591e65e2bab889cff | Analyze and fix the following issue in the Linux kernel code: tap: tap_open(): correctly initialize socket uid | Problem Details:
sock_init_data() assumes that the `struct socket` passed in input is
contained in a `struct socket_alloc` allocated with sock_alloc().
However, tap_open() passes a `struct socket` embedded in a `struct
tap_queue` allocated with sk_alloc().
This causes a type confusion when issuing a container_of() with... | ```diff
diff --git a/drivers/net/tap.c b/drivers/net/tap.c
index a2be1994b389..8941aa199ea3 100644
--- a/drivers/net/tap.c
+++ b/drivers/net/tap.c
@@ -533,7 +533,7 @@ static int tap_open(struct inode *inode, struct file *file)
q->sock.state = SS_CONNECTED;
q->sock.file = file;
q->sock.ops = &tap_socket_ops;
- soc... |
a096ccca6e503a5c575717ff8a36ace27510ab0a | Analyze and fix the following issue in the Linux kernel code: tun: tun_chr_open(): correctly initialize socket uid | Problem Details:
sock_init_data() assumes that the `struct socket` passed in input is
contained in a `struct socket_alloc` allocated with sock_alloc().
However, tun_chr_open() passes a `struct socket` embedded in a `struct
tun_file` allocated with sk_alloc().
This causes a type confusion when issuing a container_of() w... | ```diff
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index a7d17c680f4a..745131b2d6db 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -3448,7 +3448,7 @@ static int tun_chr_open(struct inode *inode, struct file * file)
tfile->socket.file = file;
tfile->socket.ops = &tun_socket_ops;
- sock_init_data... |
584f3742890e966d2f0a1f3c418c9ead70b2d99e | Analyze and fix the following issue in the Linux kernel code: net: add sock_init_data_uid() | Problem Details:
Add sock_init_data_uid() to explicitly initialize the socket uid.
To initialise the socket uid, sock_init_data() assumes a the struct
socket* sock is always embedded in a struct socket_alloc, used to
access the corresponding inode uid. This may not be true.
Examples are sockets created in tun_chr_open(... | ```diff
diff --git a/include/net/sock.h b/include/net/sock.h
index dcd72e6285b2..937e842dc930 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1956,7 +1956,12 @@ void sk_common_release(struct sock *sk);
* Default socket callbacks and setup code
*/
-/* Initialise core socket variables */
+/* Initialise... |
6bddf115d0baed3095339024d942d7d1b5e7e4d6 | Analyze and fix the following issue in the Linux kernel code: s390/boot: avoid potential amode31 truncation | Problem Details:
Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled")
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> | ```diff
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index e7e2de386e24..f5a7545d3c13 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -271,7 +271,7 @@ static void offset_vmlinux_info(unsigned long offset)
static unsigned long reserve_amode31(unsigned long safe_addr)
{
__a... |
d1725ca60e8ff7aef3573d29231251c2838ca532 | Analyze and fix the following issue in the Linux kernel code: s390/boot: move detect_facilities() after cmd line parsing | Problem Details:
Facilities setup has to be done after "facilities" command line option
parsing, it might set extra or remove existing facilities bits for
testing purposes.
Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled")
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbi... | ```diff
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index 89beb31e982a..e7e2de386e24 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -283,8 +283,6 @@ void startup_kernel(void)
void *img;
psw_t psw;
- detect_facilities();
-
initrd_data.start = parmarea.initrd_start;
... |
8382c963249dafcbe809dea307c2de16d5645579 | Analyze and fix the following issue in the Linux kernel code: s390/boot: avoid page tables memory in kaslr | Problem Details:
If kernel is build without KASAN support there is a chance that kernel
image is going to be positioned by KASLR code to overlap with identity
mapping page tables.
When kernel is build with KASAN support enabled memory which
is potentially going to be used for page tables and KASAN
shadow mapping is ac... | ```diff
diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h
index e91bbb004efb..ed85b144119a 100644
--- a/arch/s390/boot/boot.h
+++ b/arch/s390/boot/boot.h
@@ -46,6 +46,7 @@ void sclp_early_setup_buffer(void);
void print_pgm_check_info(void);
unsigned long get_random_base(unsigned long safe_addr);
void setup_... |
22476f47b6b7fb7d066c71f67ebc11892adb0849 | Analyze and fix the following issue in the Linux kernel code: s390/boot: fix mem_detect extended area allocation | Problem Details:
Allocation of mem_detect extended area was not considered neither
in commit 9641b8cc733f ("s390/ipl: read IPL report at early boot")
nor in commit b2d24b97b2a9 ("s390/kernel: add support for kernel address
space layout randomization (KASLR)"). As a result mem_detect extended
theoretically may overlap w... | ```diff
diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h
index 830cfabaa6a0..939d27da8fbd 100644
--- a/arch/s390/boot/boot.h
+++ b/arch/s390/boot/boot.h
@@ -33,10 +33,10 @@ struct vmlinux_info {
};
void startup_kernel(void);
-unsigned long detect_memory(void);
+unsigned long detect_memory(unsigned long *s... |
18e5cb7a5ce30d0fd28c94551509afe43b100118 | Analyze and fix the following issue in the Linux kernel code: s390/diag: make __diag8c_tmp_amode31 static | Problem Details:
Get rid of this sparse warning:
arch/s390/kernel/diag.c:69:29: warning: symbol '__diag8c_tmp_amode31' was not declared. Should it be static?
Fixes: fbaee7464fbb ("s390/tty3270: add support for diag 8c")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> | ```diff
diff --git a/arch/s390/kernel/diag.c b/arch/s390/kernel/diag.c
index a6a0222a35cf..82079f2d8583 100644
--- a/arch/s390/kernel/diag.c
+++ b/arch/s390/kernel/diag.c
@@ -66,7 +66,7 @@ static struct diag210 _diag210_tmp_amode31 __section(".amode31.data");
struct diag210 __amode31_ref *__diag210_tmp_amode31 = &_dia... |
1e2eb49bb14760cc7ec0c301c705410628bee8e9 | Analyze and fix the following issue in the Linux kernel code: s390/rethook: add local rethook header file | Problem Details:
Compiling the kernel with CONFIG_KPROBES disabled, but CONFIG_RETHOOK
enabled, results in this sparse warning:
arch/s390/kernel/rethook.c:26:15: warning: no previous prototype for 'arch_rethook_trampoline_callback' [-Wmissing-prototypes]
26 | unsigned long arch_rethook_trampoline_callback(struct p... | ```diff
diff --git a/arch/s390/include/asm/kprobes.h b/arch/s390/include/asm/kprobes.h
index 6af75857156b..83f732ca3af4 100644
--- a/arch/s390/include/asm/kprobes.h
+++ b/arch/s390/include/asm/kprobes.h
@@ -70,7 +70,6 @@ struct kprobe_ctlblk {
};
void arch_remove_kprobe(struct kprobe *p);
-unsigned long arch_rethoo... |
fb9293b9f32d01ee491606a3655054d539b89f66 | Analyze and fix the following issue in the Linux kernel code: s390/vmem: remove unnecessary KASAN checks | Problem Details:
Kasan shadow memory area has been moved to the end of kernel address
space since commit 9a39abb7c9aa ("s390/boot: simplify and fix kernel
memory layout setup"), therefore skipping any memory ranges above
VMALLOC_START in empty page tables cleanup code already handles
KASAN shadow memory intersection ca... | ```diff
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 10bf5fcbb508..4113a7ffa149 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -297,10 +297,7 @@ static void try_free_pmd_table(pud_t *pud, unsigned long start)
/* Don't mess with any tables not fully in 1:1 mapping & vmemmap area */
if ... |
108303b0a2d27cb14eed565e33e64ad9eefe5d7e | Analyze and fix the following issue in the Linux kernel code: s390/vmem: fix empty page tables cleanup under KASAN | Problem Details:
Commit b9ff81003cf1 ("s390/vmem: cleanup empty page tables") introduced
empty page tables cleanup in vmem code, but when the kernel is built
with KASAN enabled the code has no effect due to wrong KASAN shadow
memory intersection condition, which effectively ignores any memory
range below KASAN shadow. ... | ```diff
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 15daf777cf41..10bf5fcbb508 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -298,7 +298,7 @@ static void try_free_pmd_table(pud_t *pud, unsigned long start)
if (end > VMALLOC_START)
return;
#ifdef CONFIG_KASAN
- if (start < KASAN_SH... |
dfca37d36b746a066bf4d62bce3276c7639d8f09 | Analyze and fix the following issue in the Linux kernel code: s390/kasan: update kasan memory layout note | Problem Details:
Kasan shadow memory area has been moved to the end of kernel address
space since commit 9a39abb7c9aa ("s390/boot: simplify and fix kernel
memory layout setup"). Change kasan memory layout note accordingly.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.... | ```diff
diff --git a/arch/s390/mm/kasan_init.c b/arch/s390/mm/kasan_init.c
index bdfbe0dcb7c6..9d4f3138b0e7 100644
--- a/arch/s390/mm/kasan_init.c
+++ b/arch/s390/mm/kasan_init.c
@@ -271,38 +271,34 @@ void __init kasan_early_init(void)
}
/*
* Current memory layout:
- * +- 0 -------------+ +- shadow start -+
... |
3400c35a4090704e6c465449616ab7e67a9209e7 | Analyze and fix the following issue in the Linux kernel code: s390/mem_detect: fix detect_memory() error handling | Problem Details:
Currently if for some reason sclp_early_read_info() fails,
sclp_early_get_memsize() will not set max_physmem_end and it
will stay uninitialized. Any garbage value other than 0 will lead
to detect_memory() taking wrong path or returning a garbage value
as max_physmem_end. To avoid that simply initialize... | ```diff
diff --git a/arch/s390/boot/mem_detect.c b/arch/s390/boot/mem_detect.c
index 7fa1a32ea0f3..0a5821ef4f1f 100644
--- a/arch/s390/boot/mem_detect.c
+++ b/arch/s390/boot/mem_detect.c
@@ -165,7 +165,7 @@ static void search_mem_end(void)
unsigned long detect_memory(void)
{
- unsigned long max_physmem_end;
+ unsig... |
6bb361d5d8eb1dbc9e0b190eeee27a2ac4d1119f | Analyze and fix the following issue in the Linux kernel code: s390/ipl: add loadparm parameter to eckd ipl/reipl data | Problem Details:
commit 87fd22e0ae92 ("s390/ipl: add eckd support") missed to add the
loadparm attribute to the new eckd ipl/reipl data.
Fixes: 87fd22e0ae92 ("s390/ipl: add eckd support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Sig... | ```diff
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index d7b433261145..5f0f5c86963a 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -593,6 +593,7 @@ static struct attribute *ipl_eckd_attrs[] = {
&sys_ipl_type_attr.attr,
&sys_ipl_eckd_bootprog_attr.attr,
&sys_ipl_eckd_br_chr_a... |
c676aac66f5b2b03a1090bc6b1891486255f7159 | Analyze and fix the following issue in the Linux kernel code: s390/ipl: add DEFINE_GENERIC_LOADPARM() | Problem Details:
In the current code each reipl type implements its own pair of loadparm
show/store functions. Add a macro to deduplicate the code a bit.
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Fixes: 87fd22e0ae92 ("s390/ipl: add eckd support")
Cc: <stable@vge... | ```diff
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 406766c894fb..d7b433261145 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -888,23 +888,26 @@ static ssize_t reipl_generic_loadparm_store(struct ipl_parameter_block *ipb,
return len;
}
-/* FCP wrapper */
-static ssize_t ... |
d7045f520a74eac28d54fa96cc020c5344baea98 | Analyze and fix the following issue in the Linux kernel code: net/sched: mqprio: allow reverse TC:TXQ mappings | Problem Details:
By imposing that the last TXQ of TC i is smaller than the first TXQ of
any TC j (j := i+1 .. n), mqprio imposes a strict ordering condition for
the TXQ indices (they must increase as TCs increase).
Claudiu points out that the complexity of the TXQ count validation is
too high for this logic, i.e. inst... | ```diff
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c
index 3579a64da06e..25ab215641a2 100644
--- a/net/sched/sch_mqprio.c
+++ b/net/sched/sch_mqprio.c
@@ -27,6 +27,14 @@ struct mqprio_sched {
u64 max_rate[TC_QOPT_MAX_QUEUE];
};
+/* Returns true if the intervals [a, b) and [c, d) overlap. */
+static... |
8437114593910e0ac7a333775a9477e69c25cf75 | Analyze and fix the following issue in the Linux kernel code: gve: Fix gve interrupt names | Problem Details:
IRQs are currently requested before the netdevice is registered
and a proper name is assigned to the device. Changing interrupt
name to avoid using the format string in the name.
Interrupt name before change: eth%d-ntfy-block.<blk_id>
Interrupt name after change: gve-ntfy-blk<blk_id>@pci:<pci_name>
S... | ```diff
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 5b40f9c53196..07111c241e0e 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -327,7 +327,6 @@ static int gve_napi_poll_dqo(struct napi_struct *napi... |
7bcfdab3f0c6672ca52be3cb65a0550d8b99554b | Analyze and fix the following issue in the Linux kernel code: HID: amd_sfh: if no sensors are enabled, clean up | Problem Details:
It was reported that commit b300667b33b2 ("HID: amd_sfh: Disable the
interrupt for all command") had caused increased resume time on HP Envy
x360.
Before this commit 3 sensors were reported, but they were not actually
functional. After this commit the sensors are no longer reported, but
also the resu... | ```diff
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_client.c b/drivers/hid/amd-sfh-hid/amd_sfh_client.c
index 1fb0f7105fb2..c751d12f5df8 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_client.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_client.c
@@ -227,6 +227,7 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
c... |
811d581194f7412eda97acc03d17fc77824b561f | Analyze and fix the following issue in the Linux kernel code: net: USB: Fix wrong-direction WARNING in plusb.c | Problem Details:
The syzbot fuzzer detected a bug in the plusb network driver: A
zero-length control-OUT transfer was treated as a read instead of a
write. In modern kernels this error provokes a WARNING:
usb 1-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType c0
WARNING: CPU: 0 PID: 4645 at drivers/usb/... | ```diff
diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c
index 2c82fbcaab22..7a2b0094de51 100644
--- a/drivers/net/usb/plusb.c
+++ b/drivers/net/usb/plusb.c
@@ -57,9 +57,7 @@
static inline int
pl_vendor_req(struct usbnet *dev, u8 req, u8 val, u8 index)
{
- return usbnet_read_cmd(dev, req,
- USB_DIR_... |
690eb7dec72ae52d1d710d14a451844b4d0f4f19 | Analyze and fix the following issue in the Linux kernel code: HID: logitech: Disable hi-res scrolling on USB | Problem Details:
On some Logitech mice, such as the G903, and possibly the G403, the HID
events are generated on a different interface to the HID++ one.
If we enable hi-res through the HID++ interface, the HID interface
wouldn't know anything about it, and handle the events as if they were
regular scroll events, makin... | ```diff
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index abf2c95e4d0b..9c1ee8e91e0c 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -3978,7 +3978,8 @@ static void hidpp_connect_event(struct hidpp_device *hidpp)
}
hidpp_initialize_batter... |
ea427a222d8bdf2bc1a8a6da3ebe247f7dced70c | Analyze and fix the following issue in the Linux kernel code: HID: core: Fix deadloop in hid_apply_multiplier. | Problem Details:
The initial value of hid->collection[].parent_idx if 0. When
Report descriptor doesn't contain "HID Collection", the value
remains as 0.
In the meanwhile, when the Report descriptor fullfill
all following conditions, it will trigger hid_apply_multiplier
function call.
1. Usage page is Generic Desktop ... | ```diff
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 3e1803592bd4..5c72aef3d3dd 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1202,6 +1202,7 @@ int hid_open_report(struct hid_device *device)
__u8 *end;
__u8 *next;
int ret;
+ int i;
static int (*dispatch_type[])(struc... |
9dde0cd3b10f63bc4100ebadc7e32275baabfa68 | Analyze and fix the following issue in the Linux kernel code: net: introduce skb_poison_list and use in kfree_skb_list | Problem Details:
First user of skb_poison_list is in kfree_skb_list_reason, to catch bugs
earlier like introduced in commit eedade12f4cb ("net: kfree_skb_list use
kmem_cache_free_bulk"). For completeness mentioned bug have been fixed in
commit f72ff8b81ebc ("net: fix kfree_skb_list use of skb_mark_not_on_list").
In ca... | ```diff
diff --git a/include/linux/poison.h b/include/linux/poison.h
index 2d3249eb0e62..2823f90fdab4 100644
--- a/include/linux/poison.h
+++ b/include/linux/poison.h
@@ -81,6 +81,9 @@
/********** net/core/page_pool.c **********/
#define PP_SIGNATURE (0x40 + POISON_POINTER_DELTA)
+/********** net/core/skbuff.c ***... |
bca0d1d3ceeb07be45a51c0fa4d57a0ce31b6aed | Analyze and fix the following issue in the Linux kernel code: drm/i915: Initialize the obj flags for shmem objects | Problem Details:
Obj flags for shmem objects is not being set correctly. Fixes in setting
BO_ALLOC_USER flag which applies to shmem objs as well.
v2: Add fixes tag (Tvrtko, Matt A)
Fixes: 13d29c823738 ("drm/i915/ehl: unconditionally flush the pages on acquire")
Cc: <stable@vger.kernel.org> # v5.15+
Cc: Matthew Auld <... | ```diff
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
index 114443096841..37d1efcd3ca6 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
@@ -596,7 +596,7 @@ static int shmem_object_init(struct intel_memory_region *... |
2f36e789e540df6a9fbf471b3a2ba62a8b361586 | Analyze and fix the following issue in the Linux kernel code: staging: pi433: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once. This requires saving off the root directory dentry to make
creation of indivi... | ```diff
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index d4e06a3929f3..b59f6a4cb611 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -55,6 +55,7 @@
static dev_t pi433_dev;
static DEFINE_IDR(pi433_idr);
static DEFINE_MUTEX(minor_lock); /* Pr... |
960dafa30455450d318756a9896a02727f2639e0 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Move fd_install after last use of fence | Problem Details:
Because eb_composite_fence_create() drops the fence_array reference
after creation of the sync_file, only the sync_file holds a ref to the
fence. But fd_install() makes that reference visable to userspace, so
it must be the last thing we do with the fence.
Signed-off-by: Rob Clark <robdclark@chromium... | ```diff
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index 94d86ee24693..9dce2957b4e5 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -3486,6 +3486,13 @@ err_request:
eb.composite_... |
d7d94b2612f5dc25d61dc7bf58aafe7b31f40191 | Analyze and fix the following issue in the Linux kernel code: net: microchip: sparx5: fix PTP init/deinit not checking all ports | Problem Details:
Check all ports instead of just port_count ports. PTP init was only
checking ports 0 to port_count. If the hardware ports are not mapped
starting from 0 then they would be missed, e.g. if only ports 20-30 were
mapped it would attempt to init ports 0-10, resulting in NULL pointers
when attempting to tim... | ```diff
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c b/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
index 0ed1ea7727c5..69e76634f9aa 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
@@ -633,7 +633,7 @@ int sparx5_ptp_init(s... |
03702d4d29be4e2510ec80b248dbbde4e57030d9 | Analyze and fix the following issue in the Linux kernel code: uapi: add missing ip/ipv6 header dependencies for linux/stddef.h | Problem Details:
Since commit 58e0be1ef6118 ("net: use struct_group to copy ip/ipv6
header addresses"), ip and ipv6 headers started to use the __struct_group
definition, which is defined at include/uapi/linux/stddef.h. However,
linux/stddef.h isn't explicitly included in include/uapi/linux/{ip,ipv6}.h,
which breaks bui... | ```diff
diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h
index 874a92349bf5..283dec7e3645 100644
--- a/include/uapi/linux/ip.h
+++ b/include/uapi/linux/ip.h
@@ -18,6 +18,7 @@
#ifndef _UAPI_LINUX_IP_H
#define _UAPI_LINUX_IP_H
#include <linux/types.h>
+#include <linux/stddef.h>
#include <asm/byteorder.h... |
f7ccf60c4adada7e13d3d6798621cabcdaf3828e | Analyze and fix the following issue in the Linux kernel code: selftests: forwarding: bridge_mdb: Fix a typo | Problem Details:
Add the letter missing from the word "INCLUDE".
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh
index 51f2b0d77067..4e16677f02ba 100755
--- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh
@@ -1054,7 +1054,7 @@ ctrl_igmpv3... |
d47230a3480a5f6df98c5870ba26843850a600d5 | Analyze and fix the following issue in the Linux kernel code: net: bridge: Add a tracepoint for MDB overflows | Problem Details:
The following patch will add two more maximum MDB allowances to the global
one, mcast_hash_max, that exists today. In all these cases, attempts to add
MDB entries above the configured maximums through netlink, fail noisily and
obviously. Such visibility is missing when adding entries through the
contro... | ```diff
diff --git a/include/trace/events/bridge.h b/include/trace/events/bridge.h
index 6b200059c2c5..a6b3a4e409f0 100644
--- a/include/trace/events/bridge.h
+++ b/include/trace/events/bridge.h
@@ -122,6 +122,64 @@ TRACE_EVENT(br_fdb_update,
__entry->flags)
);
+TRACE_EVENT(br_mdb_full,
+
+ TP_PROTO(const struc... |
c1d2ecdf5e38e3489ce8328238b558b3b2866fe1 | Analyze and fix the following issue in the Linux kernel code: neigh: make sure used and confirmed times are valid | Problem Details:
Entries can linger in cache without timer for days, thanks to
the gc_thresh1 limit. As result, without traffic, the confirmed
time can be outdated and to appear to be in the future. Later,
on traffic, NUD_STALE entries can switch to NUD_DELAY and start
the timer which can see the invalid confirmed time... | ```diff
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index f00a79fc301b..4edd2176e238 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -269,7 +269,7 @@ static int neigh_forced_gc(struct neigh_table *tbl)
(n->nud_state == NUD_NOARP) ||
(tbl->is_multicast &&
tbl->is_mul... |
f0f0cfdc3a024e21161714f2e05f0df3b84d42ad | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type | Problem Details:
spi_nor_set_erase_type() was used either to set or to mask out an erase
type. When we used it to mask out an erase type a shift-out-of-bounds
was hit:
UBSAN: shift-out-of-bounds in drivers/mtd/spi-nor/core.c:2237:24
shift exponent 4294967295 is too large for 32-bit type 'int'
The setting of the size_{... | ```diff
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index b500655f7937..3012758bbafa 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2026,6 +2026,15 @@ void spi_nor_set_erase_type(struct spi_nor_erase_type *erase, u32 size,
erase->size_mask = (1 << erase->size_shi... |
d20a8f409259f1782f080b434054854020878f23 | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Fix old dma_buf api usage | Problem Details:
Update according to new dma-buf locking scheme.
Remove redundant WARN_ON()'s, dma_buf functions internally
have the same warnings already.
Fixes: 647371a6609d ("accel/ivpu: Add GEM buffer object management")
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hug... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c
index d1f923971b4c..01d47d3bad5b 100644
--- a/drivers/accel/ivpu/ivpu_gem.c
+++ b/drivers/accel/ivpu/ivpu_gem.c
@@ -42,9 +42,7 @@ static int prime_map_pages_locked(struct ivpu_bo *bo)
struct ivpu_device *vdev = ivpu_bo_to_vdev(bo);
s... |
62079b6f2cf1e6356c6241cbdc5defdb0d66b4fe | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Set dma max_segment_size | Problem Details:
Avoid below spurious warning:
[ 264.844029] DMA-API: intel_vpu 0000:00:0b.0: mapping sg segment longer than device claims to support [len=143360] [max=65536]
[ 264.844038] WARNING: CPU: 0 PID: 1254 at kernel/dma/debug.c:1160 debug_dma_map_sg+0x6ca/0xb70
Fixes: 263b2ba5fc93 ("accel/ivpu: Add Intel V... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index 70c104851c6d..231f29bb5025 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -428,6 +428,7 @@ static int ivpu_pci_init(struct ivpu_device *vdev)
ivpu_err(vdev, "Failed to set DMA mask: %d\n", ret)... |
dffaa98c8bcf973e94a58d8f29c0254e003b538c | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Send VPU_JSM_MSG_CONTEXT_DELETE when deleting context | Problem Details:
The VPU_JSM_MSG_CONTEXT_DELETE will remove any resources associated
with the SSID, that included any blobs create by the user space
application.
The command can also remove doorbell registrations, but since this
does not work in HW scheduling case, we do not depend on this
capability and unregister th... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index a29e8ee0dce6..70c104851c6d 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -90,6 +90,7 @@ static void file_priv_release(struct kref *ref)
ivpu_cmdq_release_all(file_priv);
ivpu_bo_remove_all_... |
98d4187113d494cebb15f52a715d3091b2de1b4a | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Fix FW API data alignment issues | Problem Details:
FW API structures have been updated to fix misaligned
structure members.
Also changed JSM message header format to account for
future improvements.
Added explicit check for minimum supported JSM API version.
Fixes: 5d7422cfb498 ("accel/ivpu: Add IPC driver and JSM messages")
Signed-off-by: Andrzej K... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c
index b463c24adb70..f58951a0d81b 100644
--- a/drivers/accel/ivpu/ivpu_fw.c
+++ b/drivers/accel/ivpu/ivpu_fw.c
@@ -32,10 +32,11 @@
#define ADDR_TO_L2_CACHE_CFG(addr) ((addr) >> 31)
-#define IVPU_FW_CHECK_API(vdev, fw_hdr, name) ivpu_fw... |
ec6ec9c6ca637f7678f1931cb835b2bb8ab6dfd2 | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Fix old dma_buf api usage | Problem Details:
Update according to new dma-buf locking scheme.
Remove redundant WARN_ON()'s, dma_buf functions internally
have the same warnings already.
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.la... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c
index d1f923971b4c..01d47d3bad5b 100644
--- a/drivers/accel/ivpu/ivpu_gem.c
+++ b/drivers/accel/ivpu/ivpu_gem.c
@@ -42,9 +42,7 @@ static int prime_map_pages_locked(struct ivpu_bo *bo)
struct ivpu_device *vdev = ivpu_bo_to_vdev(bo);
s... |
07ccb63a5c4cf860754666f1de030a0cbd5193b6 | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Set dma max_segment_size | Problem Details:
Avoid below spurious warning:
[ 264.844029] DMA-API: intel_vpu 0000:00:0b.0: mapping sg segment longer than device claims to support [len=143360] [max=65536]
[ 264.844038] WARNING: CPU: 0 PID: 1254 at kernel/dma/debug.c:1160 debug_dma_map_sg+0x6ca/0xb70
Signed-off-by: Stanislaw Gruszka <stanislaw.g... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index 70c104851c6d..231f29bb5025 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -428,6 +428,7 @@ static int ivpu_pci_init(struct ivpu_device *vdev)
ivpu_err(vdev, "Failed to set DMA mask: %d\n", ret)... |
4ea1e504db5b776892e2f5b0c5f05af6a046286b | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Fix FW API data alignment issues | Problem Details:
FW API structures have been updated to fix misaligned
structure members.
Also changed JSM message header format to account for
future improvements.
Added explicit check for minimum supported JSM API version.
Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Signed-off-by: Stanis... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c
index b463c24adb70..f58951a0d81b 100644
--- a/drivers/accel/ivpu/ivpu_fw.c
+++ b/drivers/accel/ivpu/ivpu_fw.c
@@ -32,10 +32,11 @@
#define ADDR_TO_L2_CACHE_CFG(addr) ((addr) >> 31)
-#define IVPU_FW_CHECK_API(vdev, fw_hdr, name) ivpu_fw... |
1963689bed4d500236938d90c91cdd5e63c1eb28 | Analyze and fix the following issue in the Linux kernel code: media: platform: mtk-mdp3: Fix return value check in mdp_probe() | Problem Details:
In case of error, the function mtk_mutex_get()
returns ERR_PTR() and never returns NULL. The NULL test in the
return value check should be replaced with IS_ERR().
And also fix the err_free_mutex case.
Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
Signed-off-by: Qiheng Lin... | ```diff
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
index 2d1f6ae9f080..97edcd9d1c81 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
@@ -207,8 +207,8 @@ static int md... |
01cb370ff6c5abf2d64985832ff165f353ac04bb | Analyze and fix the following issue in the Linux kernel code: media: videobuf2-core: drop obsolete sanity check in __vb2_queue_free() | Problem Details:
The sanity check in __vb2_queue_free() is obsolete ever since commit
f035eb4e976e ("[media] videobuf2: fix lockdep warning"). Remove it and
let __vb2_queue_free() return void.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> | ```diff
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index fc3758a5bc1c..cab07e3a3c6f 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -502,27 +502,11 @@ static void __vb2_free_mem(stru... |
1925665ef403c5f5e605d10148870d1cb505b5ab | Analyze and fix the following issue in the Linux kernel code: media: amphion: remove redundant check of colorspace in venc_s_fmt | Problem Details:
record the colorspace set by user.
if it's not supported by h264 vui, then zero will be written to vui,
but don't modify the user setting.
Fixes: 0401e659c1f9 ("media: amphion: add v4l2 m2m vpu encoder stateful driver")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Nicolas Dufresne <nicolas.d... | ```diff
diff --git a/drivers/media/platform/amphion/venc.c b/drivers/media/platform/amphion/venc.c
index 3cbe8ce637e5..e6e8fe45fc7c 100644
--- a/drivers/media/platform/amphion/venc.c
+++ b/drivers/media/platform/amphion/venc.c
@@ -250,19 +250,10 @@ static int venc_s_fmt(struct file *file, void *fh, struct v4l2_format *... |
7206fcc59399729667260d58c63e3db4503ac511 | Analyze and fix the following issue in the Linux kernel code: media: rzg2l-cru: Remove unneeded semicolon | Problem Details:
./drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:409:2-3: Unneeded semicolon
./drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c:407:2-3: Unneeded semicolon
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3273
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li ... | ```diff
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
index 33e08efa3039..384fb54e219a 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
@@ -406,7 +406,7 @@ static vo... |
8d46c5cdadeb64206d2dd7d00f00dd26020ceb3c | Analyze and fix the following issue in the Linux kernel code: media: microchip: microchip-isc: replace v4l2_{dbg|info|err} with dev-* | Problem Details:
v4l2_dbg and friends are legacy and should be removed.
Replaced all the calls with dev_dbg equivalent.
This also removes the 'debug' module parameter which has become obsolete.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-... | ```diff
diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c
index e2994d48f10c..71758ee8474b 100644
--- a/drivers/media/platform/microchip/microchip-isc-base.c
+++ b/drivers/media/platform/microchip/microchip-isc-base.c
@@ -32,10 +32,6 @@
#include ... |
909d3096ac99fa2289f9b8945a3eab2269947a0a | Analyze and fix the following issue in the Linux kernel code: media: ipu3-cio2: Fix PM runtime usage_count in driver unbind | Problem Details:
Get the PM runtime usage_count and forbid PM runtime at driver unbind. The
opposite is being done in probe() already.
Fixes: commit c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")
Cc: stable@vger.kernel.org # for >= 4.16
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Rev... | ```diff
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
index 390bd5ea3472..3b76a9d0383a 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
@@ -1843,6 +1843,9 @@ static void cio2_pci_remove(struct pci_... |
2eadd98dd4de7f983f0fc96586a4a914329fc811 | Analyze and fix the following issue in the Linux kernel code: media: i2c: ov5670: Add .get_selection() support | Problem Details:
Add support for the .get_selection() pad operation to the ov5670 sensor
driver.
Report the native sensor size (pixel array), the crop bounds (readable
pixel array area) and the current and default analog crop rectangles.
Currently all driver's modes use an analog crop rectangle of size
[12, 4, 2600, ... | ```diff
diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c
index 898f564e0c3e..c26ca6200c27 100644
--- a/drivers/media/i2c/ov5670.c
+++ b/drivers/media/i2c/ov5670.c
@@ -74,6 +74,10 @@
#define OV5670_REG_VALUE_16BIT 2
#define OV5670_REG_VALUE_24BIT 3
+/* Pixel Array */
+#define OV5670_NATIVE_WIDT... |
ef86447e775fb1f2ced00d4c7fff2c0a1c63f165 | Analyze and fix the following issue in the Linux kernel code: media: i2c: imx219: Fix binning for RAW8 capture | Problem Details:
2x2 binning works fine for RAW10 capture, but for RAW8 1232p mode it
leads to corrupted frames [1][2].
Using the special 2x2 analog binning mode fixes the issue, but causes
artefacts for RAW10 1232p capture. So here we choose the binning mode
depending upon the frame format selected.
As both binning ... | ```diff
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index b5fa4986470a..f9471c9e3a74 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -95,6 +95,12 @@
#define IMX219_REG_ORIENTATION 0x0172
+/* Binning Mode */
+#define IMX219_REG_BINNING_MODE 0x0174
+#define IMX... |
c699ce1a3838465fb87ecd951f0819404e70030a | Analyze and fix the following issue in the Linux kernel code: media: sun4i-csi: Use CSI_INT_STA_REG name, fix typo in a comment | Problem Details:
Fix interrupt status register offset usage to be a defined name
CSI_INT_STA_REG (= 0x34) instead of a plain number.
Additionally fix a typo in a comment of the same file.
Signed-off-by: Oleg Verych <olecom@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carv... | ```diff
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
index a3e826a755fc..95b5633b7914 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
@@ -245,7 +245,7 @@ static int sun4i_csi_... |
fb6211f1584aad12c267c3333273f42f69438ced | Analyze and fix the following issue in the Linux kernel code: usb: gadget: add doc to struct usb_composite_dev | Problem Details:
Added documentation to new struct members for WebUSB:
* bcd_webusb_version
* b_webusb_vendor_code
* landing_page
* use_webusb
to avoid warnings in the build of htmldocs
Fixes: 93c473948c58 ("usb: gadget: add WebUSB landing page support")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-... | ```diff
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 91d22c3ed458..7ef8cea67f50 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -432,6 +432,10 @@ static inline struct usb_composite_driver *to_cdriver(
* @qw_sign: qwSignature part of the OS string
... |
afa4805799c1d332980ad23339fdb07b5e0cf7e0 | Analyze and fix the following issue in the Linux kernel code: media: ov5640: Fix analogue gain control | Problem Details:
Gain control is badly documented in publicly available (including
leaked) documentation.
There is an AGC pre-gain in register 0x3a13, expressed as a 6-bit value
(plus an enable bit in bit 6). The driver hardcodes it to 0x43, which
one application note states is equal to x1.047. The documentation also
... | ```diff
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index e1b8365fef58..1536649b9e90 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3495,7 +3495,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
/* Auto/manual gain */
ctrls->auto_gain = v4l2_ctrl_... |
7485edb2b6ca5960205c0a49bedfd09bba30e521 | Analyze and fix the following issue in the Linux kernel code: media: i2c: ov772x: Fix memleak in ov772x_probe() | Problem Details:
A memory leak was reported when testing ov772x with bpf mock device:
AssertionError: unreferenced object 0xffff888109afa7a8 (size 8):
comm "python3", pid 279, jiffies 4294805921 (age 20.681s)
hex dump (first 8 bytes):
80 22 88 15 81 88 ff ff ."......
backtrace:
[... | ```diff
diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c
index 4189e3fc3d53..a238e63425f8 100644
--- a/drivers/media/i2c/ov772x.c
+++ b/drivers/media/i2c/ov772x.c
@@ -1462,7 +1462,7 @@ static int ov772x_probe(struct i2c_client *client)
priv->subdev.ctrl_handler = &priv->hdl;
if (priv->hdl.error)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.