Re: [PATCH 4/6] lib/scatterlist: Unexport some trivial wrappers

2018-03-07 Thread Bart Van Assche
On Wed, 2018-03-07 at 12:47 +, Tvrtko Ursulin wrote: > Save some kernel size by moving trivial wrappers to header as static > inline instead of exporting symbols for them. Something that you may be unaware of is that the introduction of the sgl helper functions is only a first step. The next s

Re: [PATCH 6/6] lib/scatterlist: Drop order argument from sgl_free_n_order

2018-03-07 Thread Bart Van Assche
On Wed, 2018-03-07 at 12:47 +, Tvrtko Ursulin wrote: > We can derive the order from sg->length and so do not need to pass it in > explicitly. Rename the function to sgl_free_n. Using get_order() to compute the order looks fine to me but this patch will have to rebased in order to address the c

Re: [PATCH 6/6] lib/scatterlist: Drop order argument from sgl_free_n_order

2018-03-07 Thread Bart Van Assche
On Wed, 2018-03-07 at 17:23 +, Tvrtko Ursulin wrote: > Ok I guess my main questions are the ones from the cover letter - where > is this API going and why did it get in a bit of a funky state? Because > it doesn't look fully thought through and tested to me. Funky state? Not fully tested? Ex

Re: [PATCH 0/6] lib/scatterlist: Small SGL tidy

2018-03-07 Thread Bart Van Assche
On Wed, 2018-03-07 at 12:47 +, Tvrtko Ursulin wrote: > I spotted a few small issues in the recent added SGL code so am sending some > patches to tidy this. Can you send the fixes as a separate series and keep the rework / behavior changes for later such that Jens can queue the fixes for kerne

Re: [PATCH 2/2] target: remove spin_lock_assert() in __target_(attach|detach)_tg_pt_gp()

2018-03-23 Thread Bart Van Assche
On Fri, 2018-03-23 at 18:19 +0100, bige...@linutronix.de wrote: > __target_attach_tg_pt_gp() and __target_detach_tg_pt_gp() check if the caller > holds lun_tg_pt_gp_lock(). Both functions are static, the callers are > acquiring the lock before the invocation of the function so the check > looks sup

Re: [PATCH 1/2 v2] target: drop spin_lock_assert() + irqs_disabled() combo checks

2018-03-23 Thread Bart Van Assche
g to document > > things, but it's not useful long-term". > > Remove those checks. Reviewed-by: Bart Van Assche

Re: [PATCH 2/2] target: remove spin_lock_assert() in __target_(attach|detach)_tg_pt_gp()

2018-03-23 Thread Bart Van Assche
On Fri, 2018-03-23 at 18:50 +0100, bige...@linutronix.de wrote: > On 2018-03-23 17:44:46 [+], Bart Van Assche wrote: > > In other words, do we really need to remove these checks? I think that these > > checks are useful as documentation to people who read the SCSI target code.

Re: [PATCH v3] scsi: ufs: add trace event for ufs upiu

2018-03-26 Thread Bart Van Assche
for a patch should appear under the three hyphens such that it gets discarded automatically by tools like "git am". Martin will have to remove the above changelog manually. Anyway: Reviewed-by: Bart Van Assche

Re: [PATCH] scsi: don't look for NULL devices handlers by name

2018-03-26 Thread Bart Van Assche
ilover device 259:67: Handler > scsi_dh_(null) error 14. > > Let scsi_dh_lookup() fail fast on NULL names. Reviewed-by: Bart Van Assche

Re: [PATCH] scsi: Replace sdev_printk with printk_deferred to avoid

2018-03-26 Thread Bart Van Assche
On Thu, 2018-03-08 at 16:50 +0800, Wen Yang wrote: > This patch replacing the sdev_printk with async printk_deferred can > avoid task blocking because of the slow serial and unstable disks in > such senario. Although I'm not enthusiast about this approach, I haven't been able to come up with a bet

