search for: warn_on_onc

Displaying 20 results from an estimated 491 matches for "warn_on_onc".

Did you mean: warn_on_once
2017 Jul 14
4
[regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
Yeah, we shouldn't let the machine die. Are there more WARN_ON_ONCE usage we could convert to WARN_ONCE? Reviewed-By: Karol Herbst <karolherbst at gmail.com> On Fri, Jul 14, 2017 at 5:05 PM, Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> wrote: > On 7/14/17 3:41 PM, Mike Galbraith wrote: >> >> On Fri, 2017-07-14 at 15:36 +0...
2017 Jul 14
2
[regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
On Fri, 2017-07-14 at 15:36 +0200, Mike Galbraith wrote: >  All DRM did was to slip a > WARN_ON_ONCE() that nouveau triggers into a kernel module where such > things no longer warn, they blow the box out of the water. BTW, turn that irksome WARN_ON_ONCE() in drivers/gpu/drm/drm_vblank.c into a WARN_ONCE(), and all is peachy, you get the warning, box lives. --- drivers/gpu/drm/drm_vblank.c |...
2017 Jul 14
4
[regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
...v4.12 backmerge at > any point. The last backmerge from Linus as far as I can tell was > v4.11-rc7. Could be an interaction with some out-of-tree change. Ok, a network outage gave me time to go hunting.  Indeed it is a bad interaction with the tree DRM merged into.  All DRM did was to slip a WARN_ON_ONCE() that nouveau triggers into a kernel module where such things no longer warn, they blow the box out of the water.  I made a dinky testcase module (attached), and bisected to the real root.... 19d436268dde95389c616bb3819da73f0a8b28a8 is the first bad commit commit 19d436268dde95389c616bb3819da73f...
2018 Sep 07
0
[PATCH] virtio: add unlikely() to WARN_ON_ONCE()
...-- a/tools/virtio/linux/kernel.h +++ b/tools/virtio/linux/kernel.h @@ -123,7 +123,7 @@ static inline void free_page(unsigned long addr) #define dev_err(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__) #define dev_warn(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__) -#define WARN_ON_ONCE(cond) ((cond) ? fprintf (stderr, "WARNING\n") : 0) +#define WARN_ON_ONCE(cond) (unlikely(cond) ? fprintf (stderr, "WARNING\n") : 0) #define min(x, y) ({ \ typeof(x) _min1 = (x); \ -- 2.17.1
2017 Jul 14
1
[regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
...es.klausmann at mni.thm.de> wrote: > The conversion is a nice catch, but i'd like to have a bit more context, see > below! > > With a better description: > > Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> I don't think it was meant as a serious patch. WARN_ON_ONCE should work. The fix isn't to remove all instances of WARN_ON_ONCE. The fix is to fix WARN_ON_ONCE.
2020 Jul 29
0
[PATCH v1 3/6] mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()
....c >> +++ b/mm/page_isolation.c >> @@ -58,16 +58,12 @@ static int set_migratetype_isolate(struct page *page, int migratetype, int isol_ >> spin_unlock_irqrestore(&zone->lock, flags); >> if (!ret) { >> drain_all_pages(zone); >> - } else { >> - WARN_ON_ONCE(zone_idx(zone) == ZONE_MOVABLE); >> - >> - if ((isol_flags & REPORT_FAILURE) && unmovable) >> - /* >> - * printk() with zone->lock held will likely trigger a >> - * lockdep splat, so defer it here. >> - */ >> - dump_page(unmova...
2020 Sep 25
1
[PATCH 1/2] ext4/xfs: add page refcount helper
...6 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 994ab66a9907..8eddbcc0e149 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -358,7 +358,7 @@ static void dax_disassociate_entry(void *entry, struct address_space *mapping, for_each_mapped_pfn(entry, pfn) { struct page *page = pfn_to_page(pfn); - WARN_ON_ONCE(trunc && page_ref_count(page) > 1); + WARN_ON_ONCE(trunc && !dax_layout_is_idle_page(page)); WARN_ON_ONCE(page->mapping && page->mapping != mapping); page->mapping = NULL; page->index = 0; @@ -372,7 +372,7 @@ static struct page *dax_busy_page(void *...
2020 Nov 03
0
[patch V3 24/37] sched: highmem: Store local kmaps in task struct
.../* * With DEBUG_HIGHMEM the stack depth is doubled and every second * slot is unused which acts as a guard page @@ -379,23 +377,21 @@ static DEFINE_PER_CPU(int, __kmap_local_ static inline int kmap_local_idx_push(void) { - int idx = __this_cpu_add_return(__kmap_local_idx, KM_INCR) - 1; - WARN_ON_ONCE(in_irq() && !irqs_disabled()); - BUG_ON(idx >= KM_MAX_IDX); - return idx; + current->kmap_ctrl.idx += KM_INCR; + BUG_ON(current->kmap_ctrl.idx >= KM_TYPE_NR); + return current->kmap_ctrl.idx - 1; } static inline int kmap_local_idx(void) { - return __this_cpu_read(__kmap...
2017 Jul 14
0
[regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
The conversion is a nice catch, but i'd like to have a bit more context, see below! With a better description: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> On 7/14/17 5:10 PM, Karol Herbst wrote: > Yeah, we shouldn't let the machine die. Are there more WARN_ON_ONCE > usage we could convert to WARN_ONCE? > > Reviewed-By: Karol Herbst <karolherbst at gmail.com> > > On Fri, Jul 14, 2017 at 5:05 PM, Tobias Klausmann > <tobias.johannes.klausmann at mni.thm.de> wrote: >> On 7/14/17 3:41 PM, Mike Galbraith wrote: >>> On...
2020 Aug 21
0
[PATCH v1 1/5] kernel/resource: make release_mem_region_adjustable() never fail
...of metadata (memmap, page tables, memory block device, etc.). The only way it could really fail currently is when injecting allocation errors. All other error cases inside release_mem_region_adjustable() seem to be sanity checks if the function would be abused in different context - let's add WARN_ON_ONCE(). Cc: Andrew Morton <akpm at linux-foundation.org> Cc: Michal Hocko <mhocko at suse.com> Cc: Dan Williams <dan.j.williams at intel.com> Cc: Jason Gunthorpe <jgg at ziepe.ca> Cc: Kees Cook <keescook at chromium.org> Cc: Ard Biesheuvel <ardb at kernel.org> Cc: P...
2020 Sep 11
0
[PATCH v4 1/8] kernel/resource: make release_mem_region_adjustable() never fail
...t of metadata (memmap, page tables, memory block device, etc.). The only reason it could really fail would be when injecting allocation errors. All other error cases inside release_mem_region_adjustable() seem to be sanity checks if the function would be abused in different context - let's add WARN_ON_ONCE() in these cases so we can catch them. Cc: Andrew Morton <akpm at linux-foundation.org> Cc: Michal Hocko <mhocko at suse.com> Cc: Dan Williams <dan.j.williams at intel.com> Cc: Jason Gunthorpe <jgg at ziepe.ca> Cc: Kees Cook <keescook at chromium.org> Cc: Ard Biesheu...
2017 Jul 14
0
[regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
On 7/14/17 3:41 PM, Mike Galbraith wrote: > On Fri, 2017-07-14 at 15:36 +0200, Mike Galbraith wrote: >>  All DRM did was to slip a >> WARN_ON_ONCE() that nouveau triggers into a kernel module where such >> things no longer warn, they blow the box out of the water. > BTW, turn that irksome WARN_ON_ONCE() in drivers/gpu/drm/drm_vblank.c > into a WARN_ONCE(), and all is peachy, you get the warning, box lives. > > --- > dr...
2020 Oct 01
0
[RFC PATCH v3 1/2] ext4/xfs: add page refcount helper
...9 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 5b47834f2e1b..85c63f735909 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -358,7 +358,7 @@ static void dax_disassociate_entry(void *entry, struct address_space *mapping, for_each_mapped_pfn(entry, pfn) { struct page *page = pfn_to_page(pfn); - WARN_ON_ONCE(trunc && page_ref_count(page) > 1); + WARN_ON_ONCE(trunc && !dax_layout_is_idle_page(page)); WARN_ON_ONCE(page->mapping && page->mapping != mapping); page->mapping = NULL; page->index = 0; @@ -372,7 +372,7 @@ static struct page *dax_busy_page(void *...
2019 Jul 22
0
[PATCH 1/2] dma-mapping: Protect dma_addressing_limited against NULL dma_mask
dma_addressing_limited() should not be called on a device with a NULL dma_mask. If this occurs let's WARN_ON_ONCE and immediately return. Existing call sites are updated separately. Fixes: b866455423e0 ("dma-mapping: add a dma_addressing_limited helper") Signed-off-by: Eric Auger <eric.auger at redhat.com> --- v1 -> v2: - add a WARN_ON_ONCE() - reword the commit message --- include/linu...
2020 Aug 10
0
[PATCH v4 0/6] mm / virtio-mem: support ZONE_MOVABLE
...unplugged. > > Cleanup has_unmovable_pages() and set_migratetype_isolate(), providing > better documentation of how ZONE_MOVABLE interacts with different kind of > unmovable pages (memory offlining vs. alloc_contig_range()). > > v3 -> v4: > - "mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()" > -- Fix typo in description > - "virtio-mem: don't special-case ZONE_MOVABLE" > -- Add more details why we initialli special-cased ZONE_MOVABLE (via MST) > - "mm: document semantics of ZONE_MOVABLE" > -- Rephrase some par...
2019 Jul 22
4
[PATCH v2] dma-mapping: Use dma_get_mask in dma_addressing_limited
We currently have cases where the dma_addressing_limited() gets called with dma_mask unset. This causes a NULL pointer dereference. Use dma_get_mask() accessor to prevent the crash. Fixes: b866455423e0 ("dma-mapping: add a dma_addressing_limited helper") Signed-off-by: Eric Auger <eric.auger at redhat.com> --- v1 -> v2: - was [PATCH 1/2] dma-mapping: Protect
2019 Jul 22
4
[PATCH v2] dma-mapping: Use dma_get_mask in dma_addressing_limited
We currently have cases where the dma_addressing_limited() gets called with dma_mask unset. This causes a NULL pointer dereference. Use dma_get_mask() accessor to prevent the crash. Fixes: b866455423e0 ("dma-mapping: add a dma_addressing_limited helper") Signed-off-by: Eric Auger <eric.auger at redhat.com> --- v1 -> v2: - was [PATCH 1/2] dma-mapping: Protect
2019 Jul 22
6
[PATCH 0/2] Fix NULL pointer dereference with virtio-blk-pci and virtual IOMMU
When running a guest featuring a virtio-blk-pci protected with a virtual IOMMU we hit a NULL pointer dereference. This series removes the dma_max_mapping_size() call in virtio_max_dma_size when the device does not have any dma_mask set. A check is also added to early return in dma_addressing_limited() if the dma_mask is NULL. Eric Auger (2): dma-mapping: Protect dma_addressing_limited against
2020 Apr 04
0
[PATCH 5/6] kernel: better document the use_mm/unuse_mm API contract
Switch the function documentation to kerneldoc comments, and add WARN_ON_ONCE asserts that the calling thread is a kernel thread and does not have ->mm set (or has ->mm set in the case of unuse_mm). Also give the functions a kthread_ prefix to better document the use case. Signed-off-by: Christoph Hellwig <hch at lst.de> --- drivers/gpu/drm/amd/amdgpu/amdgpu_...
2020 Sep 25
0
[PATCH 1/2] ext4/xfs: add page refcount helper
...07..8eddbcc0e149 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -358,7 +358,7 @@ static void dax_disassociate_entry(void *entry, struct address_space *mapping, > for_each_mapped_pfn(entry, pfn) { > struct page *page = pfn_to_page(pfn); > > - WARN_ON_ONCE(trunc && page_ref_count(page) > 1); > + WARN_ON_ONCE(trunc && !dax_layout_is_idle_page(page)); > WARN_ON_ONCE(page->mapping && page->mapping != mapping); > page->mapping = NULL; > page-&gt...