) with reads
as well, which should match your scenario.
I attached a patch that deals with this problem by grabbing refcounts to
cifs superblock on cifsInodeInfo creation. This delays sb destruction
until all cifsInodeInfos are gone. I didn't test it on 3.7.10 kernel but
it should work fine.
--
Mateusz
On Mon, Nov 25, 2013 at 11:53:24AM -0800, Shawn Landden wrote:
On Mon, Nov 25, 2013 at 10:05 AM, Jason Baron jba...@akamai.com wrote:
On 11/22/2013 12:53 PM, Shawn Landden wrote:
Hello, when running the attached program on 3.12 child processes
are missing a socket fd opened, set with
the ioctx list to
table lookup v3.
Fix the problem by restoring appropriate locking.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
Reported-by: Eryu Guan eg...@redhat.com
Cc: Jeff Moyer jmo...@redhat.com
Cc: Kent Overstreet k...@daterainc.com
Cc: linux-...@kvack.org
Cc: linux-kernel@vger.kernel.org
On Thu, Dec 05, 2013 at 05:03:47PM -0800, Greg KH wrote:
On Thu, Dec 05, 2013 at 11:09:02AM +0100, Mateusz Guzik wrote:
Commit 36f5588905c10a8c4568a210d601fe8c3c27e0f0
aio: refcounting cleanup resulted in ioctx_lock not being held
during ctx removal, leaving the list susceptible
now.
SWP_USED would be cleared as it is and would be set in _enable_swap_info
Then swap_info_get would be left unchanged and swap_* would test for
SWP_USED only.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
-by: Mateusz Guzik mgu...@redhat.com
---
fs/aio.c | 33 +++--
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 062a5f6..0701181 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -766,38 +766,35 @@ void exit_aio(struct mm_struct *mm)
{
struct
or underflow.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
Cc: Rik van Riel r...@redhat.com
---
include/linux/kref.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/kref.h b/include/linux/kref.h
index 484604d..c3f8a0a 100644
--- a/include/linux/kref.h
+++ b/include
On Thu, Feb 20, 2014 at 01:14:40PM -0500, Dave Jones wrote:
On Thu, Feb 20, 2014 at 06:44:59PM +0100, Mateusz Guzik wrote:
In use after free situations, it is possible for one thread to write to
memory that has just been reallocated to a new user. This could open up
potential security
Otherwise the kernel oopses when remounting with IPv6 server because
net is dereferenced in dev_get_by_name.
Use net ns of current thread so that dev_get_by_name does not operate on
foreign ns. Changing the address is prohibited anyway so this should not
affect anything.
Signed-off-by: Mateusz
13 10:01:00 2011 +
net: ipv4: add IPPROTO_ICMP socket kind
starting with 3.0.
Thanks,
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
On Thu, May 15, 2014 at 07:54:57AM +1000, Dave Chinner wrote:
On Tue, May 13, 2014 at 08:31:02PM +0200, Mateusz Guzik wrote:
This helps hang troubleshooting efforts when only dmesg is available.
I really don't think that spamming dmesg every time a filesystem is
frozen or thawed is a good
PM, Dave Chinner wrote:
On Thu, May 15, 2014 at 08:00:52AM +1000, Dave Chinner wrote:
On Wed, May 14, 2014 at 01:39:45PM +0200, Jan Kara wrote:
On Wed 14-05-14 13:26:21, Mateusz Guzik wrote:
On Wed, May 14, 2014 at 01:14:49PM +0200, Jan Kara wrote:
On Wed 14-05-14 00:04:43, Mateusz
] ---[ end trace 02450728e2526283 ]---
This is apparently a very common thing to hit according to google.
Well, it warns about an argument received from userland, so nothing fishy
going on as far as kernel consistency is concerned if that's what you mean.
--
Mateusz Guzik
--
To unsubscribe from
On Fri, May 16, 2014 at 08:21:35AM +1000, Dave Chinner wrote:
On Thu, May 15, 2014 at 12:47:48PM +0200, Mateusz Guzik wrote:
On Thu, May 15, 2014 at 12:40:19PM +0200, Lukáš Czerner wrote:
On Wed, 14 May 2014, Eric Sandeen wrote:
Date: Wed, 14 May 2014 17:40:22 -0500
From: Eric
On Fri, May 16, 2014 at 08:51:41AM +1000, Dave Chinner wrote:
On Fri, May 16, 2014 at 12:34:40AM +0200, Mateusz Guzik wrote:
On Fri, May 16, 2014 at 08:21:35AM +1000, Dave Chinner wrote:
IOW, a new column in mountinfo. For frozen filesystems it would contain
'frozen_by=[%s]:[%d
On Fri, May 16, 2014 at 10:11:56AM +1000, Dave Chinner wrote:
On Fri, May 16, 2014 at 01:19:09AM +0200, Mateusz Guzik wrote:
Except there is no log entry if /var got frozen (and this is not an
imaginary example).
Freezing the filesystem that the freezing daemon logs to is, well, a
major
.
i.e.
WARN_ON(count atomic_read(kref-refcount));
this also detects your original problem.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
pairs like:
sprintf(dp, ...);
dp += strlen(...)
with:
dp += sprintf(dp, ...);
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
for this function
may not be called when you jump here.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http
On Sat, May 17, 2014 at 06:21:09PM +0100, Al Viro wrote:
On Sat, May 17, 2014 at 05:44:28PM +0200, Mateusz Guzik wrote:
This particular function would be better of with removing this variable
and replacing all pairs like:
sprintf(dp, ...);
dp += strlen(...)
with:
dp += sprintf(dp
While here use pr_err instead of printk(KERN_ERR...)
Signed-off-by: Mateusz Guzik mgu...@redhat.com
Cc: linux-fsde...@vger.kernel.org
Cc: Josef Bacik jba...@fb.com
Cc: Jan Kara j...@suse.cz
Cc: Al Viro v...@zeniv.linux.org.uk
Cc: Eric Sandeen esand...@redhat.com
---
fs/super.c | 6 ++
1
This helps hang troubleshooting efforts when only dmesg is available.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
Cc: linux-fsde...@vger.kernel.org
Cc: Josef Bacik jba...@fb.com
Cc: Jan Kara j...@suse.cz
Cc: Al Viro v...@zeniv.linux.org.uk
Cc: Eric Sandeen esand...@redhat.com
---
fs/super.c
On Tue, May 13, 2014 at 11:39:31AM -0700, Joe Perches wrote:
On Tue, 2014-05-13 at 20:31 +0200, Mateusz Guzik wrote:
This helps hang troubleshooting efforts when only dmesg is available.
[]
diff --git a/fs/super.c b/fs/super.c
[]
@@ -1289,12 +1289,9 @@ int freeze_super(struct super_block
On Tue, May 13, 2014 at 12:00:21PM -0700, Joe Perches wrote:
On Tue, 2014-05-13 at 20:53 +0200, Mateusz Guzik wrote:
This is the same code which you can find at the end of the function.
I added the label so that I can write freeze printk only once.
Yes, but for a read-only filesystem
While here use pr_err instead of printk(KERN_ERR...)
Signed-off-by: Mateusz Guzik mgu...@redhat.com
Cc: linux-fsde...@vger.kernel.org
Cc: Josef Bacik jba...@fb.com
Cc: Jan Kara j...@suse.cz
Cc: Al Viro v...@zeniv.linux.org.uk
Cc: Eric Sandeen esand...@redhat.com
---
fs/super.c | 6 ++
1 file
This helps hang troubleshooting efforts when only dmesg is available.
While here remove code duplication with MS_RDONLY case and fix a whitespace nit.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
Cc: linux-fsde...@vger.kernel.org
Cc: Josef Bacik jba...@fb.com
Cc: Jan Kara j...@suse.cz
Cc: Al
-hdr.setup_data examination is correct,
so not commenting on that.
What prevents the loop from overflowing the table?
Additinally reaching the limit should at least result in a big fat warning.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body
On Wed, May 14, 2014 at 01:14:49PM +0200, Jan Kara wrote:
On Wed 14-05-14 00:04:43, Mateusz Guzik wrote:
This helps hang troubleshooting efforts when only dmesg is available.
While here remove code duplication with MS_RDONLY case and fix a
whitespace nit.
I'm somewhat undecided here I
calculations of avg_atom for big nr_switches are now correct.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
Cc: Ingo Molnar mi...@redhat.com
Cc: Peter Zijlstra pet...@infradead.org
Cc: sta...@vger.kernel.org
---
kernel/sched/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
can be found here:
http://kernelnewbies.org/FAQ/KernelCompilation
I would also suggest letting the patch wait few hours and have another
look before sending.
Cheers,
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
be swapped in due to I/O errors).
Also since you are just putting 0 in there anyway I don't see much point
in testing for it.
+ context-cmdline = buf;
+ }
+ msg = context-cmdline;
+out:
+ audit_log_untrustedstring(ab, msg);
+}
+
--
Mateusz Guzik
--
To unsubscribe from
Compat function takes msgtyp argument as u32 and passes it down to
do_msgrcv which results in casting to long, thus the sign is lost
and we get a big positive number instead.
Cast the argument to signed type before passing it down.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
Reported
- __clear_close_on_exec(fd, fdt);
spin_unlock(files-file_lock);
if (tofree)
From my reading this will break at least the following:
fd = open(..., .. | O_CLOEXEC);
dup2(whatever, fd);
now fd has O_CLOEXEC even though it should not
--
Mateusz Guzik
--
To unsubscribe from this list: send
On Sun, Apr 27, 2014 at 08:39:32PM +0300, Dan Carpenter wrote:
On Sat, Apr 26, 2014 at 11:59:46PM +0200, Mateusz Guzik wrote:
And sadly enough some of those -id strings are more than 15 characters
and a NUL which will fit in card-id. So this overflow is real. The
card-shortname is a 32
On Tue, Apr 29, 2014 at 04:47:11PM +0200, Takashi Iwai wrote:
At Mon, 28 Apr 2014 01:44:25 +0300,
Dan Carpenter wrote:
On Sun, Apr 27, 2014 at 10:00:43PM +0200, Mateusz Guzik wrote:
and a WARN_ON + -EINVAL in line6_init_audio to catch future
offenders.
Returning -EINVAL
.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
so that it frees stuff on error, taking care of this case as well:
https://lkml.org/lkml/2014/4/25/778
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
;
if (pwps_ie_src == NULL)
return;
Maybe just check pwps_ie_src earlier?
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
On Fri, May 02, 2014 at 06:35:10PM +0200, Fabian Frederick wrote:
tree-lock is used all over the place
[..]
+ spinlock_t *lock = tree-lock;
if (!tree)
return;
Rather fishy, although I'm unsure if this is a real problem.
--
Mateusz Guzik
--
To unsubscribe from
?
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
consumers, it seems to be a bug to not include it.
Thus I suggest adding access_ok variant which calls might_fault.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
refcount manipulation primitives without atomicity guarantees, which
could be used in cases like this.
Then atomic and non-atomic versions could be used to detect overflows and
overputs at least in debug kernels.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux
(or some other error) instead?
Now you will possibly truncate the name.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ
On Sun, Apr 27, 2014 at 12:36:21AM +0300, Dan Carpenter wrote:
On Sat, Apr 26, 2014 at 10:47:05PM +0200, Mateusz Guzik wrote:
On Sat, Apr 26, 2014 at 07:09:22PM +0200, Laurent Navet wrote:
The strcpy operation may write past the end of the fixed-size destination
buffer if the source
, if this would
be the only consumer (which will most likely never leak anyway) then this
is defnitely not worth it.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
;
+ goto out_release_group;
}
count -= cp_count;
}
- return -EACCES;
+ ret = -EACCES;
+
+out_release_group:
+ put_group_info(group_info);
+ return ret;
}
EXPORT_SYMBOL_GPL(ping_init_sock);
--
Mateusz Guzik
On Fri, Apr 11, 2014 at 10:35:33AM +0200, Mateusz Guzik wrote:
On Fri, Apr 11, 2014 at 01:37:08PM -0400, Wang, Xiaoming wrote:
There is a memory leak in ping. Current group_info had been got in
ping_init_sock and group_info-usage increased.
But the usage hasn't decreased anywhere in ping
the reference to a place where it is actually
needed.
Please cc: me if you resend the patch.
Thanks,
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
would be spawned with these arguments and would
just go over its argv.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ
char *str, int *argcp)
*argv++ = argv_str;
}
}
+ kfree (argv);
*argv = NULL;
if (argcp)
No, see argv_free.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body
On Sun, Jun 29, 2014 at 04:40:17PM +0200, Toralf Förster wrote:
On 06/29/2014 12:04 AM, Mateusz Guzik wrote:
On Sat, Jun 28, 2014 at 11:52:37PM +0200, Toralf Förster wrote:
/me wonders if this patch is needed here :
diff --git a/lib/argv_split.c b/lib/argv_split.c
index e927ed0
anyway
because:
unsigned short keymap[ARRAY_SIZE(appleir_key_table)];
although one may argue is slightly nicer since it is used in memcpy line
earlier.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More
not it be much better to pass down info about rdonly request to
copy_tree/clone_mnt (perhaps CL_MOUNT_RDONLY flag or a separate flags
argument) and handle it there?
This would avoid fishy-looking traversal before graft_tree, which even
if correct should not be necessary.
--
Mateusz Guzik
--
To unsubscribe
0x040
+#define CL_COPY_MNT_NS_FILE 0x080
+#define CL_MAKE_RDONLY 0x100
#define CL_COPY_ALL (CL_COPY_UNBINDABLE | CL_COPY_MNT_NS_FILE)
--
1.8.5.5
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body
, what hapened to that?
What exactly were you trying to achieve? Did this BUG_ON detect a
problem on your system and now you are trying to silence it?
The change would be wrong even if it compiled since it would just
execute the assertion only when debug is disabled.
--
Mateusz Guzik
On Sun, Aug 03, 2014 at 12:31:30AM -0400, Nick Krause wrote:
On Sat, Aug 2, 2014 at 11:59 PM, Mateusz Guzik mgu...@redhat.com wrote:
On Sat, Aug 02, 2014 at 10:56:13PM -0400, Nicholas Krause wrote:
This changes the ifdef statement in sg_set_bg to !CONFIG_DEBUG_SG in order
to avoid a bug
not use wrappers
- a simple shell supporting output redirection and pipes
- pick your favourite utility from and implement your own version. can
be echo, cat, rev, kill, strings; then you can move to maybe stat, du,
ls, chmod
I hope this helps,
--
Mateusz Guzik
--
To unsubscribe from this list
recommend one last time you leave the kernel alone for the
time being and focus on userspace.
There. This is my last reply, have fun.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info
use
container_of to get to the counter.
I can implement that later if it sounds sane enough.
Note this behaviour seems to be a requirement for cross-rename to work.
At least restoring previous behaviour while keeping cross-rename is not hard,
I can write it later.
--
Mateusz Guzik
On Thu, Sep 11, 2014 at 06:39:58PM -0500, Chuck Ebbert wrote:
On Sun, 7 Sep 2014 09:56:08 +0200
Mateusz Guzik mgu...@redhat.com wrote:
On Sat, Sep 06, 2014 at 11:44:32PM +0200, Piotr Karbowski wrote:
Hi,
Starting with kernel 3.15 the 'exe' symlink under /proc/pid/ acts
diffrent
(struct drm_dp_mst_branch *mstb,
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
)));
+ seq_printf(m, %s , pid_buf);
+ }
+
+ seq_putc(m, '\n');
+ }
+
+ free_pidns_list(pidns_tree);
+ mutex_unlock(pidns_list_lock);
+
+ return 0;
+}
+
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux
...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
)));
+ seq_printf(m, %s , pid_buf);
+ }
+
+ seq_putc(m, '\n');
+ }
+
+ free_pidns_list(pidns_tree);
+ mutex_unlock(pidns_list_lock);
+
+ return 0;
+}
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux
= seq_lseek,
+ .release= single_release,
+};
+
+static int __init pidns_hierarchy_init(void)
+{
+ proc_create(NS_HIERARCHY, S_IWUGO,
+ NULL, proc_nspid_nslist_fops);
+
+ return 0;
+}
+fs_initcall(pidns_hierarchy_init);
--
1.9.3
--
Mateusz Guzik
Sometimes faccessat needs to modify current thread's credentials, but
calls prepare_creds unconditionally.
Take advantage of the fact that we can detect whether any modification
to credentials is needed and in turn avoid unnecessary allocations.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
adds a helper which allows comparing capability sets and
modifies faccessat to use it.
Mateusz Guzik (2):
CAPABILITIES: add cap_isequal helper
fs: avoid unnecessary prepare_creds in faccessat
fs/open.c | 53 ++
include/linux
Can be used to determine whether two given sets have the same
capabilities.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
---
include/linux/capability.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/include/linux/capability.h b/include/linux/capability.h
index af9f0b9..2fcf941
On Mon, Mar 09, 2015 at 09:35:45PM +0100, Mateusz Guzik wrote:
Sometimes faccessat needs to modify current thread's credentials, but
calls prepare_creds unconditionally.
However, typically resulting credentials are identical to original ones
and in that case newcredentials are unnecessary
On Fri, Mar 13, 2015 at 10:02:46AM -0400, Paul Moore wrote:
On Monday, March 09, 2015 09:35:46 PM Mateusz Guzik wrote:
Can be used to determine whether two given sets have the same
capabilities.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
---
include/linux/capability.h | 10
a rountrip of systemap scripts
showing freezer process tree.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http
On Mon, Mar 02, 2015 at 05:38:29AM +0100, Mateusz Guzik wrote:
On Sun, Mar 01, 2015 at 08:31:26AM +1100, Dave Chinner wrote:
On Sat, Feb 28, 2015 at 05:25:57PM +0300, Alexey Dobriyan wrote:
Freezing and thawing are separate system calls, task which is supposed
to thaw filesystem
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
On Sat, Apr 18, 2015 at 12:41:38PM -0700, Eric Dumazet wrote:
On Sat, 2015-04-18 at 00:02 +0100, Al Viro wrote:
On Sat, Apr 18, 2015 at 12:16:48AM +0200, Mateusz Guzik wrote:
I would say this makes the use of seq counter impossible. Even if we
decided to fall back to a lock on retry
On Mon, Apr 20, 2015 at 03:06:33PM +0200, Mateusz Guzik wrote:
On Sat, Apr 18, 2015 at 12:02:52AM +0100, Al Viro wrote:
On Sat, Apr 18, 2015 at 12:16:48AM +0200, Mateusz Guzik wrote:
I would say this makes the use of seq counter impossible. Even if we
decided to fall back to a lock
On Sat, Apr 18, 2015 at 12:02:52AM +0100, Al Viro wrote:
On Sat, Apr 18, 2015 at 12:16:48AM +0200, Mateusz Guzik wrote:
I would say this makes the use of seq counter impossible. Even if we
decided to fall back to a lock on retry, we cannot know what to do if
the slot is reserved - it very
On Mon, Apr 20, 2015 at 03:43:26PM +0200, Mateusz Guzik wrote:
On Mon, Apr 20, 2015 at 03:06:33PM +0200, Mateusz Guzik wrote:
On Sat, Apr 18, 2015 at 12:02:52AM +0100, Al Viro wrote:
On Sat, Apr 18, 2015 at 12:16:48AM +0200, Mateusz Guzik wrote:
I would say this makes the use of seq
On Tue, Apr 21, 2015 at 02:06:53PM -0700, Eric Dumazet wrote:
On Tue, 2015-04-21 at 22:12 +0200, Mateusz Guzik wrote:
in dup_fd:
for (i = open_files; i != 0; i--) {
struct file *f = *old_fds++;
if (f) {
get_file(f
On Tue, Apr 21, 2015 at 11:05:43AM -0700, Eric Dumazet wrote:
On Mon, 2015-04-20 at 13:49 -0700, Eric Dumazet wrote:
On Mon, 2015-04-20 at 10:15 -0700, Eric Dumazet wrote:
On Mon, 2015-04-20 at 17:10 +0200, Mateusz Guzik wrote:
Sorry for spam but I came up with another hack
On Tue, Apr 21, 2015 at 10:06:24PM +0200, Mateusz Guzik wrote:
On Tue, Apr 21, 2015 at 11:05:43AM -0700, Eric Dumazet wrote:
On Mon, 2015-04-20 at 13:49 -0700, Eric Dumazet wrote:
On Mon, 2015-04-20 at 10:15 -0700, Eric Dumazet wrote:
On Mon, 2015-04-20 at 17:10 +0200, Mateusz Guzik
the chance to set error.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Tue, Apr 21, 2015 at 09:59:28PM -0700, Eric Dumazet wrote:
From: Eric Dumazet eduma...@google.com
Mateusz Guzik reported :
Currently obtaining a new file descriptor results in locking fdtable
twice - once in order to reserve a slot and second time to fill it.
Holding the spinlock
updated the right table.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
---
fs/file.c | 24 +++-
include/linux/fdtable.h | 5 +
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/fs/file.c b/fs/file.c
index 93c5f89..bd1ef4c 100644
--- a/fs
On Thu, Apr 16, 2015 at 01:55:39PM -0700, Eric Dumazet wrote:
On Thu, 2015-04-16 at 13:42 -0700, Eric Dumazet wrote:
On Thu, 2015-04-16 at 19:09 +0100, Al Viro wrote:
On Thu, Apr 16, 2015 at 02:16:31PM +0200, Mateusz Guzik wrote:
@@ -165,8 +165,10 @@ static int expand_fdtable(struct
On Thu, Apr 16, 2015 at 07:09:32PM +0100, Al Viro wrote:
On Thu, Apr 16, 2015 at 02:16:31PM +0200, Mateusz Guzik wrote:
@@ -165,8 +165,10 @@ static int expand_fdtable(struct files_struct *files,
int nr)
cur_fdt = files_fdtable(files);
if (nr = cur_fdt-max_fds
Since the table is about to be freed, there is no reason to set file
pointer to NULL on closing.
At this point open_fd map is supposed to indicate whether a file is
installed, so NULL-checking it is unnecessary.
Signed-off-by: Mateusz Guzik mgu...@redhat.com
---
fs/file.c | 7 ++-
1 file
On Fri, Apr 17, 2015 at 02:46:56PM -0700, Eric Dumazet wrote:
On Thu, 2015-04-16 at 14:16 +0200, Mateusz Guzik wrote:
Hi,
Currently obtaining a new file descriptor results in locking fdtable
twice - once in order to reserve a slot and second time to fill it
...
void
is the first rule of tautology club.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Mon, Apr 13, 2015 at 11:39:01AM +1000, James Morris wrote:
On Wed, 8 Apr 2015, Mateusz Guzik wrote:
This is still a problem. Any feedback about the patch?
I'd like to see feedback from vfs folk (Al).
Ping? Are there any concerns with the patch?
--
Mateusz Guzik
--
To unsubscribe
his case without serious
tinkering. In fact this code cannot realiably work without weird
locking. By the time anon_inode_getfd returns, the file could have been
closed by a different thread.
What you want instead is anon_inode_getfile. See perf_event_open for an
example how to use it.
--
Mateusz Guzi
is populated.
Signed-off-by: Mateusz Guzik <mgu...@redhat.com>
---
fs/file.c | 27 +++
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/fs/file.c b/fs/file.c
index 6c672ad..103d931 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -365,7 +365,7
}
>
> /* mount point */
> seq_puts(m, " mounted on ");
> /* mountpoints outside of chroot jail will give SEQ_SKIP on this */
> err = seq_path_root(m, _path, >root, " \t\n\\");
> if (err)
> goto out;
>
On Wed, Jan 06, 2016 at 03:05:09PM +0530, Anshuman Khandual wrote:
> On Wed, Jan 6, 2016 at 10:32 AM, Mateusz Guzik <mgu...@redhat.com> wrote:
> > The code was taking the semaphore for reading, which does not protect
> > against readers nor concurrent modifications.
>
Number of fds is already known based on passed list.
No functional changes.
Signed-off-by: Mateusz Guzik <mgu...@redhat.com>
---
fs/select.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/select.c b/fs/select.c
index 0155473..79d0d49 100644
--- a/fs/select.c
Only functions doing more than one read are modified. Consumeres
happened to deal with possibly changing data, but it does not seem
like a good thing to rely on.
Signed-off-by: Mateusz Guzik <mgu...@redhat.com>
---
fs/proc/base.c | 13 ++---
mm/util.c | 16
2
from similar
treatment and are left untouched.
Mateusz Guzik (2):
prctl: take mmap sem for writing to protect against others
proc read mm's {arg,env}_{start,end} with mmap semaphore taken.
fs/proc/base.c | 13 ++---
kernel/sys.c | 20 ++--
mm/util.c | 16 +++
,
but they seem to be fine despite possible modificaton.
Signed-off-by: Mateusz Guzik <mgu...@redhat.com>
---
kernel/sys.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/kernel/sys.c b/kernel/sys.c
index 6af9212..78947de 100644
--- a/kernel/sys.c
+++ b/kernel
-by: Milos Vyletel <mi...@redhat.com>
Signed-off-by: Mateusz Guzik <mgu...@redhat.com>
---
drivers/tty/tty_io.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 892c923..1b10469 100644
--- a
On Wed, Jan 06, 2016 at 03:14:22PM +0530, Anshuman Khandual wrote:
> On Wed, Jan 6, 2016 at 10:32 AM, Mateusz Guzik <mgu...@redhat.com> wrote:
> > Only functions doing more than one read are modified. Consumeres
> > happened to deal with possibly changing data, but it does not
tore explicit tracking of the offset in coredump_params. Introduce
->pos field for this purpose since ->written was already reused.
Reported-by: Zbigniew Jędrzejewski-Szmek <zbys...@in.waw.pl>
Signed-off-by: Mateusz Guzik <mgu...@redhat.com>
---
arch/powerpc/platforms/cell/
1 - 100 of 303 matches
Mail list logo