search for: scnprintf

Displaying 18 results from an estimated 18 matches for "scnprintf".

2023 Jun 13
1
[BUG] ocfs2/dlm: possible data races in dlm_drop_lockres_ref_done() and dlm_get_lock_resource()
...in dlmdebug.c spin_lock(&res->spinlock); --> Line 574 in dlmdebug.c (Lock res->spinlock) dump_lockres(res, ...); --> Line 575 in fs/ocfs2/dlm/dlmdebug.c stringify_lockname(res->lockname.name, ...); --> Line 493 in dlmdebug.c (Access res->lockname.name) scnprintf(..., res->owner, ...); -->Line 498 in dlmdebug.c (Access res->owner) However, in the following calling contexts: dlm_deref_lockres_worker() --> Line 2439 in dlmmaster.c dlm_drop_lockres_ref_done() --> Line 2459 in dlmmaster.c lockname = res->lockname.name; --> Li...
2023 Jun 16
1
[BUG] ocfs2/dlm: possible data races in dlm_drop_lockres_ref_done() and dlm_get_lock_resource()
...ock(&res->spinlock); --> Line 574 in dlmdebug.c (Lock > res->spinlock) > dump_lockres(res, ...); --> Line 575 in fs/ocfs2/dlm/dlmdebug.c > stringify_lockname(res->lockname.name, ...); --> Line 493 in > dlmdebug.c (Access res->lockname.name) > scnprintf(..., res->owner, ...); -->Line 498 in dlmdebug.c (Access > res->owner) > > However, in the following calling contexts: > > dlm_deref_lockres_worker() --> Line 2439 in dlmmaster.c > dlm_drop_lockres_ref_done() --> Line 2459 in dlmmaster.c > lockname...
2013 Sep 05
0
[PATCH RESEND v3 3/7] Intel MIC Host Driver, card OS state management.
...atic DEVICE_ATTR(stepping, S_IRUGO, mic_show_stepping, NULL); +static ssize_t +mic_show_state(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct mic_device *mdev = dev_get_drvdata(dev->parent); + + if (!mdev || mdev->state >= MIC_LAST) + return -EINVAL; + + return scnprintf(buf, PAGE_SIZE, "%s\n", + mic_state_string[mdev->state]); +} + +static ssize_t +mic_store_state(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + int rc = 0; + struct mic_device *mdev = dev_get_drvdata(dev->parent); + if (!mdev) + return -EIN...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...k and break case COLOR_SPACE_SRGB: /* by pass */ REG_SET(OUTPUT_CSC_CONTROL, 0, OUTPUT_CSC_GRPH_MODE, 0); break; - break; The exception to the simple statement, is a switch case with a block and the end of block is a return struct obj_buffer *buff = r->ptr; return scnprintf(str, PRIV_STR_SIZE, "size=%u\naddr=0x%X\n", buff->size, buff->addr); } - break; Not considered obvious and excluded, breaks after multi level switches complicated if-else if-else blocks panic() or similar calls And there is an odd addition of a 'fallthrough'...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...k and break case COLOR_SPACE_SRGB: /* by pass */ REG_SET(OUTPUT_CSC_CONTROL, 0, OUTPUT_CSC_GRPH_MODE, 0); break; - break; The exception to the simple statement, is a switch case with a block and the end of block is a return struct obj_buffer *buff = r->ptr; return scnprintf(str, PRIV_STR_SIZE, "size=%u\naddr=0x%X\n", buff->size, buff->addr); } - break; Not considered obvious and excluded, breaks after multi level switches complicated if-else if-else blocks panic() or similar calls And there is an odd addition of a 'fallthrough'...
2023 Jun 13
0
[BUG] ocfs2/dlm: possible data races in dlm_drop_lockres_ref_done() and dlm_get_lock_resource()
...mdebug.c ??? spin_lock(&res->spinlock); --> Line 574 in dlmdebug.c (Lock res->spinlock) ??? dump_lockres(res, ...); --> Line 575 in fs/ocfs2/dlm/dlmdebug.c ????? stringify_lockname(res->lockname.name, ...);? --> Line 493 in dlmdebug.c (Access res->lockname.name) ????? scnprintf(..., res->owner, ...);? -->Line 498 in dlmdebug.c (Access res->owner) However, in the following calling contexts: ? dlm_deref_lockres_worker() --> Line 2439 in dlmmaster.c ??? dlm_drop_lockres_ref_done() --> Line 2459 in dlmmaster.c ????? lockname = res->lockname.name; --&gt...
2014 Jan 07
0
[PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
...r buf[32]; + struct ewma avg; + unsigned int start, len; + + /* Don't allow partial reads. */ + if (*ppos) + return 0; + do { + start = read_seqcount_begin(&rq_stats->dbg_seq); + avg = rq_stats->avg_pkt_len; + } while (read_seqcount_retry(&rq_stats->dbg_seq, start)); + len = scnprintf(buf, sizeof(buf), "%u\n", get_mergeable_buf_len(&avg)); + return simple_read_from_buffer(userbuf, count, ppos, buf, len); +} + +void receive_queue_stats_free(struct kref *ref) +{ + struct receive_queue_stats *rq_stats; + + rq_stats = container_of(ref, struct receive_queue_stats, refco...
2013 Sep 05
0
[PATCH RESEND v3 1/7] Intel MIC Host Driver for X100 family.
...const char unknown[] = "Unknown"; + const char *card = NULL; + struct mic_device *mdev = dev_get_drvdata(dev->parent); + + if (!mdev) + return -EINVAL; + + switch (mdev->family) { + case MIC_FAMILY_X100: + card = x100; + break; + default: + card = unknown; + break; + } + return scnprintf(buf, PAGE_SIZE, "%s\n", card); +} +static DEVICE_ATTR(family, S_IRUGO, mic_show_family, NULL); + +static ssize_t +mic_show_stepping(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct mic_device *mdev = dev_get_drvdata(dev->parent); + char *string = "??"...
2006 Jul 26
5
[Fwd: stack overflow "cause" found]
...shadow_map_l1_into_current_l2: 272 0xffff8300001a9d48 vmx_initialize_guest_resources: 272 0xffff8300001c879c paging_init: 272 0xffff83000010d4d4 __gnttab_map_grant_ref: 256 0xffff83000012780f vsnprintf: 256 0xffff83000012842e scnprintf: 256 0xffff83000014ee3a ptwr_emulated_update: 256 0xffff8300001afb43 vmx_set_cr0: 256 0xffff8300001b05c9 vmx_set_cr0: 256 0xffff8300001336d1 arch_domain_create: 248 0xffff8300001342f0 arch_doma...
2012 Jan 25
4
Fwd: BUG in linux+v3.2.1/drivers/xen/xen-pciback/pci_stub.c
First, maintainer''s addresses (Ryan Wilson <hap9@epoch.ncsc.mil>, Chris Bookholt <hap10@epoch.ncsc.mil>) are wrong (users unknown to remote mailsystem), so posting to you: PCI bus format strings are wrong. "%04x:%02x:%02x.%d" should be used instead of "%04x:%02x:%02x.%1x" (in many places of linux+v3.2.1/drivers/xen/xen-pciback/pci_stub.c) --
2014 Jan 07
10
[PATCH net-next v2 1/4] net: allow > 0 order atomic page alloc in skb_page_frag_refill
skb_page_frag_refill currently permits only order-0 page allocs unless GFP_WAIT is used. Change skb_page_frag_refill to attempt higher-order page allocations whether or not GFP_WAIT is used. If memory cannot be allocated, the allocator will fall back to successively smaller page allocs (down to order-0 page allocs). This change brings skb_page_frag_refill in line with the existing page allocation
2014 Jan 07
10
[PATCH net-next v2 1/4] net: allow > 0 order atomic page alloc in skb_page_frag_refill
skb_page_frag_refill currently permits only order-0 page allocs unless GFP_WAIT is used. Change skb_page_frag_refill to attempt higher-order page allocations whether or not GFP_WAIT is used. If memory cannot be allocated, the allocator will fall back to successively smaller page allocs (down to order-0 page allocs). This change brings skb_page_frag_refill in line with the existing page allocation
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog: ========= v2 => v3: a) Patch 1 data structure cleanups, header file include cleanups, IDA interface reuse and switching to device_create_with_groups(..) as per feedback from Greg Kroah-Hartman. b) Patch 7 signal documentation, sleep workaround removal and sysfs access API cleanups as per feedback from Michael S. Tsirkin. v1 => v2: @ http://lwn.net/Articles/563131/ a)
2007 Jul 06
6
[RFC 0/4] Using a generic bus_type for virtio
This is a subject that came up in the virtio BOF session at OLS. I decided to go forward and implement something that I like, based on the latest virtio proposal at the time, which was draft III. It's not a drop-in replacement, because it's missing a host implementation. I first started my own, which is not done yet, but wanted to do one for lguest and one for emulated PCI next. It's
2007 Jul 06
6
[RFC 0/4] Using a generic bus_type for virtio
This is a subject that came up in the virtio BOF session at OLS. I decided to go forward and implement something that I like, based on the latest virtio proposal at the time, which was draft III. It's not a drop-in replacement, because it's missing a host implementation. I first started my own, which is not done yet, but wanted to do one for lguest and one for emulated PCI next. It's