search for: is_valid

Displaying 20 results from an estimated 35 matches for "is_valid".

2019 Jun 05
10
[PATCH 1/4] drm/virtio: Ensure cached capset entries are valid before copying.
...); goto copy_exit; } @@ -537,6 +536,7 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, virtio_gpu_cmd_get_capset(vgdev, found_valid, args->cap_set_ver, &cache_ent); +copy_exit: ret = wait_event_timeout(vgdev->resp_wq, atomic_read(&cache_ent->is_valid), 5 * HZ); if (!ret) @@ -544,7 +544,6 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, ptr = cache_ent->caps_cache; -copy_exit: if (copy_to_user((void __user *)(unsigned long)args->addr, ptr, size)) return -EFAULT; -- 2.22.0.rc1.311.g5d7573a151-goog
2004 Sep 01
0
[LLVMdev] FreeBSD Support In lib/System
...en.cpp > Compiling TableGenBackend.cpp > Linking tblgen debug executable (without symbols) > /usr/home/llvm/obj/lib/Debug/libLLVMsystem.a(Path.o): In function `llvm::sys::Path::is_file() const': > /usr/include/c++/3.3/bits/basic_string.h:889: undefined reference to `llvm::sys::Path::is_valid() const' > /usr/home/llvm/obj/lib/Debug/libLLVMsystem.a(Path.o): In function `llvm::sys::Path::is_directory() const': > /usr/include/c++/3.3/bits/basic_string.h:891: undefined reference to `llvm::sys::Path::is_valid() const' > /usr/home/llvm/obj/lib/Debug/libLLVMsystem.a(Path.o...
2004 Aug 31
9
[LLVMdev] POSIX compliance
Reid, >As for Interix support in general, I'm having a hard time determining >which variant of Unix Interix implements. It seems to be partially Posix >1 and partially Posix 2 based. Do you have any further information >related to the specific standards supported by Interix? I don't want to >incorrectly categorize the Interix support. I've discussed this subject with
2019 Jul 19
0
[PATCH AUTOSEL 4.14 15/60] drm/virtio: Add memory barriers for capset cache.
...ctl.c index ed9c443bb8a1..40cc2f6707cf 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -523,6 +523,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, ret = wait_event_timeout(vgdev->resp_wq, atomic_read(&cache_ent->is_valid), 5 * HZ); + /* is_valid check must proceed before copy of the cache entry. */ + smp_rmb(); + ptr = cache_ent->caps_cache; copy_exit: diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 26a2da1f712d..21c2de81f3e3 100644 --- a/drivers/gpu/drm/virtio...
2019 Jul 19
0
[PATCH AUTOSEL 4.9 13/45] drm/virtio: Add memory barriers for capset cache.
...ctl.c index 54639395aba0..a3559b1a3a0f 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -521,6 +521,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, ret = wait_event_timeout(vgdev->resp_wq, atomic_read(&cache_ent->is_valid), 5 * HZ); + /* is_valid check must proceed before copy of the cache entry. */ + smp_rmb(); + ptr = cache_ent->caps_cache; copy_exit: diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 52436b3c01bb..a1b3ea1ccb65 100644 --- a/drivers/gpu/drm/virtio...
2019 Jul 19
0
[PATCH AUTOSEL 4.4 10/35] drm/virtio: Add memory barriers for capset cache.
...ctl.c index 6296e9f270ca..0b8f8c10f2ed 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -535,6 +535,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, ret = wait_event_timeout(vgdev->resp_wq, atomic_read(&cache_ent->is_valid), 5 * HZ); + /* is_valid check must proceed before copy of the cache entry. */ + smp_rmb(); + ptr = cache_ent->caps_cache; copy_exit: diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 52436b3c01bb..a1b3ea1ccb65 100644 --- a/drivers/gpu/drm/virtio...
2004 Sep 19
0
[LLVMdev] Files to lib/System/Win32
Completed testing. Diffs for Path.cpp attached to fix bugs. Some of them are probably present in the Unix version as well. There are some uses of ThrowError when there is no error present in errno to format. A throw statement should be used. Path::is_valid uses realpath on Unix. The problem is that realpath validates that all the directory components of the path actually exist and are executable. There are two problems with this. First, Path.h states that is_valid does syntactic validation only. Second, it is impossible to create a series of nest...
2004 Aug 31
0
[LLVMdev] FreeBSD Support In lib/System
Jeff/Vladimir: As with Interix, I've recently added support for FreeBSD into lib/System. Currently, the implementation of FreeBSD just uses the "generic Unix" implementation which probably should work on FreeBSD. If not, I would appreciate it if you could make patches in the FreeBSD directory. If you do, don't forget that you need to remove anything that doesn't work in the
2004 Sep 19
2
[LLVMdev] Files to lib/System/Win32
Patch committed. Thanks for cleaning up some of the coding standards issues. Reid. On Sat, 2004-09-18 at 22:18, Jeff Cohen wrote: > Patch for Signals.cpp attached. > > On Sat, 18 Sep 2004 21:30:12 -0700 > Jeff Cohen <jeffc at jolt-lang.org> wrote: > > > On Sat, 18 Sep 2004 12:30:41 -0700 > > Reid Spencer <reid at x10sys.com> wrote: > > > >
2019 Jun 05
0
[PATCH 4/4] drm/virtio: Add memory barriers for capset cache.
...pu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 88c1ed57a3c5..502f5f7c2298 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -542,6 +542,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, if (!ret) return -EBUSY; + /* is_valid check must proceed before copy of the cache entry. */ + virt_rmb(); + ptr = cache_ent->caps_cache; if (copy_to_user((void __user *)(unsigned long)args->addr, ptr, size)) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index dd5ead2541c2..b974eba4fe...
2019 Jun 10
0
[PATCH v2 4/4] drm/virtio: Add memory barriers for capset cache.
...pu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 88c1ed57a3c5..a50495083d6f 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -542,6 +542,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, if (!ret) return -EBUSY; + /* is_valid check must proceed before copy of the cache entry. */ + smp_rmb(); + ptr = cache_ent->caps_cache; if (copy_to_user((void __user *)(unsigned long)args->addr, ptr, size)) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index dd5ead2541c2..c7a5ca02724...
2019 Jul 19
0
[PATCH AUTOSEL 5.2 054/171] drm/virtio: Add memory barriers for capset cache.
...pu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 949a264985fc..19fbffd0f7a3 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -542,6 +542,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, if (!ret) return -EBUSY; + /* is_valid check must proceed before copy of the cache entry. */ + smp_rmb(); + ptr = cache_ent->caps_cache; copy_exit: diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 5bb0f0a084e9..a7684f9c80db 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers...
2019 Jul 19
0
[PATCH AUTOSEL 5.1 039/141] drm/virtio: Add memory barriers for capset cache.
...pu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 14ce8188c052..fe822d86fb8b 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -597,6 +597,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, if (!ret) return -EBUSY; + /* is_valid check must proceed before copy of the cache entry. */ + smp_rmb(); + ptr = cache_ent->caps_cache; copy_exit: diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 3ef24f89ef93..35751d0b2df0 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers...
2019 Jul 19
0
[PATCH AUTOSEL 4.19 027/101] drm/virtio: Add memory barriers for capset cache.
...pu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 7bdf6f0e58a5..8d2f5ded86d6 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -528,6 +528,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, if (!ret) return -EBUSY; + /* is_valid check must proceed before copy of the cache entry. */ + smp_rmb(); + ptr = cache_ent->caps_cache; copy_exit: diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 020070d483d3..c8a581b1f4c4 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers...
2006 Mar 19
0
Patch -- Decode Position for libFLAC++ file and seekable_stream decoder
...--- src/libFLAC++/file_decoder.cpp 25 Jan 2005 04:18:35 -0000 1.9 +++ src/libFLAC++/file_decoder.cpp 20 Mar 2006 05:53:19 -0000 @@ -159,6 +159,12 @@ return ::FLAC__file_decoder_get_blocksize(decoder_); } + bool File::get_decode_position(FLAC__uint64 *position) const + { + FLAC__ASSERT(is_valid()); + return (bool)::FLAC__file_decoder_get_decode_position(decoder_, position); + } + File::State File::init() { FLAC__ASSERT(0 != decoder_); Index: src/libFLAC++/seekable_stream_decoder.cpp =================================================================== RCS file: /cvsroot/flac/fl...
2006 Jun 15
8
rails saves it to the database and I don''t want to
Hello: I am developing a web application to book machines for an event. so I have an event model class Event < ActiveRecord::Base has_many :datetimes ... end and a datetime model class Datetime < ActiveRecord::Base belongs_to :event ... end I have developed a view with the event information and information for the datetimes. and in the event_controller when I capture a datetime I
2005 Oct 16
1
Trivial Implementation for future libFLAC++ releases
Josh, I added the following trivial implementation of the C++ file decoder FLAC::Decoder::File::get_decode_position() to my file_decoder.cpp file... bool File::get_decode_position(FLAC__uint64 *position) const { FLAC__ASSERT(is_valid()); return (bool)::FLAC__file_decoder_get_decode_position(decoder_, position); } I would humbly suggest it be included in future libFLAC++ releases. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac/attachments/2005...
2019 Jul 03
2
[PATCH 1/5] mm: return valid info from hmm_range_unregister
On Wed, Jul 03, 2019 at 11:44:58AM -0700, Christoph Hellwig wrote: > Checking range->valid is trivial and has no meaningful cost, but > nicely simplifies the fastpath in typical callers. It should not be the typical caller.. > hmm_vma_range_done function, which now is a trivial wrapper around > hmm_range_unregister. > > Signed-off-by: Christoph Hellwig <hch at
2017 Nov 27
0
[PATCH] drm/virtio: Don't return invalid caps on timeout
...l.c index b94bd5440e57..902120ad4a6d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -517,6 +517,8 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, ret = wait_event_timeout(vgdev->resp_wq, atomic_read(&cache_ent->is_valid), 5 * HZ); + if (!ret) + return -EBUSY; ptr = cache_ent->caps_cache; -- 2.14.3
2017 Nov 27
0
[PATCH] drm/virtio: Don't return invalid caps on timeout
...l.c index b94bd5440e57..902120ad4a6d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -517,6 +517,8 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, ret = wait_event_timeout(vgdev->resp_wq, atomic_read(&cache_ent->is_valid), 5 * HZ); + if (!ret) + return -EBUSY; ptr = cache_ent->caps_cache; -- 2.14.3