Re: [PATCH] scsi: Replace sdev_printk with printk_deferred to avoid

2018-03-27 Thread Bart Van Assche
On Thu, 2018-03-08 at 16:50 +0800, Wen Yang wrote: > When scsi disks went wrong frequently, and with serial console > attached, tasks may be blocked in the following flow for more than 10s: [ ... > ] From https://bugzilla.kernel.org/show_bug.cgi?id=199003: "Hm, printk_deferred is a bit dangerous

Re: linux-next: build failure after merge of the device-mapper tree

2018-03-27 Thread Bart Van Assche
On 03/26/18 19:39, Stephen Rothwell wrote: diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index d5db9df7ea4b..0589a4da12bb 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1896,7 +1896,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,

Re: 4.15.14 crash with iscsi target and dvd

2018-04-05 Thread Bart Van Assche
On Thu, 2018-04-05 at 22:06 -0400, Wakko Warner wrote: > I know now why scsi_print_command isn't doing anything. cmd->cmnd is null. > I added a dev_printk in scsi_print_command where the 2 if statements return. > Logs: > [ 29.866415] sr 3:0:0:0: cmd->cmnd is NULL That's something that should nev

Re: [PATCH] qla2xxx: correctly shift host byte

2018-04-06 Thread Bart Van Assche
scription of this patch that this patch does not change any functionality because DID_OK == 0. Anyway: Reviewed-by: Bart Van Assche

Re: [PATCH] qla2xxx: correctly shift host byte

2018-04-06 Thread Bart Van Assche
On Fri, 2018-04-06 at 09:52 +0200, Johannes Thumshirn wrote: > The host byte has to be shifted by 16 not 6. > > Signed-off-by: Johannes Thumshirn > --- > drivers/scsi/qla2xxx/qla_isr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/driv

Re: 4.15.14 crash with iscsi target and dvd

2018-04-06 Thread Bart Van Assche
On Fri, 2018-04-06 at 21:03 -0400, Wakko Warner wrote: > Bart Van Assche wrote: > > On Thu, 2018-04-05 at 22:06 -0400, Wakko Warner wrote: > > > I know now why scsi_print_command isn't doing anything. cmd->cmnd is > > > null. > > > I added a dev

Re: 4.15.14 crash with iscsi target and dvd

2018-04-07 Thread Bart Van Assche
On Sat, 2018-04-07 at 12:53 -0400, Wakko Warner wrote: > Bart Van Assche wrote: > > On Thu, 2018-04-05 at 22:06 -0400, Wakko Warner wrote: > > > I know now why scsi_print_command isn't doing anything. cmd->cmnd is > > > null. > > > I added a dev

Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release

