On Fri, 2018-12-07 at 09:50 -0500, Waiman Long wrote:
> On 12/07/2018 05:21 AM, Peter Zijlstra wrote:
> > On Thu, Dec 06, 2018 at 05:11:40PM -0800, Bart Van Assche wrote:
> > > The next patch in this series uses the class name in code that
> > > detects calls to lock_acq
On Fri, 2018-12-07 at 13:14 +0100, Peter Zijlstra wrote:
> On Thu, Dec 06, 2018 at 05:11:41PM -0800, Bart Van Assche wrote:
> > + if (WARN_ON_ONCE(!hlock_class(prev)->hash_entry.pprev) ||
> > + WARN_ONCE(!hlock_class(next)->hash_entry.pprev,
> > +
On Fri, 2018-12-07 at 13:23 +0100, Peter Zijlstra wrote:
> I took the first 15 patches for now to shrink the series.
Thanks Peter. Since I would like to rebase the remaining patches on top of
what you have already queued: is what you have queued available in a public
git repository? I had a quick
On Sat, 2018-12-01 at 21:24 +0100, Peter Zijlstra wrote:
> On Thu, Nov 29, 2018 at 08:48:50AM -0800, Bart Van Assche wrote:
> > On Thu, 2018-11-29 at 13:01 +0100, Peter Zijlstra wrote:
> > > On Thu, Nov 29, 2018 at 11:49:02AM +0100, Peter Zijlstra wrote:
> > > > On W
On Thu, 2018-11-29 at 11:10 +0100, Peter Zijlstra wrote:
> On Wed, Nov 28, 2018 at 03:43:23PM -0800, Bart Van Assche wrote:
> > +/* hash_entry is used to keep track of dynamically allocated keys. */
> > struct lock_class_key {
> > + struct hlist_node hash_
On Mon, 2018-12-03 at 18:32 +0100, Peter Zijlstra wrote:
> On Mon, Dec 03, 2018 at 08:40:48AM -0800, Bart Van Assche wrote:
>
> > > I think we can do this with a free bitmap and an array of 2 pending
> > > bitmaps and an index. Add newly freed entries to the pending bitma
This improves test coverage.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
tools/lib/lockdep/run_tests.sh | 14 ++
1 file changed, 14 insertions(+)
diff --git a/tools/lib/lockdep/run_tests.sh b/tools/lib/lockdep/run_tests.sh
index
f no name has been
assigned to a lock object. That patch namely causes the build bot to
complain about certain lock objects but I have not yet had the time to
figure out the identity of these lock objects.
Bart.
Bart Van Assche (24):
lockdep tests: Display compiler warning and error
Make sure that all lock order entries that refer to a class are removed
from the list_entries[] array when a kernel module is unloaded.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 1 +
kernel/locking/lockdep.c | 17
This patch avoids that sparse complains about a missing declaration for
the lock_classes array.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/locking/lockdep.c b
Since zap_class() removes items from the all_lock_classes list and the
classhash_table, protect all zap_class() calls with the graph lock.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 2 +-
1 file changed, 1 insertion
Use find instead of ls to avoid splitting filenames that contain spaces.
Use rm -f instead of if ... then rm ...; fi. This patch addresses all
shellcheck complaints about the run_tests.sh shell script.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
hread_rwlock_t
implementation")
Cc: Sasha Levin
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
tools/lib/lockdep/include/liblockdep/rwlock.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/lib/lockdep/include/l
df/0xbb0
generic_file_direct_write+0x119/0x220
__generic_file_write_iter+0x131/0x2d0
ext4_file_write_iter+0x3fa/0x710
aio_write+0x235/0x330
io_submit_one+0x510/0xeb0
__x64_sys_io_submit+0x122/0x340
do_syscall_64+0x71/0x220
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Cc: Ingo Molna
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index c936fce5b9d7..b4772e5fc176 100644
--- a/kernel/locking
Make sure that the lockdep_register_key() and lockdep_unregister_key()
code is tested when running the lockdep tests.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
tools/lib/lockdep/include/liblockdep/common.h | 2 ++
tools/lib/lockdep/include
This patch does not change any functionality but makes the next patch
in this series easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 27 +--
1 file changed, 17 insertions(+), 10
encountering a dynamically
allocated key.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 13 -
kernel/locking/lockdep.c | 120 ---
2 files changed, 122 insertions(+), 11 deletions
Debugging lockdep data structure inconsistencies is challenging. Add
disabled code that verifies data structure consistency at runtime.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 147
Instead of abandoning elements of list_entries[] that are no longer in
use, make alloc_list_entry() reuse array elements that have been freed.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 27 ---
1
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 9 +-
kernel/locking/lockdep.c | 237 ---
2 files changed, 205 insertions(+), 41 deletions(-)
diff --git a/include/linux/lockdep.h b/include/linux/lockd
The next patch in this series uses the class name in code that
detects lock class use-after-free. Hence retain the class name for
lock classes that are being freed.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 4 +---
1
This patch does not change any functionality but makes the patch that
frees lock classes that are no longer in use easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 14 +++---
1 file changed, 7 insertions
Due to the previous patch all code that accesses the 'all_lock_classes'
list holds the graph lock. Hence use regular list primitives instead of
their RCU variants to access this list.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kern
This patch does not change any functionality but makes the
lockdep_reset_lock() function easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 50
1 file changed, 30
Since the function __lockdep_init_map() only has one caller, inline it
into its caller. This patch does not change any functionality.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 8 +---
1 file changed, 1 insertion
This patch makes sure that the lockdep_reset_lock() function gets
tested.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
tools/lib/lockdep/include/liblockdep/common.h | 1 +
tools/lib/lockdep/include/liblockdep/mutex.h | 1 +
tools/lib/lockdep/tests
If compilation of liblockdep fails, display an error message and exit
immediately. Display compiler warning and error messages that are
generated while building a test. Only run a test if compilation
succeeded.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
This patch avoids that linking against liblockdep fails due to no
print_irqtrace_events() definition being available.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
tools/lib/lockdep/lockdep.c | 5 +
1 file changed, 5 insertions(+)
diff --git a
Initializing a list entry just before it is passed to list_add_tail_rcu()
is not necessary because list_add_tail_rcu() overwrites the next and prev
pointers anyway. Hence remove the INIT_LIST_HEAD() statement.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
Instead of checking whether the tests produced any output, check the
output itself. This patch avoids that e.g. debug output causes the
message "PASSED!" to be reported for failed tests.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
tools/l
df/0xbb0
generic_file_direct_write+0x119/0x220
__generic_file_write_iter+0x131/0x2d0
ext4_file_write_iter+0x3fa/0x710
aio_write+0x235/0x330
io_submit_one+0x510/0xeb0
__x64_sys_io_submit+0x122/0x340
do_syscall_64+0x71/0x220
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Cc: Peter Zijlstra
Cc: Ingo
. Hence
add support for allocating instances of these objects dynamically.
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Will Deacon
Cc: Tejun Heo
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 2 ++
kernel/locking/lockdep.c | 16 +---
2 files changed, 15
m not
sure whether the approach of patch 1/2 is correct.
Thanks,
Bart.
Bart Van Assche (2):
locking/lockdep: Add support for dynamic depmaps and keys
kernel/workqueue: Use dynamic lockdep keys for workqueues
include/linux/lockdep.h | 2 ++
include/linux/workqueue.h | 28 -
On Mon, 2018-07-09 at 16:51 +0300, Jan Dakinevich wrote:
> An array of pointers to SRPT contexts in ib_device is over 30KiB even
> in default case, in which an amount of contexts is 4095. The patch
> is intended to weed out large contigous allocation for non-DMA memory.
Reviewed-by:
On Tue, 2018-07-10 at 08:39 +0300, Leon Romanovsky wrote:
> On Mon, Jul 09, 2018 at 04:51:08PM +0300, Jan Dakinevich wrote:
> > An array of pointers to SRPT contexts in ib_device is over 30KiB even
> > in default case, in which an amount of contexts is 4095. The patch
> > is intended to weed out la
Hello Steven and Ingo,
Did I report this observation to the right people?
Thank you,
Bart.
On 06/15/18 14:01, Bart Van Assche wrote:
Hello Steven,
If I run the following commands as root:
cd /sys/kernel/debug/tracing
grep pm_ available_events > set_event
echo function >current_trace
On 06/28/18 14:03, Keith Busch wrote:
Signed-off-by: Keith Busch
---
block/blk-mq.c | 6 ++
include/linux/blk-mq.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index b429d515b568..c6478833464d 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq
On 05/14/18 08:39, Christopher Lameter wrote:
On Mon, 7 May 2018, Johannes Weiner wrote:
What to make of this number? If CPU utilization is at 100% and CPU
pressure is 0, it means the system is perfectly utilized, with one
runnable thread per CPU and nobody waiting. At two or more runnable
tasks
ct request and used
the __deadline member to encode both the generation and state information.
Bart Van Assche (2):
arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64
blk-mq: Rework blk-mq timeout handling again
.../features/locking/cmpxchg64/arch-support.txt| 31
ar
to two functions - one for the
legacy block layer and one for blk-mq.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: Christoph Hellwig
Cc: Jianchao Wang
Cc: Ming Lei
Cc: Sebastian Ott
Cc: Sagi Grimberg
Cc: Israel Rukshin ,
Cc: Max Gurtovoy
---
block/blk-core.c | 6 --
block/
The next patch in this series introduces a call to cmpxchg64()
in the block layer core for those architectures on which this
functionality is available. Make it possible to test whether
cmpxchg64() is available by introducing CONFIG_ARCH_HAVE_CMPXCHG64.
Signed-off-by: Bart Van Assche
Cc: Catalin
On Mon, 2018-05-14 at 11:50 -0700, Max Filippov wrote:
> On Mon, May 14, 2018 at 11:46 AM, Bart Van Assche
> wrote:
> > The next patch in this series introduces a call to cmpxchg64()
> > in the block layer core for those architectures on which this
> > functionality is ava
The macro __is_constexpr() causes sparse to report the following:
warning: expression using sizeof(void)
Avoid this by using __builtin_constant_p() instead.
Fixes: 3c8ba0d61d04 ("kernel.h: Retain constant expression output for
max()/min()")
Signed-off-by: Bart Van Assche
Hello Steven,
If I run the following commands as root:
cd /sys/kernel/debug/tracing
grep pm_ available_events > set_event
echo function >current_tracer
grep scsi_ available_filter_functions | while read a b; do echo $a; done
>set_ftrace_filter
echo 1 >events/printk/enable
echo 1 >tracing_on
echo
Signed-off-by: Bart Van Assche
---
fs/configfs/item.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/fs/configfs/item.c b/fs/configfs/item.c
index 88f266efc09b..99d491cd01f9 100644
--- a/fs/configfs/item.c
+++ b/fs/configfs/item.c
@@ -64,7 +64,6
On Tue, 2018-05-08 at 21:33 -0400, Kent Overstreet wrote:
> [ ... ]
Hello Kent,
With Jens' latest for-next branch I hit the kernel warning shown below. Can
you have a look?
Thanks,
Bart.
==
BUG: KASAN: use-after-free in bio_advan
On Fri, 2018-05-18 at 05:06 -0400, Kent Overstreet wrote:
> On Thu, May 17, 2018 at 08:54:57PM +0000, Bart Van Assche wrote:
> > With Jens' latest for-next branch I hit the kernel warning shown below. Can
> > you have a look?
>
> Any hints on how to reproduce it?
Sure.
ion.
- Atomic instructions are only used to update the request state if
a concurrent request state change could be in progress.
- blk_add_timer() has been split into two functions - one for the
legacy block layer and one for blk-mq.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: Christoph Hellwig
The next patch in this series introduces a call to cmpxchg64()
in the block layer core for those architectures on which this
functionality is available. Make it possible to test whether
cmpxchg64() is available by introducing CONFIG_ARCH_HAVE_CMPXCHG64.
Signed-off-by: Bart Van Assche
Cc: Catalin
state members of struct request and used
the __deadline member to encode both the generation and state information.
Bart Van Assche (2):
arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64
blk-mq: Rework blk-mq timeout handling again
.../features/locking/cmpxchg64/arc
On Wed, 2018-12-12 at 15:39 -0800, Alexei Starovoitov wrote:
> On Thu, Dec 13, 2018 at 09:48:20AM +1100, Stephen Rothwell wrote:
> > Hi Alexei,
> >
> > On Wed, 12 Dec 2018 12:53:11 -0800 Alexei Starovoitov
> > wrote:
> > >
> > > On Thu, Dec 13, 2018 at 07:32:45AM +1100, Stephen Rothwell wrote:
On Tue, 2018-12-11 at 23:06 -0500, Dennis Zhou wrote:
> Hi Bart,
>
> On Tue, Dec 11, 2018 at 03:16:13PM -0800, Bart Van Assche wrote:
> > On Tue, 2018-12-11 at 18:03 -0500, Dennis Zhou wrote:
> > > diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> > > index
causes lockdep to complain if no name has been
assigned to a lock object. That patch namely causes the build bot to
complain about certain lock objects but I have not yet had the time to
figure out the identity of these lock objects.
Bart.
Bart Van Assche (15):
locking/lockdep: Fix required me
Make sure that all lock order entries that refer to a class are removed
from the list_entries[] array when a kernel module is unloaded.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 1 +
kernel/locking/lockdep.c | 19
This patch does not change any functionality but makes the patch that
frees lock classes that are no longer in use easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 14 +++---
1 file changed, 7 insertions
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index d411660572e1..1eb03a29f2c2 100644
--- a/kernel/locking
df/0xbb0
generic_file_direct_write+0x119/0x220
__generic_file_write_iter+0x131/0x2d0
ext4_file_write_iter+0x3fa/0x710
aio_write+0x235/0x330
io_submit_one+0x510/0xeb0
__x64_sys_io_submit+0x122/0x340
do_syscall_64+0x71/0x220
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Cc: Ingo Molna
: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 29 +++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 7ca9ac392dde..9ab782378b3b 100644
--- a/kernel
encountering a dynamically
allocated key.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 13 +++-
kernel/locking/lockdep.c | 125 ---
2 files changed, 127 insertions(+), 11 deletions
Instead of abandoning elements of list_entries[] that are no longer in
use, make alloc_list_entry() reuse array elements that have been freed.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 33
This patch does not change the behavior of these functions but makes the
patch that frees unused lock classes easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 74 +---
1 file
A previous patch introduced a lock chain leak. Fix that leak by reusing
lock chains that have been freed.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 61 ++--
1 file changed, 33
Debugging lockdep data structure inconsistencies is challenging. Add
disabled code that verifies data structure consistency at runtime.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 183
context of a lockdep selftest.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 5 +
kernel/locking/lockdep.c | 6 ++
lib/locking-selftest.c | 2 ++
3 files changed, 13 insertions(+)
diff --git a/include/linux/lockdep.h b
Make sure that the lockdep_register_key() and lockdep_unregister_key()
code is tested when running the lockdep tests.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
tools/lib/lockdep/include/liblockdep/common.h | 2 ++
tools/lib/lockdep/include
Lock chains are only tracked with CONFIG_PROVE_LOCKING=y. Do not report
the memory required for the lock chain array if CONFIG_PROVE_LOCKING=n.
Fixes: ca58abcb4a6d ("lockdep: sanitise CONFIG_PROVE_LOCKING") # v2.6.23
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by
This patch does not change any functionality but makes the next patch in
this series easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 16 +++-
kernel/locking/lockdep_internals.h | 3
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 9 +-
kernel/locking/lockdep.c | 434 +--
2 files changed, 381 insertions(+), 62 deletions(-)
diff --git a/include/linux/lockdep.h b/inc
@vger.kernel.org
Signed-off-by: Bart Van Assche
---
lib/rhashtable.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 30526afa8343..6c22534c48e4 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -19,6 +19,7 @@
#include
#include
#include
On Tue, 2018-12-11 at 14:13 -0800, Bart Van Assche wrote:
> +/*
> + * Unregister a dynamically allocated key. Must not be called from interrupt
> + * context. The caller must ensure that freeing @key only happens after an
> RCU
> + * grace period.
> + */
> +void lockdep_
On Mon, 2018-12-17 at 16:41 +0800, kernel test robot wrote:
> FYI, we noticed the following commit (built with gcc-4.9):
>
> commit: 15693f040b149598cc048c2697b258d3901c ("locking/lockdep: Free lock
> classes that are no longer in use")
> https://github.com/bvanassche/linux for-next
>
> in t
On Mon, 2018-12-17 at 12:16 +0800, kernel test robot wrote:
> Greetings,
>
> 0day kernel testing robot got the below dmesg and the first bad commit is
>
> https://github.com/bvanassche/linux for-next
>
> commit cdbeb78c7a2e34af6d6cc5d3570a585a23eea8e9
> Author: Bart
On Mon, 2018-12-10 at 21:51 +0100, Arnd Bergmann wrote:
> In what seems to be a mismatch between the scsi-fixes branch and
> the scsi-mkp/for-next branch, a newly introduced variable from
> one patch got obsoleted in another one:
>
> drivers/scsi/qla2xxx/qla_os.c: In function '__qla2x00_abort_all_
On Tue, 2018-12-11 at 12:19 -0500, Sasha Levin wrote:
> On Thu, Dec 06, 2018 at 05:11:29PM -0800, Bart Van Assche wrote:
> > This patch avoids that the following compiler warning is reported while
> > compiling the lockdep unit tests:
> >
> > include/liblo
Make sure that the lockdep_register_key() and lockdep_unregister_key()
code is tested when running the lockdep tests.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
tools/lib/lockdep/include/liblockdep/common.h | 2 ++
tools/lib/lockdep/include
df/0xbb0
generic_file_direct_write+0x119/0x220
__generic_file_write_iter+0x131/0x2d0
ext4_file_write_iter+0x3fa/0x710
aio_write+0x235/0x330
io_submit_one+0x510/0xeb0
__x64_sys_io_submit+0x122/0x340
do_syscall_64+0x71/0x220
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Cc: Ingo Molna
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 9 +-
kernel/locking/lockdep.c | 434 +--
2 files changed, 381 insertions(+), 62 deletions(-)
diff --git a/include/linux/lockdep.h b/inc
Lock chains are only tracked with CONFIG_PROVE_LOCKING=y. Do not report
the memory required for the lock chain array if CONFIG_PROVE_LOCKING=n.
Fixes: ca58abcb4a6d ("lockdep: sanitise CONFIG_PROVE_LOCKING") # v2.6.23
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by
This patch does not change any functionality but makes the patch that
frees lock classes that are no longer in use easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 14 +++---
1 file changed, 7 insertions
: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 29 +++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 7ca9ac392dde..9ab782378b3b 100644
--- a/kernel
A previous patch introduced a lock chain leak. Fix that leak by reusing
lock chains that have been freed.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 48 +++-
1 file changed, 33
context of a lockdep selftest.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 2 ++
kernel/locking/lockdep.c | 1 +
lib/locking-selftest.c | 2 ++
3 files changed, 5 insertions(+)
diff --git a/include/linux/lockdep.h b/include
This patch does not change any functionality but makes the next patch in
this series easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 16 +++-
kernel/locking/lockdep_internals.h | 3
Make sure that all lock order entries that refer to a class are removed
from the list_entries[] array when a kernel module is unloaded.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 1 +
kernel/locking/lockdep.c | 19
assigned to a lock object. That patch namely causes the build bot to
complain about certain lock objects but I have not yet had the time to
figure out the identity of these lock objects.
Bart.
Bart Van Assche (15):
locking/lockdep: Fix required memory size reported if
CONFIG_PROVE_LOCKING=n
Debugging lockdep data structure inconsistencies is challenging. Add
disabled code that verifies data structure consistency at runtime.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 183
This patch does not change the behavior of these functions but makes the
patch that frees unused lock classes easier to read.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 74 +---
1 file
encountering a dynamically
allocated key.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
include/linux/lockdep.h | 13 +++--
kernel/locking/lockdep.c | 114 ---
2 files changed, 116 insertions(+), 11 deletions
Instead of abandoning elements of list_entries[] that are no longer in
use, make alloc_list_entry() reuse array elements that have been freed.
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 33
Cc: Peter Zijlstra
Cc: Waiman Long
Cc: Johannes Berg
Signed-off-by: Bart Van Assche
---
kernel/locking/lockdep.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index f95c1beddc28..2685b2265f6e 100644
--- a/kernel/locking
On Tue, 2018-12-11 at 18:03 -0500, Dennis Zhou wrote:
> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index 6bd0619a7d6e..c30661ddc873 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -202,6 +202,12 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg,
> WARN_O
On Tue, 2018-12-18 at 21:32 -0800, David Miller wrote:
> From: Bart Van Assche
> Date: Mon, 17 Dec 2018 13:40:58 -0800
>
> > The test_insert_dup() function from lib/test_rhashtable.c passes a
> > pointer to a stack object to rhltable_init(). Avoid that the following
> &
On Mon, 2019-01-07 at 22:41 +0800, John Garry wrote:
> Currently the protection lookup tables in sd_prot_flag_mask() and
> sd_prot_op() are declared non-static. As such, they will be rebuilt for
> each respective function call.
>
> Optimise by making them static.
>
> This saves ~100B object code
On Mon, 2019-01-07 at 17:27 +, John Garry wrote:
> On 07/01/2019 16:57, Bart Van Assche wrote:
> > On Mon, 2019-01-07 at 22:41 +0800, John Garry wrote:
> > > Currently the protection lookup tables in sd_prot_flag_mask() and
> > > sd_prot_op() are declared non-st
l type."
> > +evaluate to 0 or 1, and implicit or explicit conversion to bool
> > automatically
> > +converts the value to true or false. When using bool types the !!
> > construction
> > +is not needed, which eliminates a class of bugs.
> > +
> > +When working with bool values the true and false labels should be used
> > instead
>
> true and false are not labels but #defines
With these refinements, feel free to add:
Reviewed-by: Bart Van Assche
On Fri, 2018-12-28 at 10:36 -0500, Chuck Lever wrote:
> > On Dec 20, 2018, at 4:49 AM, YueHaibing wrote:
> >
> > smatch warning this:
> > net/sunrpc/xprtrdma/svc_rdma_rw.c:351 svc_rdma_post_chunk_ctxt() error:
> > uninitialized symbol 'bad_wr'
> > net/sunrpc/xprtrdma/verbs.c:1569 rpcrdma_post_re
On Thu, 2018-10-04 at 23:57 -0700, Nathan Chancellor wrote:
> Regardless of how the overflow is handled within the switch statement,
> the overflow is also happening when passing in these values to the ioctl,
> right? I mean these case values are defined in the uapi files so that
> userspace can ea
On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> diff --git a/block/blk-mq.h b/block/blk-mq.h
> index 889f0069dd80..79c300faa7ce 100644
> --- a/block/blk-mq.h
> +++ b/block/blk-mq.h
> @@ -80,6 +80,12 @@ static inline struct blk_mq_hw_ctx
> *blk_mq_map_queue(struct request_queue *q,
> r
ewed a later patch in this series. Anyway:
Reviewed-by: Bart Van Assche
301 - 400 of 1594 matches
Mail list logo