mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include/net/sock.h310731e2f1
("net: Fix data-races around sysctl_mem.")e70f3c7012
("Revert "net: set SK_MEM_QUANTUM to 4096"") https://lore.kernel.org/all/20220711120211.7c8b7cba@canb.auug.org.au/ net/ipv4/fib_semantics.c747c143072
("ip: fix dflt addr selection for connected nexthop")d62607c3fe
("net: rename reference+tracking helpers") net/tls/tls.h include/net/tls.h3d8c51b25a
("net/tls: Check for errors in tls_device_init")5879031423
("tls: create an internal header") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -446,14 +446,14 @@ static int do_proc_dointvec_conv(bool *negp, unsigned long *lvalp,
|
||||
if (*negp) {
|
||||
if (*lvalp > (unsigned long) INT_MAX + 1)
|
||||
return -EINVAL;
|
||||
*valp = -*lvalp;
|
||||
WRITE_ONCE(*valp, -*lvalp);
|
||||
} else {
|
||||
if (*lvalp > (unsigned long) INT_MAX)
|
||||
return -EINVAL;
|
||||
*valp = *lvalp;
|
||||
WRITE_ONCE(*valp, *lvalp);
|
||||
}
|
||||
} else {
|
||||
int val = *valp;
|
||||
int val = READ_ONCE(*valp);
|
||||
if (val < 0) {
|
||||
*negp = true;
|
||||
*lvalp = -(unsigned long)val;
|
||||
@@ -472,9 +472,9 @@ static int do_proc_douintvec_conv(unsigned long *lvalp,
|
||||
if (write) {
|
||||
if (*lvalp > UINT_MAX)
|
||||
return -EINVAL;
|
||||
*valp = *lvalp;
|
||||
WRITE_ONCE(*valp, *lvalp);
|
||||
} else {
|
||||
unsigned int val = *valp;
|
||||
unsigned int val = READ_ONCE(*valp);
|
||||
*lvalp = (unsigned long)val;
|
||||
}
|
||||
return 0;
|
||||
@@ -857,7 +857,7 @@ static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp,
|
||||
if ((param->min && *param->min > tmp) ||
|
||||
(param->max && *param->max < tmp))
|
||||
return -EINVAL;
|
||||
*valp = tmp;
|
||||
WRITE_ONCE(*valp, tmp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -923,7 +923,7 @@ static int do_proc_douintvec_minmax_conv(unsigned long *lvalp,
|
||||
(param->max && *param->max < tmp))
|
||||
return -ERANGE;
|
||||
|
||||
*valp = tmp;
|
||||
WRITE_ONCE(*valp, tmp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1007,13 +1007,13 @@ int proc_dou8vec_minmax(struct ctl_table *table, int write,
|
||||
|
||||
tmp.maxlen = sizeof(val);
|
||||
tmp.data = &val;
|
||||
val = *data;
|
||||
val = READ_ONCE(*data);
|
||||
res = do_proc_douintvec(&tmp, write, buffer, lenp, ppos,
|
||||
do_proc_douintvec_minmax_conv, ¶m);
|
||||
if (res)
|
||||
return res;
|
||||
if (write)
|
||||
*data = val;
|
||||
WRITE_ONCE(*data, val);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(proc_dou8vec_minmax);
|
||||
@@ -1090,9 +1090,9 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table,
|
||||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
*i = val;
|
||||
WRITE_ONCE(*i, val);
|
||||
} else {
|
||||
val = convdiv * (*i) / convmul;
|
||||
val = convdiv * READ_ONCE(*i) / convmul;
|
||||
if (!first)
|
||||
proc_put_char(&buffer, &left, '\t');
|
||||
proc_put_long(&buffer, &left, val, false);
|
||||
@@ -1173,9 +1173,12 @@ static int do_proc_dointvec_jiffies_conv(bool *negp, unsigned long *lvalp,
|
||||
if (write) {
|
||||
if (*lvalp > INT_MAX / HZ)
|
||||
return 1;
|
||||
*valp = *negp ? -(*lvalp*HZ) : (*lvalp*HZ);
|
||||
if (*negp)
|
||||
WRITE_ONCE(*valp, -*lvalp * HZ);
|
||||
else
|
||||
WRITE_ONCE(*valp, *lvalp * HZ);
|
||||
} else {
|
||||
int val = *valp;
|
||||
int val = READ_ONCE(*valp);
|
||||
unsigned long lval;
|
||||
if (val < 0) {
|
||||
*negp = true;
|
||||
@@ -1221,9 +1224,9 @@ static int do_proc_dointvec_ms_jiffies_conv(bool *negp, unsigned long *lvalp,
|
||||
|
||||
if (jif > INT_MAX)
|
||||
return 1;
|
||||
*valp = (int)jif;
|
||||
WRITE_ONCE(*valp, (int)jif);
|
||||
} else {
|
||||
int val = *valp;
|
||||
int val = READ_ONCE(*valp);
|
||||
unsigned long lval;
|
||||
if (val < 0) {
|
||||
*negp = true;
|
||||
@@ -1326,8 +1329,8 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write,
|
||||
* @ppos: the current position in the file
|
||||
*
|
||||
* Reads/writes up to table->maxlen/sizeof(unsigned int) integer
|
||||
* values from/to the user buffer, treated as an ASCII string.
|
||||
* The values read are assumed to be in 1/1000 seconds, and
|
||||
* values from/to the user buffer, treated as an ASCII string.
|
||||
* The values read are assumed to be in 1/1000 seconds, and
|
||||
* are converted into jiffies.
|
||||
*
|
||||
* Returns 0 on success.
|
||||
|
Reference in New Issue
Block a user