2018-04-11 Thread Bart Van Assche
On Wed, 2018-04-11 at 16:28 +0200, Alexandru Moise wrote: > [0.76] BUG: unable to handle kernel NULL pointer dereference at > 01b4 > [0.763350] Kernel panic - not syncing: Attempted to kill init! > exitcode=0x0009 > [0.763350] > [0.76] PGD 0 P4D 0 > [0.

Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release

2018-04-11 Thread Bart Van Assche
On Wed, 2018-04-11 at 07:56 -0700, Tejun Heo wrote: > And looking at the change, it looks like the right thing we should > have done is caching @lock on the print_blkg side and when switching > locks make sure both locks are held. IOW, do the following in > blk_cleanup_queue() > > spin_lock

Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release

2018-04-11 Thread Bart Van Assche
On Wed, 2018-04-11 at 10:00 -0700, t...@kernel.org wrote: > On Wed, Apr 11, 2018 at 04:42:55PM +0000, Bart Van Assche wrote: > > On Wed, 2018-04-11 at 07:56 -0700, Tejun Heo wrote: > > > And looking at the change, it looks like the right thing we should > > > have d

Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release

2018-04-11 Thread Bart Van Assche
On Wed, 2018-04-11 at 10:15 -0700, t...@kernel.org wrote: > On Wed, Apr 11, 2018 at 05:06:41PM +0000, Bart Van Assche wrote: > > A simple and effective solution is to dissociate a request queue from the > > block cgroup controller before blk_cleanup_queue() returns. This is

Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release

2018-04-11 Thread Bart Van Assche
On 04/11/18 13:00, Alexandru Moise wrote: But the root cause of it is in blkcg_init_queue() when blkg_create() returns an ERR ptr, because it tries to insert into a populated index into blkcg->blkg_tree, the entry that we fail to remove at __blk_release_queue(). Hello Alex, Had you considered

Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release

2018-04-11 Thread Bart Van Assche
On Wed, 2018-04-11 at 12:57 -0700, t...@kernel.org wrote: > On Wed, Apr 11, 2018 at 01:55:25PM -0600, Bart Van Assche wrote: > > On 04/11/18 13:00, Alexandru Moise wrote: > > > But the root cause of it is in blkcg_init_queue() when blkg_create() > > > returns > >

Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release

2018-04-11 Thread Bart Van Assche
On Wed, 2018-04-11 at 13:02 -0700, t...@kernel.org wrote: > On Wed, Apr 11, 2018 at 08:00:29PM +0000, Bart Van Assche wrote: > > On Wed, 2018-04-11 at 12:57 -0700, t...@kernel.org wrote: > > > On Wed, Apr 11, 2018 at 01:55:25PM -0600, Bart Van Assche wrote: > > > >

Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release

2018-04-11 Thread Bart Van Assche
On Wed, 2018-04-11 at 23:23 +0200, Alexandru Moise wrote: > Hi, I tested it, it doesn't solve the problem. > By the time you get here it's already too late, my patch > prevents this from failing in the first place. Hello Alex, If you can share the steps to follow to trigger the bug you reported t

Re: [PATCH] block: do not use interruptible wait anywhere

2018-04-12 Thread Bart Van Assche
queue_dying(q)) > return -ENODEV; > - if (ret) > - return ret; > } > } Hello Alan, Please reindent the wait_event() arguments such that these remain aligned. Anyway: Reviewed-by: Bart Van Assche

Re: [PATCH] IB: make INFINIBAND_ADDR_TRANS configurable

2018-04-13 Thread Bart Van Assche
On Fri, 2018-04-13 at 00:06 -0700, Greg Thelen wrote: > Allow INFINIBAND without INFINIBAND_ADDR_TRANS. > > Signed-off-by: Greg Thelen > Cc: Tarick Bedeir > --- > drivers/infiniband/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/Kconfig b/dr

Re: [PATCH v2] scsi: ufs: add trace event for ufs upiu

