Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Automated kernel build and test (x86_64)
name: Automated kernel build and test x86_64 and aarch64

on:
push:
Expand All @@ -7,5 +7,5 @@ on:

jobs:
build:
uses: ctrliq/kernel-src-tree/.github/workflows/kernel-build-and-test-x86_64.yml@main
uses: ctrliq/kernel-src-tree/.github/workflows/kernel-build-and-test-multiarch.yml@main
secrets: inherit
10 changes: 8 additions & 2 deletions drivers/usb/core/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
*/
desc = (struct usb_ss_ep_comp_descriptor *) buffer;

if (desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP ||
size < USB_DT_SS_EP_COMP_SIZE) {
if (size < USB_DT_SS_EP_COMP_SIZE) {
dev_notice(ddev,
"invalid SuperSpeed endpoint companion descriptor "
"of length %d, skipping\n", size);
return;
}

if (desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP) {
dev_notice(ddev, "No SuperSpeed endpoint companion for config %d "
" interface %d altsetting %d ep %d: "
"using minimum values\n",
Expand Down
17 changes: 17 additions & 0 deletions drivers/video/fbdev/core/bitblit.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
image.height = vc->vc_font.height;
image.depth = 1;

if (image.dy >= info->var.yres)
return;

image.height = min(image.height, info->var.yres - image.dy);

if (attribute) {
buf = kmalloc(cellsize, GFP_ATOMIC);
if (!buf)
Expand All @@ -182,6 +187,18 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
cnt = count;

image.width = vc->vc_font.width * cnt;

if (image.dx >= info->var.xres)
break;

if (image.dx + image.width > info->var.xres) {
image.width = info->var.xres - image.dx;
cnt = image.width / vc->vc_font.width;
if (cnt == 0)
break;
image.width = cnt * vc->vc_font.width;
}

pitch = DIV_ROUND_UP(image.width, 8) + scan_align;
pitch &= ~scan_align;
size = pitch * image.height + buf_align;
Expand Down
12 changes: 5 additions & 7 deletions fs/eventpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,22 +772,22 @@ static bool __ep_remove(struct eventpoll *ep, struct epitem *epi, bool force)
call_rcu(&epi->rcu, epi_rcu_free);

percpu_counter_dec(&ep->user->epoll_watches);
return ep_refcount_dec_and_test(ep);
return true;
}

/*
* ep_remove variant for callers owing an additional reference to the ep
*/
static void ep_remove_safe(struct eventpoll *ep, struct epitem *epi)
{
WARN_ON_ONCE(__ep_remove(ep, epi, false));
if (__ep_remove(ep, epi, false))
WARN_ON_ONCE(ep_refcount_dec_and_test(ep));
}

static void ep_clear_and_put(struct eventpoll *ep)
{
struct rb_node *rbp, *next;
struct epitem *epi;
bool dispose;

/* We need to release all tasks waiting for these file */
if (waitqueue_active(&ep->poll_wait))
Expand Down Expand Up @@ -820,10 +820,8 @@ static void ep_clear_and_put(struct eventpoll *ep)
cond_resched();
}

dispose = ep_refcount_dec_and_test(ep);
mutex_unlock(&ep->mtx);

if (dispose)
if (ep_refcount_dec_and_test(ep))
ep_free(ep);
}

Expand Down Expand Up @@ -1003,7 +1001,7 @@ void eventpoll_release_file(struct file *file)
dispose = __ep_remove(ep, epi, true);
mutex_unlock(&ep->mtx);

if (dispose)
if (dispose && ep_refcount_dec_and_test(ep))
ep_free(ep);
goto again;
}
Expand Down
12 changes: 9 additions & 3 deletions fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,12 @@ void pde_put(struct proc_dir_entry *pde)
}
}

static void pde_erase(struct proc_dir_entry *pde, struct proc_dir_entry *parent)
{
rb_erase(&pde->subdir_node, &parent->subdir);
RB_CLEAR_NODE(&pde->subdir_node);
}

/*
* Remove a /proc entry and free it if it's not currently in use.
*/
Expand All @@ -710,7 +716,7 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent)
WARN(1, "removing permanent /proc entry '%s'", de->name);
de = NULL;
} else {
rb_erase(&de->subdir_node, &parent->subdir);
pde_erase(de, parent);
if (S_ISDIR(de->mode))
parent->nlink--;
}
Expand Down Expand Up @@ -754,7 +760,7 @@ int remove_proc_subtree(const char *name, struct proc_dir_entry *parent)
root->parent->name, root->name);
return -EINVAL;
}
rb_erase(&root->subdir_node, &parent->subdir);
pde_erase(root, parent);

de = root;
while (1) {
Expand All @@ -766,7 +772,7 @@ int remove_proc_subtree(const char *name, struct proc_dir_entry *parent)
next->parent->name, next->name);
return -EINVAL;
}
rb_erase(&next->subdir_node, &de->subdir);
pde_erase(next, de);
de = next;
continue;
}
Expand Down
5 changes: 5 additions & 0 deletions sound/usb/endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,11 @@ int snd_usb_endpoint_set_params(struct snd_usb_audio *chip,
ep->sample_rem = ep->cur_rate % ep->pps;
ep->packsize[0] = ep->cur_rate / ep->pps;
ep->packsize[1] = (ep->cur_rate + (ep->pps - 1)) / ep->pps;
if (ep->packsize[1] > ep->maxpacksize) {
usb_audio_dbg(chip, "Too small maxpacksize %u for rate %u / pps %u\n",
ep->maxpacksize, ep->cur_rate, ep->pps);
return -EINVAL;
}

/* calculate the frequency in 16.16 format */
ep->freqm = ep->freqn;
Expand Down
Loading