mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
synced 2025-10-02 14:18:33 +10:00
vfs-6.15-rc7.fixes
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCaCHSPAAKCRCRxhvAZXjc ouxZAQCZcvUr0H7LO9j2JQdM+S7ABLU4T8El/f72tvFfapPJVgEA3zrAQ9qgZacv ytsmniyOnIzGsamPcK8Zy6LP6KjOYQ8= =xEE0 -----END PGP SIGNATURE----- Merge tag 'vfs-6.15-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Ensure that simple_xattr_list() always includes security.* xattrs - Fix eventpoll busy loop optimization when combined with timeouts - Disable swapon() for devices with block sizes greater than page sizes - Don't call errseq_set() twice during mark_buffer_write_io_error(). Just use mapping_set_error() which takes care to not deference unconditionally * tag 'vfs-6.15-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs: Remove redundant errseq_set call in mark_buffer_write_io_error. swapfile: disable swapon for bs > ps devices fs/eventpoll: fix endless busy loop after timeout has expired fs/xattr.c: fix simple_xattr_list to always include security.* xattrs
This commit is contained in:
commit
e238e49b18
@ -1220,10 +1220,8 @@ void mark_buffer_write_io_error(struct buffer_head *bh)
|
||||
/* FIXME: do we need to set this in both places? */
|
||||
if (bh->b_folio && bh->b_folio->mapping)
|
||||
mapping_set_error(bh->b_folio->mapping, -EIO);
|
||||
if (bh->b_assoc_map) {
|
||||
if (bh->b_assoc_map)
|
||||
mapping_set_error(bh->b_assoc_map, -EIO);
|
||||
errseq_set(&bh->b_assoc_map->host->i_sb->s_wb_err, -EIO);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(mark_buffer_write_io_error);
|
||||
|
||||
|
@ -2111,9 +2111,10 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
|
||||
|
||||
write_unlock_irq(&ep->lock);
|
||||
|
||||
if (!eavail && ep_schedule_timeout(to))
|
||||
timed_out = !schedule_hrtimeout_range(to, slack,
|
||||
HRTIMER_MODE_ABS);
|
||||
if (!eavail)
|
||||
timed_out = !ep_schedule_timeout(to) ||
|
||||
!schedule_hrtimeout_range(to, slack,
|
||||
HRTIMER_MODE_ABS);
|
||||
__set_current_state(TASK_RUNNING);
|
||||
|
||||
/*
|
||||
|
24
fs/xattr.c
24
fs/xattr.c
@ -1428,6 +1428,15 @@ static bool xattr_is_trusted(const char *name)
|
||||
return !strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN);
|
||||
}
|
||||
|
||||
static bool xattr_is_maclabel(const char *name)
|
||||
{
|
||||
const char *suffix = name + XATTR_SECURITY_PREFIX_LEN;
|
||||
|
||||
return !strncmp(name, XATTR_SECURITY_PREFIX,
|
||||
XATTR_SECURITY_PREFIX_LEN) &&
|
||||
security_ismaclabel(suffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* simple_xattr_list - list all xattr objects
|
||||
* @inode: inode from which to get the xattrs
|
||||
@ -1460,6 +1469,17 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = security_inode_listsecurity(inode, buffer, remaining_size);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (buffer) {
|
||||
if (remaining_size < err)
|
||||
return -ERANGE;
|
||||
buffer += err;
|
||||
}
|
||||
remaining_size -= err;
|
||||
|
||||
read_lock(&xattrs->lock);
|
||||
for (rbp = rb_first(&xattrs->rb_root); rbp; rbp = rb_next(rbp)) {
|
||||
xattr = rb_entry(rbp, struct simple_xattr, rb_node);
|
||||
@ -1468,6 +1488,10 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
|
||||
if (!trusted && xattr_is_trusted(xattr->name))
|
||||
continue;
|
||||
|
||||
/* skip MAC labels; these are provided by LSM above */
|
||||
if (xattr_is_maclabel(xattr->name))
|
||||
continue;
|
||||
|
||||
err = xattr_list_one(&buffer, &remaining_size, xattr->name);
|
||||
if (err)
|
||||
break;
|
||||
|
@ -3331,6 +3331,15 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
|
||||
goto bad_swap_unlock_inode;
|
||||
}
|
||||
|
||||
/*
|
||||
* The swap subsystem needs a major overhaul to support this.
|
||||
* It doesn't work yet so just disable it for now.
|
||||
*/
|
||||
if (mapping_min_folio_order(mapping) > 0) {
|
||||
error = -EINVAL;
|
||||
goto bad_swap_unlock_inode;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the swap header.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user