Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c44a7f23 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "coresight: stm: Out of bound access from STM"

parents 74a82f72 a6242cfc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -167,8 +167,9 @@ static int stp_master_alloc(struct stm_device *stm, unsigned int idx)
{
	struct stp_master *master;
	size_t size;
	unsigned long align = sizeof(unsigned long);

	size = ALIGN(stm->data->sw_nchannels, 8) / 8;
	size = ALIGN(stm->data->sw_nchannels, align) / align;
	size += sizeof(struct stp_master);
	master = kzalloc(size, GFP_ATOMIC);
	if (!master)