2018-03-22 Thread Bart Van Assche
On Thu, 2018-03-22 at 13:50 +0200, Ohad Sharabi wrote: > +static void ufshcd_add_cmd_upiu_trace(struct ufs_hba *hba, unsigned int tag, > + const char *str) > +{ > + struct utp_upiu_req *rq = hba->lrb[tag].ucd_req_ptr; > + > + trace_ufshcd_upiu(dev_name(hba->dev), str, (u8 *)&rq-

Re: [PATCH] target: Use WARNON_NON_RT(!irqs_disabled())

2018-03-23 Thread Bart Van Assche
On Fri, 2018-03-23 at 16:55 +0100, Sebastian Andrzej Siewior wrote: > I am going take this into -RT tree for now until we have different > solution. Have you considered to delete the WARN_ON_ONCE(!irqs_disabled()) statement? I think that check duplicates functionality that already exists in lockde

Re: [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION

2018-04-09 Thread Bart Van Assche
On Mon, 2018-04-09 at 14:39 +0200, Johannes Thumshirn wrote: > Bart reports that in qla_isr.c's qla2x00_handle_dif_error we're > wrongly shifting the SAM_STAT_CHECK_CONDITION by one instead of > directly ORing it onto the SCSI command's result. Reviewed-by: Bart Van Assche

Re: 4.15.14 crash with iscsi target and dvd

2018-04-09 Thread Bart Van Assche
On Sun, 2018-04-08 at 12:02 -0400, Wakko Warner wrote: > I finished with git bisect. Here's the output: > 84c8590646d5b35804bac60eb58b145839b5893e is the first bad commit > commit 84c8590646d5b35804bac60eb58b145839b5893e > Author: Ming Lei > Date: Fri Nov 11 20:05:32 2016 +0800 > > target:

Re: [PATCH 6/6] lib/scatterlist: Drop order argument from sgl_free_n_order

2018-03-08 Thread Bart Van Assche
On Thu, 2018-03-08 at 07:59 +, Tvrtko Ursulin wrote: > However there is a different bug in my patch relating to the last entry > which can have shorter length from the rest. So get_order on the last > entry is incorrect - I have to store the deduced order and carry it over. Will that work if

Re: [PATCH v2 08/10] nvme-pci: Add support for P2P memory in requests

2018-03-08 Thread Bart Van Assche
On Thu, 2018-03-01 at 15:58 +, Stephen Bates wrote: > > Any plans adding the capability to nvme-rdma? Should be > > straight-forward... In theory, the use-case would be rdma backend > > fabric behind. Shouldn't be hard to test either... > > Nice idea Sagi. Yes we have been starting to look at

Re: [Possible REGRESSION, 4.16-rc4] Error updating SMART data during runtime and could not connect to lvmetad at some boot attempts

2018-03-13 Thread Bart Van Assche
On Tue, 2018-03-13 at 22:32 +0800, Ming Lei wrote: > On Tue, Mar 13, 2018 at 02:08:23PM +0100, Martin Steigerwald wrote: > > Ming and Bart, I added you to cc, cause I had to do with you about another > > blk-mq report, please feel free to adapt. > > Looks RIP points to scsi_times_out+0x17/0x1d0,

Re: [PATCH] IB/mlx4: Avoid implicit enumerated type conversion

2018-09-27 Thread Bart Van Assche
On Thu, 2018-09-27 at 16:28 -0600, Jason Gunthorpe wrote: > On Thu, Sep 27, 2018 at 01:34:16PM -0700, Nick Desaulniers wrote: > > > > Neither ib_qp_create_flags nor mlx4_ib_qp_flags have negative values, is > > > signedness necessary? > > > > enums are by default restricted to the range of ints.

Re: [PATCH] IB/mlx4: Avoid implicit enumerated type conversion

2018-09-27 Thread Bart Van Assche
On Thu, 2018-09-27 at 16:58 -0600, Jason Gunthorpe wrote: > Anyhow, the standard is hard to read in this area, but reality is > this: > > #include > > enum a > { > A1 = 1, > A2 = 1ULL<<40, > }; > > int main(int argc, const char *argv[]) > { > printf("%zu\n", sizeof(enum a)); >

Re: [PATCH 1/2] locking/lockdep: Add support for dynamic depmaps and keys

2018-11-19 Thread Bart Van Assche
On Sat, 2018-11-10 at 14:55 +0100, Peter Zijlstra wrote: > On Fri, Nov 09, 2018 at 03:46:44PM -0800, Bart Van Assche wrote: > > The lock validator forces to categorize multiple instances of a lock object > > as the same lock class because it requires that struct lockdep_map

[PATCH 19/27] locking/lockdep: Retain the class key and name while freeing a lock class

2018-11-28 Thread Bart Van Assche
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. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a

[PATCH 26/27] kernel/workqueue: Use dynamic lockdep keys for workqueues

2018-11-28 Thread Bart Van Assche
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:

[PATCH 20/27] locking/lockdep: Free lock classes that are no longer in use

2018-11-28 Thread Bart Van Assche
rom inside lockdep_init() because register_lock_class() can be called before lockdep_init() has been called. Only add freed lock classes to the free_lock_classes list after a grace period to avoid that a lock_classes[] element would be reused while an RCU reader is accessing it. Signed-off-by: Bart

[PATCH 04/27] lockdep tests: Run lockdep tests a second time under Valgrind

2018-11-28 Thread Bart Van Assche
This improves test coverage. 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 38b8c9034b8e..f1b5027925db 100755 --- a/tools/lib/lockdep

[PATCH 15/27] locking/lockdep: Make concurrent lockdep_reset_lock() calls safe

2018-11-28 Thread Bart Van Assche
Since zap_class() removes items from the all_lock_classes list and the classhash_table, protect all zap_class() calls with the graph lock. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b

[PATCH 17/27] locking/lockdep: Make zap_class() remove all matching lock order entries

2018-11-28 Thread Bart Van Assche
Make sure that all entries that refer to a class are removed from the list_entries[] array when a kernel module is unloaded. Signed-off-by: Bart Van Assche --- include/linux/lockdep.h | 1 + kernel/locking/lockdep.c | 17 +++-- 2 files changed, 12 insertions(+), 6 deletions

[PATCH 14/27] locking/lockdep: Remove a superfluous INIT_LIST_HEAD() statement

2018-11-28 Thread Bart Van Assche
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. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 1 - 1 file changed, 1

[PATCH 08/27] locking/lockdep: Declare local symbols static

2018-11-28 Thread Bart Van Assche
This patch avoids that sparse complains about a missing declaration for the lock_classes array. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 1efada2dd9dd

[PATCH 25/27] locking/lockdep: Add support for dynamic keys

2018-11-28 Thread Bart Van Assche
lockdep_unregister_key() between successive registration calls. Signed-off-by: Bart Van Assche --- include/linux/lockdep.h | 13 - kernel/locking/lockdep.c | 121 --- 2 files changed, 123 insertions(+), 11 deletions(-) diff --git a/include/linux/lockdep.h b/include/linux

[PATCH 27/27] lockdep tests: Test dynamic key registration

2018-11-28 Thread Bart Van Assche
Make sure that the lockdep_register_key() and lockdep_unregister_key() code is tested when running the lockdep tests. Signed-off-by: Bart Van Assche --- tools/lib/lockdep/include/liblockdep/common.h | 2 ++ tools/lib/lockdep/include/liblockdep/mutex.h | 11 ++- tools/lib/lockdep/tests

[PATCH 11/27] timekeeping: Assign a name to tk_core.seq.dep_map

2018-11-28 Thread Bart Van Assche
This patch makes lockdep reports that refer to tk_core.seq more informative. Cc: Thomas Gleixner Signed-off-by: Bart Van Assche --- kernel/time/timekeeping.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index

[PATCH 24/27] locking/lockdep: Introduce __lockdep_free_key_range()

2018-11-28 Thread Bart Van Assche
This patch does not change any functionality but makes the next patch in this series easier to read. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 35 +++ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/kernel/locking/lockdep.c b

[PATCH 03/27] lockdep tests: Improve testing accuracy

2018-11-28 Thread 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. Signed-off-by: Bart Van Assche --- tools/lib/lockdep/run_tests.sh| 5 +++-- tools/l

[PATCH 21/27] locking/lockdep: Rename lock_list.entry into lock_list.lock_order_entry

2018-11-28 Thread Bart Van Assche
The next patch in this series will add a new list entry member to struct lock_list. Rename the existing "entry" member to keep the lockdep source code readable. Signed-off-by: Bart Van Assche --- include/linux/lockdep.h | 3 ++- kernel/locking/lockdep.c | 9 + kern

[PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-11-28 Thread Bart Van Assche
Instead of abandoning elements of list_entries[] that are no longer in use, make alloc_list_entry() reuse array elements that have been freed. Signed-off-by: Bart Van Assche --- include/linux/lockdep.h | 5 + kernel/locking/lockdep.c | 23 --- 2 files changed, 21

[PATCH 23/27] locking/lockdep: Check data structure consistency

2018-11-28 Thread Bart Van Assche
Debugging lockdep data structure inconsistencies is challenging. Add disabled code that verifies data structure consistency at runtime. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 142 +++ 1 file changed, 142 insertions(+) diff --git a

[PATCH 18/27] locking/lockdep: Reorder struct lock_class members

2018-11-28 Thread Bart Van Assche
This patch does not change any functionality but makes the patch that frees lock classes that are no longer in use easier to read. Signed-off-by: Bart Van Assche --- include/linux/lockdep.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux

[PATCH 02/27] lockdep tests: Fix shellcheck warnings

2018-11-28 Thread Bart Van Assche
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. Signed-off-by: Bart Van Assche --- tools/lib/lockdep/run_tests.sh | 12 1 file

[PATCH 00/27] locking/lockdep: Add support for dynamic keys

2018-11-28 Thread Bart Van Assche
that this patch series is perfect. However, the code in this patch series survives nontrivial tests so I think it's worth a look. Two unrelated changes in this patch series are: - Improve the lockdep tests. - Complain if no name has been assigned to a lock object. Thanks, Bart. Bart Van

[PATCH 13/27] locking/lockdep: Complain if a lock object has no name

2018-11-28 Thread Bart Van Assche
Lockdep reports about lock objects that do not have a name are hard to interpret. Hence complain if no name has been assigned to a lock object. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/locking/lockdep.c b/kernel

[PATCH 05/27] liblockdep: Rename "trywlock" into "trywrlock"

2018-11-28 Thread Bart Van Assche
hread_rwlock_t implementation") Cc: Sasha Levin Cc: Peter Zijlstra 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/liblockdep/rwlock.h b/tools/lib/lockdep

[PATCH 06/27] liblockdep: Add dummy print_irqtrace_events() implementation

2018-11-28 Thread Bart Van Assche
This patch avoids that linking against liblockdep fails due to no print_irqtrace_events() definition being available. Signed-off-by: Bart Van Assche --- tools/lib/lockdep/lockdep.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c

[PATCH 10/27] locking/lockdep: Introduce lock_class_cache_is_registered()

2018-11-28 Thread Bart Van Assche
This patch does not change any functionality but makes the lockdep_reset_lock() function easier to read. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 50 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/kernel/locking

[PATCH 16/27] locking/lockdep: Stop using RCU primitives to access all_lock_classes

2018-11-28 Thread Bart Van Assche
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. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 12 1 file changed, 8

[PATCH 12/27] net/core: Assign a name to devnet_rename_seq.dep_map

2018-11-28 Thread Bart Van Assche
This patch makes lockdep reports about devnet_rename_seq more informative. Cc: David S. Miller Signed-off-by: Bart Van Assche --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index ddc551f24ba2..8c109a1624ba 100644 --- a/net

[PATCH 07/27] lockdep tests: Test the lockdep_reset_lock() implementation

2018-11-28 Thread Bart Van Assche
This patch makes sure that the lockdep_reset_lock() function gets tested. 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/ABBA.c| 3 +++ tools/lib/lockdep/tests

[PATCH 09/27] locking/lockdep: Inline __lockdep_init_map()

2018-11-28 Thread Bart Van Assche
Since the function __lockdep_init_map() only has one caller, inline it into its caller. This patch does not change any functionality. Signed-off-by: Bart Van Assche --- kernel/locking/lockdep.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/kernel/locking/lockdep.c b

[PATCH 01/27] lockdep tests: Display compiler warning and error messages

2018-11-28 Thread Bart Van Assche
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. Signed-off-by: Bart Van Assche --- tools/lib/lockdep/run_tests.sh | 13

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-11-29 Thread Bart Van Assche
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 Wed, Nov 28, 2018 at 03:43:20PM -0800, Bart Van Assche wrote: > > > /* > > >* Remove all dependencies this loc

Re: [PATCH 23/27] locking/lockdep: Check data structure consistency

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 13:30 +0100, Peter Zijlstra wrote: > IIRC there were a few other sites in the series, please check them all. OK, I will add braces around multi-line statement blocks. You may want to know that checkpatch didn't complain about missing braces. Bart.

Re: [PATCH 25/27] locking/lockdep: Add support for dynamic keys

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 13:04 +0100, Peter Zijlstra wrote: > On Wed, Nov 28, 2018 at 03:43:23PM -0800, Bart Van Assche wrote: > > A shortcoming of the current lockdep implementation is that it requires > > lock keys to be allocated statically. That forces certain lock objects > &g

Re: [PATCH 4.19 078/361] nvmet-rdma: use a private workqueue for delete

2018-11-11 Thread Bart Van Assche
On 11/11/18 2:17 PM, Greg Kroah-Hartman wrote: 4.19-stable review patch. If anyone has any objections, please let me know. -- From: Sagi Grimberg [ Upstream commit 2acf70ade79d26b97611a8df52eb22aa33814cd4 ] Queue deletion is done asynchronous when the last reference on the q

Re: [PATCH 22/27] locking/lockdep: Reuse list entries that are no longer in use

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 09:14 +0100, Peter Zijlstra wrote: > On Mon, Dec 03, 2018 at 10:16:59AM -0800, Bart Van Assche wrote: > > 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: > > >

Re: [PATCH v2 16/24] locking/lockdep: Retain the class key and name while freeing a lock class

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 13:57 -0500, Waiman Long wrote: > On 12/03/2018 07:28 PM, Bart Van Assche wrote: > > 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 free

Re: [PATCH v2 16/24] locking/lockdep: Retain the class key and name while freeing a lock class

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 15:31 -0500, Waiman Long wrote: > On 12/04/2018 02:08 PM, Bart Van Assche wrote: > > On Tue, 2018-12-04 at 13:57 -0500, Waiman Long wrote: > > > On 12/03/2018 07:28 PM, Bart Van Assche wrote: > > > > The next patch in this series us

Re: [PATCH v2 21/24] locking/lockdep: Verify whether lock objects are small enough to be used as class keys

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 16:08 -0500, Waiman Long wrote: > On 12/03/2018 07:28 PM, Bart Van Assche wrote: > > Cc: Peter Zijlstra > > Cc: Waiman Long > > Cc: Johannes Berg > > Signed-off-by: Bart Van Assche > > --- > > kernel/locking/lockdep.c | 9

Re: [PATCH v2 17/24] locking/lockdep: Free lock classes that are no longer in use

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 15:27 -0500, Waiman Long wrote: > On 12/03/2018 07:28 PM, Bart Van Assche wrote: > > +/* Must be called with the graph lock held. */ > > +static void remove_class_from_lock_chain(struct lock_chain *chain, > > +str

Re: [PATCH v2 21/24] locking/lockdep: Verify whether lock objects are small enough to be used as class keys

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 16:50 -0500, Waiman Long wrote: > On 12/04/2018 04:39 PM, Bart Van Assche wrote: > > On Tue, 2018-12-04 at 16:08 -0500, Waiman Long wrote: > > > On 12/03/2018 07:28 PM, Bart Van Assche wrote: > > > > Cc: Peter Zijlstra > > > >

[PATCH v3 21/24] locking/lockdep: Verify whether lock objects are small enough to be used as class keys

2018-12-06 Thread Bart Van Assche
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 8c69516b1283..a47357d3dca7 100644 --- a/kernel/locking

[PATCH v3 22/24] locking/lockdep: Add support for dynamic keys

2018-12-06 Thread Bart Van Assche
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 | 115 --- 2 files changed, 117 insertions(+), 11 deletions

[PATCH v3 10/24] locking/lockdep: Introduce lock_class_cache_is_registered()

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 14/24] locking/lockdep: Make zap_class() remove all matching lock order entries

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 04/24] lockdep tests: Run lockdep tests a second time under Valgrind

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 01/24] lockdep tests: Display compiler warning and error messages

2018-12-06 Thread Bart Van Assche
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 of it succeeded. Cc: Peter Zijlstra Cc: Waiman Long Cc: Johannes Berg Signed-off-by: Bart Van

[PATCH v3 08/24] locking/lockdep: Declare local symbols static

2018-12-06 Thread Bart Van Assche
This patch avoids that sparse complains about a missing declaration for the lock_classes array when building with CONFIG_DEBUG_LOCKDEP=n. 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

[PATCH v3 07/24] lockdep tests: Test the lockdep_reset_lock() implementation

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 16/24] locking/lockdep: Retain the class key and name while freeing a lock class

2018-12-06 Thread Bart Van Assche
The next patch in this series uses the class name in code that detects calls to lock_acquire() while a class key is being freed. 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

[PATCH v3 05/24] liblockdep: Rename "trywlock" into "trywrlock"

2018-12-06 Thread 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

[PATCH v3 17/24] locking/lockdep: Free lock classes that are no longer in use

2018-12-06 Thread Bart Van Assche
Cc: Waiman Long Cc: Johannes Berg Signed-off-by: Bart Van Assche --- include/linux/lockdep.h | 9 +- kernel/locking/lockdep.c | 242 --- 2 files changed, 208 insertions(+), 43 deletions(-) diff --git a/include/linux/lockdep.h b/include/linux/lockd

[PATCH v3 03/24] lockdep tests: Improve testing accuracy

2018-12-06 Thread 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

[PATCH v3 24/24] lockdep tests: Test dynamic key registration

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 20/24] locking/lockdep: Introduce __lockdep_free_key_range()

