Linux 5.10.182
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.182 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/x86/include/asm/intel-family.h | 2 drivers/android/binder.c | 26 +- drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c | 35 +- drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.h | 2 drivers/net/phy/mscc/mscc.h | 1 drivers/net/phy/mscc/mscc_main.c | 54 ++-- drivers/power/supply/bq24190_charger.c | 13 + drivers/power/supply/bq27xxx_battery.c | 224 +++++++++---------- drivers/power/supply/power_supply_core.c | 57 ++-- drivers/regulator/helpers.c | 65 +++++ drivers/regulator/pca9450-regulator.c | 55 ++-- include/linux/power/bq27xxx_battery.h | 3 include/linux/power_supply.h | 5 include/linux/regulator/driver.h | 5 include/net/ip.h | 2 include/uapi/linux/in.h | 2 net/bluetooth/hci_sock.c | 28 ++ net/ipv4/ip_sockglue.c | 12 - net/ipv4/raw.c | 5 net/ipv6/raw.c | 3 net/netfilter/nf_conntrack_netlink.c | 8 22 files changed, 386 insertions(+), 223 deletions(-)
Alexander Stein (1):
regulator: pca9450: Fix BUCK2 enable_mask
Andreas Kemnade (1):
power: supply: bq27xxx: fix polarity of current_now
Axel Lin (1):
regulator: pca9450: Convert to use regulator_set_ramp_delay_regmap
Carlos Llamas (1):
binder: fix UAF caused by faulty buffer cleanup
David Epping (1):
net: phy: mscc: enable VSC8501/2 RGMII RX clock
Greg Kroah-Hartman (1):
Linux 5.10.182
Hans de Goede (6):
power: supply: bq27xxx: Add cache parameter to bq27xxx_battery_current_and_status()
power: supply: bq27xxx: Move bq27xxx_battery_update() down
power: supply: bq27xxx: Ensure power_supply_changed() is called on current sign changes
power: supply: bq27xxx: After charger plug in/out wait 0.5s for things to stabilize
power: supply: core: Refactor power_supply_set_input_current_limit_from_supplier()
power: supply: bq24190: Call power_supply_changed() after updating input current
Mark Bloch (1):
net/mlx5: devcom only supports 2 ports
Matthias Schiffer (2):
power: supply: bq27xxx: fix sign of current_now for newer ICs
power: supply: bq27xxx: make status more robust
Matti Vaittinen (1):
regulator: Add regmap helper for ramp-delay setting
Nicolas Dichtel (1):
ipv{4,6}/raw: fix output xfrm lookup wrt protocol
Paul Blakey (1):
netfilter: ctnetlink: Support offloaded conntrack entry deletion
Ruihan Li (1):
bluetooth: Add cmd validity checks at the start of hci_sock_ioctl()
Shay Drory (1):
net/mlx5: Devcom, serialize devcom registration
Sicelo A. Mhlongo (1):
power: supply: bq27xxx: expose battery data when CI=1
Tony Luck (2):
x86/cpu: Add Raptor Lake to Intel family x86/cpu: Drop spurious underscore from RAPTOR_LAKE #define
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 181 +SUBLEVEL = 182 EXTRAVERSION = NAME = Dare mighty things
arch/x86/include/asm/intel-family.h +2 -0
@@ -104,6 +104,8 @@#define INTEL_FAM6_RAPTORLAKE_P 0xBA#define INTEL_FAM6_RAPTORLAKE_S 0xBF +#define INTEL_FAM6_RAPTORLAKE 0xB7 +/* "Small Core" Processors (Atom) */ #define INTEL_FAM6_ATOM_BONNELL 0x1C/* Diamondville, Pineview */
drivers/android/binder.c +20 -6
@@ -2267,24 +2267,23 @@ static void binder_deferred_fd_close(int fd)static void binder_transaction_buffer_release (struct binder_proc *proc,struct binder_thread *thread,struct binder_buffer *buffer, -binder_size_t failed_at, +binder_size_t off_end_offset,bool is_failure) {int debug_id = buffer->debug_id; -binder_size_t off_start_offset, buffer_offset, off_end_offset; +binder_size_t off_start_offset, buffer_offset;binder_debug (BINDER_DEBUG_TRANSACTION ,"%d buffer release %d, size %zd-%zd, failed at %llx\n" , proc->pid, buffer->debug_id, buffer->data_size, buffer->offsets_size, - (unsigned long long )failed_at); + (unsigned long long )off_end_offset);if (buffer->target_node)binder_dec_node (buffer->target_node,1 ,0 ); off_start_offset =ALIGN (buffer->data_size,sizeof (void *)); - off_end_offset = is_failure && failed_at ? failed_at : - off_start_offset + buffer->offsets_size; +for (buffer_offset = off_start_offset; buffer_offset < off_end_offset; buffer_offset +=sizeof (binder_size_t)) {struct binder_object_header *hdr;
@@ -2444,6 +2443,21 @@ static void binder_transaction_buffer_release(struct binder_proc *proc, } } +/* Clean up all the objects in the buffer */ +static inline void binder_release_entire_buffer (struct binder_proc *proc, +struct binder_thread *thread, +struct binder_buffer *buffer, +bool is_failure) +{ +binder_size_t off_end_offset; + + off_end_offset =ALIGN (buffer->data_size,sizeof (void *)); + off_end_offset += buffer->offsets_size; + +binder_transaction_buffer_release (proc, thread, buffer, + off_end_offset, is_failure); +} +static int binder_translate_binder (struct flat_binder_object *fp,struct binder_transaction *t,struct binder_thread *thread)
@@ -3926,7 +3940,7 @@ binder_free_buf(struct binder_proc *proc,binder_node_inner_unlock (buf_node); }trace_binder_transaction_buffer_release (buffer); -binder_transaction_buffer_release (proc, thread, buffer,0 , is_failure); +binder_release_entire_buffer (proc, thread, buffer, is_failure);binder_alloc_free_buf (&proc->alloc, buffer); }
drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c +23 -12
@@ -3,6 +3,7 @@#include <linux/mlx5/vport.h> #include "lib/devcom.h" +#include "mlx5_core.h" static LIST_HEAD (devcom_list);
@@ -14,7 +15,7 @@ static LIST_HEAD(devcom_list);struct mlx5_devcom_component {struct {void *data; - } device[MLX5_MAX_PORTS ]; + } device[MLX5_DEVCOM_PORTS_SUPPORTED ];mlx5_devcom_event_handler_t handler;struct rw_semaphore sem;
@@ -25,7 +26,7 @@ struct mlx5_devcom_list {struct list_head list;struct mlx5_devcom_component components[MLX5_DEVCOM_NUM_COMPONENTS ]; -struct mlx5_core_dev *devs[MLX5_MAX_PORTS ]; +struct mlx5_core_dev *devs[MLX5_DEVCOM_PORTS_SUPPORTED ]; };struct mlx5_devcom {
@@ -74,13 +75,16 @@ struct mlx5_devcom *mlx5_devcom_register_device(struct mlx5_core_dev *dev)if (!mlx5_core_is_pf (dev))return NULL ; +if (MLX5_CAP_GEN (dev, num_lag_ports) !=MLX5_DEVCOM_PORTS_SUPPORTED ) +return NULL ; +mlx5_dev_list_lock (); sguid0 =mlx5_query_nic_system_image_guid (dev);list_for_each_entry (iter, &devcom_list, list) {struct mlx5_core_dev *tmp_dev =NULL ; idx =-1 ; -for (i =0 ; i <MLX5_MAX_PORTS ; i++) { +for (i =0 ; i <MLX5_DEVCOM_PORTS_SUPPORTED ; i++) {if (iter->devs[i]) tmp_dev = iter->devs[i];else
@@ -100,8 +104,10 @@ struct mlx5_devcom *mlx5_devcom_register_device(struct mlx5_core_dev *dev)if (!priv) { priv =mlx5_devcom_list_alloc (); -if (!priv) -return ERR_PTR (-ENOMEM ); +if (!priv) { + devcom =ERR_PTR (-ENOMEM ); + goto out; + } idx =0 ; new_priv = true;
@@ -112,12 +118,14 @@ struct mlx5_devcom *mlx5_devcom_register_device(struct mlx5_core_dev *dev)if (!devcom) {if (new_priv)kfree (priv); -return ERR_PTR (-ENOMEM ); + devcom =ERR_PTR (-ENOMEM ); + goto out; }if (new_priv)list_add (&priv->list, &devcom_list); - +out: +mlx5_dev_list_unlock ();return devcom; }
@@ -130,20 +138,23 @@ void mlx5_devcom_unregister_device(struct mlx5_devcom *devcom)if (IS_ERR_OR_NULL (devcom))return ; +mlx5_dev_list_lock (); priv = devcom->priv; priv->devs[devcom->idx] =NULL ;kfree (devcom); -for (i =0 ; i <MLX5_MAX_PORTS ; i++) +for (i =0 ; i <MLX5_DEVCOM_PORTS_SUPPORTED ; i++)if (priv->devs[i])break ; -if (i !=MLX5_MAX_PORTS ) -return ; +if (i !=MLX5_DEVCOM_PORTS_SUPPORTED ) + goto out;list_del (&priv->list);kfree (priv); +out: +mlx5_dev_list_unlock (); } void mlx5_devcom_register_component(struct mlx5_devcom *devcom,
@@ -192,7 +203,7 @@ int mlx5_devcom_send_event(struct mlx5_devcom *devcom, comp = &devcom->priv->components[id];down_write (&comp->sem); -for (i =0 ; i <MLX5_MAX_PORTS ; i++) +for (i =0 ; i <MLX5_DEVCOM_PORTS_SUPPORTED ; i++)if (i != devcom->idx && comp->device[i].data) { err = comp->handler (event, comp->device[i].data, event_data);
@@ -240,7 +251,7 @@ void *mlx5_devcom_get_peer_data(struct mlx5_devcom *devcom,return NULL ; } -for (i =0 ; i <MLX5_MAX_PORTS ; i++) +for (i =0 ; i <MLX5_DEVCOM_PORTS_SUPPORTED ; i++)if (i != devcom->idx)break ;
drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.h +2 -0
@@ -6,6 +6,8 @@#include <linux/mlx5/driver.h> +#define MLX5_DEVCOM_PORTS_SUPPORTED 2 +enum mlx5_devcom_components {MLX5_DEVCOM_ESW_OFFLOADS ,
drivers/net/phy/mscc/mscc.h +1 -0
@@ -175,6 +175,7 @@ enum rgmii_clock_delay {#define VSC8502_RGMII_CNTL 20#define VSC8502_RGMII_RX_DELAY_MASK 0x0070#define VSC8502_RGMII_TX_DELAY_MASK 0x0007 +#define VSC8502_RGMII_RX_CLK_DISABLE 0x0800#define MSCC_PHY_WOL_LOWER_MAC_ADDR 21#define MSCC_PHY_WOL_MID_MAC_ADDR 22
drivers/net/phy/mscc/mscc_main.c +28 -26
84 lines not on this page · raw message
drivers/power/supply/bq24190_charger.c +12 -1
@@ -1203,8 +1203,19 @@ static void bq24190_input_current_limit_work(struct work_struct *work)struct bq24190_dev_info *bdi = container_of(work, struct bq24190_dev_info, input_current_limit_work.work); +union power_supply_propval val; +int ret; -power_supply_set_input_current_limit_from_supplier (bdi->charger); + ret =power_supply_get_property_from_supplier (bdi->charger, +POWER_SUPPLY_PROP_CURRENT_MAX , + &val); +if (ret) +return ; + +bq24190_charger_set_property (bdi->charger, +POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT , + &val); +power_supply_changed (bdi->charger); }/* Sync the input-current-limit with our parent supply (if we have one) */
drivers/power/supply/bq27xxx_battery.c +116 -108
295 lines not on this page · raw message
drivers/power/supply/power_supply_core.c +30 -27
76 lines not on this page · raw message
drivers/regulator/helpers.c +65 -0
68 lines not on this page · raw message
drivers/regulator/pca9450-regulator.c +26 -29
97 lines not on this page · raw message
include/linux/power/bq27xxx_battery.h +3 -0
@@ -2,6 +2,8 @@#ifndef __LINUX_BQ27X00_BATTERY_H__#define __LINUX_BQ27X00_BATTERY_H__ +#include <linux/power_supply.h> +enum bq27xxx_chip {BQ27000 =1 ,/* bq27000, bq27200 */ BQ27010, /* bq27010, bq27210 */
@@ -69,6 +71,7 @@ struct bq27xxx_device_info {int charge_design_full;bool removed;unsigned long last_update; +union power_supply_propval last_status;struct delayed_work work;struct power_supply *bat;struct list_head list;
include/linux/power_supply.h +3 -2
@@ -413,8 +413,9 @@ power_supply_temp2resist_simple(struct power_supply_resistance_temp_table *table int table_len, int temp);extern void power_supply_changed (struct power_supply *psy);extern int power_supply_am_i_supplied (struct power_supply *psy); -extern int power_supply_set_input_current_limit_from_supplier ( -struct power_supply *psy); +int power_supply_get_property_from_supplier (struct power_supply *psy, +enum power_supply_property psp, +union power_supply_propval *val);extern int power_supply_set_battery_charged (struct power_supply *psy);#ifdef CONFIG_POWER_SUPPLY
include/linux/regulator/driver.h +5 -0
@@ -370,6 +370,10 @@ struct regulator_desc {unsigned int pull_down_reg;unsigned int pull_down_mask;unsigned int pull_down_val_on; +unsigned int ramp_reg; +unsigned int ramp_mask; +const unsigned int *ramp_delay_table; +unsigned int n_ramp_values;unsigned int enable_time;
@@ -532,6 +536,7 @@ int regulator_set_current_limit_regmap(struct regulator_dev *rdev, int min_uA, int max_uA);int regulator_get_current_limit_regmap (struct regulator_dev *rdev);void *regulator_get_init_drvdata (struct regulator_init_data *reg_init_data); +int regulator_set_ramp_delay_regmap (struct regulator_dev *rdev,int ramp_delay);/* * Helper functions intended to be used by regulator drivers prior registering
include/net/ip.h +2 -0
@@ -75,6 +75,7 @@ struct ipcm_cookie {__be32 addr;int oif;struct ip_options_rcu *opt; +__u8 protocol;__u8 ttl;__s16 tos;char priority;
@@ -95,6 +96,7 @@ static inline void ipcm_init_sk(struct ipcm_cookie *ipcm, ipcm->sockc.tsflags = inet->sk.sk_tsflags; ipcm->oif = inet->sk.sk_bound_dev_if; ipcm->addr = inet->inet_saddr; + ipcm->protocol = inet->inet_num; }#define IPCB (skb) ((struct inet_skb_parm*)((skb)->cb))
include/uapi/linux/in.h +2 -0
@@ -159,6 +159,8 @@ struct in_addr {#define MCAST_MSFILTER 48#define IP_MULTICAST_ALL 49#define IP_UNICAST_IF 50 +#define IP_LOCAL_PORT_RANGE 51 +#define IP_PROTOCOL 52#define MCAST_EXCLUDE 0#define MCAST_INCLUDE 1
net/bluetooth/hci_sock.c +28 -0
@@ -980,6 +980,34 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd,BT_DBG ("cmd %x arg %lx" , cmd, arg); +/* Make sure the cmd is valid before doing anything */ +switch (cmd) { +case HCIGETDEVLIST : +case HCIGETDEVINFO : +case HCIGETCONNLIST : +case HCIDEVUP : +case HCIDEVDOWN : +case HCIDEVRESET : +case HCIDEVRESTAT : +case HCISETSCAN : +case HCISETAUTH : +case HCISETENCRYPT : +case HCISETPTYPE : +case HCISETLINKPOL : +case HCISETLINKMODE : +case HCISETACLMTU : +case HCISETSCOMTU : +case HCIINQUIRY : +case HCISETRAW : +case HCIGETCONNINFO : +case HCIGETAUTHINFO : +case HCIBLOCKADDR : +case HCIUNBLOCKADDR : +break ; +default : +return -ENOIOCTLCMD ; + } +lock_sock (sk);if (hci_pi (sk)->channel !=HCI_CHANNEL_RAW ) {
net/ipv4/ip_sockglue.c +11 -1
@@ -317,7 +317,14 @@ int ip_cmsg_send(struct sock *sk, struct msghdr *msg, struct ipcm_cookie *ipc, ipc->tos = val; ipc->priority =rt_tos2priority (ipc->tos);break ; - +case IP_PROTOCOL : +if (cmsg->cmsg_len !=CMSG_LEN (sizeof (int ))) +return -EINVAL ; + val = *(int *)CMSG_DATA (cmsg); +if (val <1 || val >255 ) +return -EINVAL ; + ipc->protocol = val; +break ;default :return -EINVAL ; }
@@ -1724,6 +1731,9 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,case IP_MINTTL : val = inet->min_ttl;break ; +case IP_PROTOCOL : + val =inet_sk (sk)->inet_num; +break ;default :release_sock (sk);return -ENOPROTOOPT ;
net/ipv4/raw.c +4 -1
@@ -559,6 +559,9 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) }ipcm_init_sk (&ipc, inet); +/* Keep backward compat */ +if (hdrincl) + ipc.protocol =IPPROTO_RAW ;if (msg->msg_controllen) { err =ip_cmsg_send (sk, msg, &ipc, false);
@@ -626,7 +629,7 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)flowi4_init_output (&fl4, ipc.oif, ipc.sockc.mark, tos,RT_SCOPE_UNIVERSE , - hdrincl ?IPPROTO_RAW : sk->sk_protocol, + hdrincl ? ipc.protocol : sk->sk_protocol,inet_sk_flowi_flags (sk) | (hdrincl ?FLOWI_FLAG_KNOWN_NH :0 ), daddr, saddr,0 ,0 , sk->sk_uid);
net/ipv6/raw.c +2 -1
@@ -828,7 +828,8 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)if (!proto) proto = inet->inet_num; -else if (proto != inet->inet_num) +else if (proto != inet->inet_num && + inet->inet_num !=IPPROTO_RAW )return -EINVAL ;if (proto >255 )
net/netfilter/nf_conntrack_netlink.c +0 -8
@@ -1493,9 +1493,6 @@ static const struct nla_policy ct_nla_policy[CTA_MAX+1] = {static int ctnetlink_flush_iterate (struct nf_conn *ct,void *data) { -if (test_bit (IPS_OFFLOAD_BIT , &ct->status)) -return 0 ; -return ctnetlink_filter_match (ct, data); }
@@ -1561,11 +1558,6 @@ static int ctnetlink_del_conntrack(struct net *net, struct sock *ctnl, ct =nf_ct_tuplehash_to_ctrack (h); -if (test_bit (IPS_OFFLOAD_BIT , &ct->status)) { -nf_ct_put (ct); -return -EBUSY ; - } -if (cda[CTA_ID ]) {__be32 id =nla_get_be32 (cda[CTA_ID ]);