x27;t test it on 3.7.10 kernel but
it should work fine.
--
Mateusz Guzik
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 1a052c0..345e76b 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -91,6 +91,24 @@ struct workqueue_struct *cifsiod_wq;
__u8 cifs_client_guid[SMB2_CLIENT_GUID_SIZ
Modifying get_mm_exe_file to retry is trivial and in effect never return
NULL is trivial. With arbitrary number of changes allowed this may
require some cond_resched() or something.
For comments I cc'ed Richard Guy Briggs, who is both an audit person and
the author of audit_exe_compare.
--
Mateusz Guzik
r application
this translates into kilobytes of memory which would have to allocated
just to hold it, sounds like a non-starter to me.
--
Mateusz Guzik
string then, like in case of smaps.
> >
>
> Thanks for the testing Jacek!
>
> I had a look around the corresponding smaps code, but I'm not seeing any
> checks, do you know where that check actually is made?
>
See m_start in f/sproc/task_mmu.c. It not only check for non-null mm,
but also tries to bump ->mm_users and only then proceeds to walk the mm.
--
Mateusz Guzik
set_mm(). Since we
> already have dedicated lock to protect them, it is safe to change back
> to down_read.
>
> Signed-off-by: Yang Shi
> Cc: Alexey Dobriyan
> Cc: Michal Hocko
> Cc: Matthew Wilcox
> Cc: Mateusz Guzik
> Cc: Cyrill Gorcunov
> ---
> v1 --&
adding the spinlock for args. The downside is growth of mm_struct.
i.e. the code can be refactored to just hold the lock and relock only if
necessary (unable to copy to user without faulting)
--
Mateusz Guzik
schedule_work(work);
}
}
+#endif
/*
* Unnamed block devices are dummy devices used by virtual
--
Mateusz Guzik
+cc Linus
On Sat, Jun 22, 2024 at 06:56:08PM +0800, Xi Ruoyao wrote:
> It's cheap to check if the path is empty in the userspace, but expensive
> to check if a userspace string is empty from the kernel. So using statx
> and AT_EMPTY_PATH to implement fstat is slower than a "native" fstat
> call.
int ret;
struct filename *name;
+ if (flags == AT_EMPTY_PATH && filename == NULL)
+ return do_statx_by_fd(...);
+
name = getname_flags(filename, getname_statx_lookup_flags(flags));
ret = do_statx(dfd, name, flags, mask, buffer);
putname(name);
and so on
Personally I would prefer if fstatx was added instead, fwiw most
massaging in the area will be the same regardless.
--
Mateusz Guzik
On Sun, Jun 23, 2024 at 3:22 AM Xi Ruoyao wrote:
>
> On Sun, 2024-06-23 at 03:07 +0200, Mateusz Guzik wrote:
> > On Sun, Jun 23, 2024 at 2:59 AM Xi Ruoyao wrote:
> > >
> > > On Sat, 2024-06-22 at 15:41 -0700, Linus Torvalds wrote:
> > >
> > > >
On Mon, Aug 12, 2024 at 09:29:16PM -0700, Andrii Nakryiko wrote:
> Add RCU protection for file struct's backing memory by adding
> SLAB_TYPESAFE_BY_RCU flag to files_cachep. This will allow to locklessly
> access struct file's fields under RCU lock protection without having to
> take much more expe
On Mon, Aug 12, 2024 at 09:29:17PM -0700, Andrii Nakryiko wrote:
> Now that files_cachep is SLAB_TYPESAFE_BY_RCU, we can safely access
> vma->vm_file->f_inode lockless only under rcu_read_lock() protection,
> attempting uprobe look up speculatively.
>
> We rely on newly added mmap_lock_speculation
On Tue, Aug 13, 2024 at 08:36:03AM -0700, Suren Baghdasaryan wrote:
> On Mon, Aug 12, 2024 at 11:18 PM Mateusz Guzik wrote:
> >
> > On Mon, Aug 12, 2024 at 09:29:17PM -0700, Andrii Nakryiko wrote:
> > > Now that files_cachep is SLAB_TYPESAFE_BY_RCU, we can safely a
On Thu, Aug 15, 2024 at 10:45:45AM -0700, Suren Baghdasaryan wrote:
> >From all the above, my understanding of your objection is that
> checking mmap_lock during our speculation is too coarse-grained and
> you would prefer to use the VMA seq counter to check that the VMA we
> are working on is unch
probe lookup will be sufficient, or maybe some
other hackery is viable without messing with fences in
vma_start_write.
--
Mateusz Guzik
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:
> > >
> > > > So
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
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++;
&
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
---
fs/file.c | 7 ++-
1 file changed, 2
o ensure we updated the right table.
Signed-off-by: Mateusz Guzik
---
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/file.c
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,1
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);
> >
On Tue, Apr 21, 2015 at 09:59:28PM -0700, Eric Dumazet wrote:
> From: Eric Dumazet
>
> 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.
>
>
;
> if (iattr->ia_valid & ATTR_SIZE) {
> xfs_ilock(ip, XFS_IOLOCK_EXCL);
> - error = xfs_setattr_size(ip, iattr);
> + error = xfs_setattr_size(dentry, ip, iattr);
> xfs_iunlock(ip, XFS_IOLOCK_EXCL);
> } else {
> - error = xfs_setattr_nonsize(ip, iattr, 0);
> + error = xfs_setattr_nonsize(dentry, ip, iattr, 0);
> }
>
> return error;
> diff --git a/fs/xfs/xfs_iops.h b/fs/xfs/xfs_iops.h
> index 1c34e43..6994d3e 100644
> --- a/fs/xfs/xfs_iops.h
> +++ b/fs/xfs/xfs_iops.h
> @@ -32,8 +32,14 @@ extern void xfs_setup_inode(struct xfs_inode *);
> */
> #define XFS_ATTR_NOACL 0x01/* Don't call posix_acl_chmod */
>
> -extern int xfs_setattr_nonsize(struct xfs_inode *ip, struct iattr *vap,
> +/*
> + * XXX Several callers have to pass dentry = NULL and this should
> + * work but it's really ugly.
> + */
> +extern int xfs_setattr_nonsize(struct dentry *dentry,
> +struct xfs_inode *ip, struct iattr *vap,
> int flags);
> -extern int xfs_setattr_size(struct xfs_inode *ip, struct iattr *vap);
> +extern int xfs_setattr_size(struct dentry *dentry,
> + struct xfs_inode *ip, struct iattr *vap);
>
> #endif /* __XFS_IOPS_H__ */
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 9ab779e..7cad5d1 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2663,6 +2663,7 @@ extern int buffer_migrate_page(struct address_space *,
> extern int inode_change_ok(const struct inode *, struct iattr *);
> extern int inode_newsize_ok(const struct inode *, loff_t offset);
> extern void setattr_copy(struct inode *inode, const struct iattr *attr);
> +extern int setattr_killpriv(struct dentry *dentry, struct iattr *attr);
>
> extern int file_update_time(struct file *file);
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 185836b..d1d4b9b 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -557,6 +557,10 @@ static int shmem_setattr(struct dentry *dentry, struct
> iattr *attr)
> if (error)
> return error;
>
> + error = setattr_killpriv(dentry, attr);
> + if (error)
> + return error;
> +
> if (S_ISREG(inode->i_mode) && (attr->ia_valid & ATTR_SIZE)) {
> loff_t oldsize = inode->i_size;
> loff_t newsize = attr->ia_size;
>
>
> --
> Ben Hutchings
> The first rule of tautology club 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/
way which can
interrupt the loop upcoming loop before it gets 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 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
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
> &
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
> > &g
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
>
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:
> > >
>
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
underflow.
Signed-off-by: Mateusz Guzik
Cc: Rik van Riel
---
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/linux/kref.h
@@ -43,8 +43,10
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
e kernel is booted with "debug"?
If there is a real need to pass arguments to systemd, how about a
dedicated option (initargs= or whatever, where it has to be last in
cmdline), then systemd would be spawned with these arguments and would
just go over its argv.
--
Mateusz
if (!p->swap_map[offset])
goto bad_free;
so that would need a trivial adjustment.
Another nit is that swap_start and swap_next do the following:
if (!(si->flags & SWP_USED) || !si->swap_map)
continue;
Testing for swap_map does not look very nice
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
Reported-by: Gabriellla Schmidt
On Mon, Nov 25, 2013 at 11:53:24AM -0800, Shawn Landden wrote:
> On Mon, Nov 25, 2013 at 10:05 AM, Jason Baron 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 SO_REUSEPORT, l
uct dentry *anon)
>
> dparent = dentry->d_parent;
>
> - switch_names(dentry, anon);
> + switch_names(dentry, anon, false);
> swap(dentry->d_name.hash, anon->d_name.hash);
>
> dentry->d_parent = dentry;
> --
> 1.8.5.5
>
&
gt; + if (ns == curr_ns)
> + curr_level = curr_ns->level;
> +
> + if (curr_level == -1)
> + continue;
> +
> + for (i = curr_level + 1; i <= pid->level; i++) {
> +
r_level == -1)
> + continue;
> +
> + for (i = curr_level + 1; i <= pid->level; i++) {
> + ns = pid->numbers[i].ns;
> + /* show PID '1' in specific pid ns */
> + snprintf(pid_buf, 32, "/proc/%u/ns/pid&quo
On Thu, Sep 11, 2014 at 06:39:58PM -0500, Chuck Ebbert wrote:
> On Sun, 7 Sep 2014 09:56:08 +0200
> Mateusz Guzik wrote:
>
> > On Sat, Sep 06, 2014 at 11:44:32PM +0200, Piotr Karbowski wrote:
> > > Hi,
> > >
> > > Starting with kernel 3.15 the '
change anything for
those 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.kern
or can be
used, there is clearly no reason to use mere atomic ops.
It may be that kernel devs would accept a patch implementing generic
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 o
sprintf(card->longname, "Line6 %s at USB %s", line6->properties->name,
> dev_name(line6->ifcdev));
Would not it be better to return -EINVAL (or some other error) instead?
Now you will possibly truncate the name.
--
Mateusz Guzik
--
To unsubscribe from this
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
&
wards is not a problem for them.
That is provided there is enough hand-coded refcount code, 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-kerne
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 overfl
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:
> > >
> > > >
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
&
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 daemo
mutex_lock(lock);
> if (unlikely(!atomic_dec_and_test(&kref->refcount))) {
This has a side effect of detecting some overputs, which is nice.
However, could be made better if kref_sub checked that refs you want to
take don't put the count below 0.
i.e.
WARN_ON(count &
_bit(Enabled, &e->flags))
> status = "enabled";
This particular function would be better of with removing this variable
and replacing all pairs like:
sprintf(dp, ...);
dp += strlen(...)
with:
dp += sprintf(dp, ...);
--
Mateusz Guzik
--
To unsubscribe from this
rect.
request_mem_region, which I believe is a prerequisite 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://www.tux.org/lkml/
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
-by: Mateusz Guzik
---
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 kioctx_ta
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
eeing, but that is nod one and not every pointer is nullified
anyway.
--
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/
y semantics of rw_copy_check_uvector
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
pmlmepriv->wps_beacon_ie;
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 maj
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
While here use pr_err instead of printk(KERN_ERR...)
Signed-off-by: Mateusz Guzik
Cc: linux-fsde...@vger.kernel.org
Cc: Josef Bacik
Cc: Jan Kara
Cc: Al Viro
Cc: Eric Sandeen
---
fs/super.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/super.c b/fs/super.c
This helps hang troubleshooting efforts when only dmesg is available.
Signed-off-by: Mateusz Guzik
Cc: linux-fsde...@vger.kernel.org
Cc: Josef Bacik
Cc: Jan Kara
Cc: Al Viro
Cc: Eric Sandeen
---
fs/super.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs
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
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
While here use pr_err instead of printk(KERN_ERR...)
Signed-off-by: Mateusz Guzik
Cc: linux-fsde...@vger.kernel.org
Cc: Josef Bacik
Cc: Jan Kara
Cc: Al Viro
Cc: Eric Sandeen
---
fs/super.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/super.c b/fs/super.c
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
Cc: linux-fsde...@vger.kernel.org
Cc: Josef Bacik
Cc: Jan Kara
Cc: Al Viro
Cc: Eric Sandeen
Cc: Joe Perches
mem_avoid[mem_avoid_nr].size = sizeof(*data) +
> data->len;
> + mem_avoid_nr++;
> + }
> + pa_data = data->next;
> + }
> +}
> +
I have no idea if this real_mode->hdr.setup_data examination is correct,
so not commenting on that.
Wh
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
> > white
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
>
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 Sandeen
> > Reply-To: sand...@redhat.com
> > To: Dave Chinner , Jan Kara
> > Cc: Mateusz
64036] ---[ 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 G
inion that a user-triggerable WARN is a bug, but aparently
> not everyone else feels that way.
>
imho warning sysadmins about userspace using deprecated stuff is fine as
long as users are not able to spam the console with it.
Warning reported here just looks scary and provides no informat
01:00 2011 +0000
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-info.html
Please read the FAQ at http://www.tux.org/lkml/
but you never reload the
pointer, thus this looks like use-after-free
2. most of this looks like __close_fd, maybe some parts could be moved
to an inline function so that code duplication is reduced?
--
Mateusz Guzik
--
To unsubscribe from this list: send the line "unsubscribe linux-kerne
}
>
> - return -EACCES;
> + ret = -EACCES;
> +
> +out_release_group:
> + put_group_info(group_info);
> + return ret;
> }
> EXPORT_SYMBOL_GPL(ping_init_sock);
>
--
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 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 h
t.
While here move grabbing 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.k
s
> elements.
>
But where the claim of 'null pointer' is coming from (or reading/writing
past the array for that matter)?
Replacing appleir_key_table with appleir->keymap is a noop anyway
because:
unsigned short keymap[ARRAY_SIZE(appleir_key_table)];
although one may argue is s
r **argv_split(gfp_t gfp, const char *str, int *argcp)
> *argv++ = argv_str;
> }
> }
> + kfree (argv);
> *argv = NULL;
>
> if (argcp)
>
No, see argv_free.
--
Mateusz Guzik
--
To unsubscribe from this l
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 :
> >>
> >>
> >> dif
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
calculations of avg_atom for big nr_switches are now correct.
Signed-off-by: Mateusz Guzik
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: sta...@vger.kernel.org
---
kernel/sched/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index
le-test your changes.
Instructions how to compile the kernel 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 &
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 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/
io: convert the ioctx list to
table lookup v3".
Fix the problem by restoring appropriate locking.
Signed-off-by: Mateusz Guzik
Reported-by: Eryu Guan
Cc: Jeff Moyer
Cc: Kent Overstreet
Cc: linux-...@kvack.org
Cc: linux-kernel@vger.kernel.org
---
fs/aio.c | 10 ++
1 file changed
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,
, which I
believe will be the case when someone jokingly unmaps the area (all
maybe when it is swapped out but can't 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;
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
--
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/
ass 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 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/
+#define CL_MAKE_SHARED 0x008
> +#define CL_PRIVATE 0x010
> +#define CL_SHARED_TO_SLAVE 0x020
> +#define CL_UNPRIVILEGED 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 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/
d compiling this? IIRC you said you would compile your
stuff, 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 ass
On Sun, Aug 03, 2014 at 12:31:30AM -0400, Nick Krause wrote:
> On Sat, Aug 2, 2014 at 11:59 PM, Mateusz Guzik 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
> >&g
give you a chance
to improve.
Example programs you can write for fun:
- a tcp proxy using poll, epoll and select. backend can be chosen at
startup. implement everything yourself, do not use wrappers
- a simple shell supporting output redirection and pipes
- pick your favourite utility from and imple
ing a working patch is.
Forward porting, like this one, demands that you:
- understand the patch as applied to the original tree
- understand current state of the tree and how it influences the patch
As such, foward porting is typically not a task for beginners.
I can only recommend
snprintf(pid_buf, 16, "%u",
> + pid_vnr(find_pid_ns(1, ns)));
> + seq_printf(m, "%s ", pid_buf);
> + }
> +
> + seq_putc(m, '\n');
> + }
> +
> + free_pidn
ort->port_num);
> - strncat(proppath, temp, 255);
> + snprintf(&proppath[(len < proppath_len ? len : 0)], proppath_len - len,
> + "-%d", port->port_num);
> }
>
> static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
such, maybe the feature you are looking for would count how many
times the fs is frozen.
--
Mateusz Guzik
|| !mm->env_end)
> return 0;
>
> page = (char *)__get_free_page(GFP_TEMPORARY);
In this case get_cmdline in mm/util.c should also be patched for
completness. It tests for arg_end, but later accesses env_end.
--
Mateusz Guzik
0x0800 /* being looked up
(with parent locked shared) */
Verified with switching one to 0x1000 and the warning went away.
--
Mateusz Guzik
d:
- do_prlimit: stop taking tasklist_lock at all and only lock sighand when
necessary
- proc_pid_limits: lock group leader in order to obtain a stable copy
Signed-off-by: Mateusz Guzik
---
fs/proc/base.c | 6 ++
kernel/sys.c | 22 ++
1 - 100 of 163 matches
Mail list logo