2018-12-06 Thread Bart Van Assche
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 | 37 ++--- 1 file changed, 22 insertions

[PATCH v3 19/24] locking/lockdep: Check data structure consistency

2018-12-06 Thread Bart Van Assche
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 | 146

[PATCH v3 23/24] kernel/workqueue: Use dynamic lockdep keys for workqueues

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 18/24] locking/lockdep: Reuse list entries that are no longer in use

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 15/24] locking/lockdep: Reorder struct lock_class members

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 13/24] locking/lockdep: Stop using RCU primitives to access all_lock_classes

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 12/24] locking/lockdep: Make concurrent lockdep_reset_lock() calls safe

2018-12-06 Thread Bart Van Assche
Since zap_class() removes items from the all_lock_classes list and the classhash_table, protect all zap_class() calls against concurrent data structure modifications with the graph lock. Cc: Peter Zijlstra Cc: Waiman Long Cc: Johannes Berg Signed-off-by: Bart Van Assche --- kernel/locking

[PATCH v3 06/24] liblockdep: Add dummy print_irqtrace_events() implementation

2018-12-06 Thread 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

[PATCH v3 00/24] locking/lockdep: Add support for dynamic keys

2018-12-06 Thread Bart Van Assche
ts. Bart. Bart Van Assche (24): lockdep tests: Display compiler warning and error messages lockdep tests: Fix shellcheck warnings lockdep tests: Improve testing accuracy lockdep tests: Run lockdep tests a second time under Valgrind liblockdep: Rename "trywlock" into "t

[PATCH v3 02/24] lockdep tests: Fix shellcheck warnings

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 09/24] locking/lockdep: Inline __lockdep_init_map()

2018-12-06 Thread Bart Van Assche
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

[PATCH v3 11/24] locking/lockdep: Remove a superfluous INIT_LIST_HEAD() statement

2018-12-06 Thread Bart Van Assche
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

<    1   2   3   4   5   6   7   8   9   10   >