Merge branch 'android11-5.4' into 'android11-5.4-lts'

Sync up with android11-5.4 for the following commits:

103b3ee426 ANDROID: GKI: upate .xml file for new symbol addtions
0fbdadf464 Merge tag 'android11-5.4.134_r00' into `android11-5.4`
a4ef36f248 ANDROID: xt_quota2: set usersize in xt_match registration object
9b34778e81 ANDROID: xt_quota2: clear quota2_log message before sending
e7e0887ebf ANDROID: xt_quota2: remove trailing junk which might have a digit in it

Change-Id: Iaf084f16fb853c821bd52001c96af967a7c1dce5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2021-08-27 14:17:38 +02:00

View File

@@ -106,23 +106,16 @@ static void quota2_log(unsigned int hooknum,
return;
}
pm = nlmsg_data(nlh);
memset(pm, 0, sizeof(*pm));
if (skb->tstamp == 0)
__net_timestamp((struct sk_buff *)skb);
pm->data_len = 0;
pm->hook = hooknum;
if (prefix != NULL)
strlcpy(pm->prefix, prefix, sizeof(pm->prefix));
else
*(pm->prefix) = '\0';
if (in)
strlcpy(pm->indev_name, in->name, sizeof(pm->indev_name));
else
pm->indev_name[0] = '\0';
if (out)
strlcpy(pm->outdev_name, out->name, sizeof(pm->outdev_name));
else
pm->outdev_name[0] = '\0';
NETLINK_CB(log_skb).dst_group = 1;
pr_debug("throwing 1 packets to netlink group 1\n");
@@ -162,6 +155,8 @@ static ssize_t quota_proc_write(struct file *file, const char __user *input,
if (copy_from_user(buf, input, size) != 0)
return -EFAULT;
buf[sizeof(buf)-1] = '\0';
if (size < sizeof(buf))
buf[size] = '\0';
spin_lock_bh(&e->lock);
e->quota = simple_strtoull(buf, NULL, 0);
@@ -348,6 +343,7 @@ static struct xt_match quota_mt2_reg[] __read_mostly = {
.match = quota_mt2,
.destroy = quota_mt2_destroy,
.matchsize = sizeof(struct xt_quota_mtinfo2),
.usersize = offsetof(struct xt_quota_mtinfo2, master),
.me = THIS_MODULE,
},
{
@@ -358,6 +354,7 @@ static struct xt_match quota_mt2_reg[] __read_mostly = {
.match = quota_mt2,
.destroy = quota_mt2_destroy,
.matchsize = sizeof(struct xt_quota_mtinfo2),
.usersize = offsetof(struct xt_quota_mtinfo2, master),
.me = THIS_MODULE,
},
};