mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge branch 'deprecated/android-4.14-stable' of https://android.googlesource.com/kernel/common into HEAD
* 'deprecated/android-4.14-stable' of https://android.googlesource.com/kernel/common: (101 commits) Linux 4.14.336 mmc: core: Cancel delayed work before releasing host mmc: rpmb: fixes pause retune on all RPMB partitions. firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards i40e: fix use-after-free in i40e_aqc_add_filters() net: bcmgenet: Fix FCS generation for fragmented skbuffs net: sched: em_text: fix possible memory leak in em_text_destroy() nfc: llcp_core: Hold a ref to llcp_local->dev when holding a ref to llcp_local UPSTREAM: drm: Fix doc warning in drm_connector_attach_edid_property() BACKPORT: lib/vsprintf: Hash legacy clock addresses UPSTREAM: xfrm: fix gro_cells leak when remove virtual xfrm interfaces UPSTREAM: xfrm: Make function xfrmi_get_link_net() static UPSTREAM: cpuidle: menu: Retain tick when shallow state is selected UPSTREAM: bpf: fix rcu annotations in compute_effective_progs() UPSTREAM: bpf: bpf_prog_array_alloc() should return a generic non-rcu pointer UPSTREAM: sched/util_est: Fix util_est_dequeue() for throttled cfs_rq UPSTREAM: softirq: Reorder trace_softirqs_on to prevent lockdep splat UPSTREAM: l2tp: fix refcount leakage on PPPoL2TP sockets UPSTREAM: HID: steam: select CONFIG_POWER_SUPPLY BACKPORT: mac80211_hwsim: fix a possible memory leak in hwsim_new_radio_nl() ... Change-Id: I1c98fbb0918986a06bee16b0c11fe8bee003fd3f Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
commit
669eb74484
@ -423,9 +423,8 @@ struct clk
|
||||
%pC pll1
|
||||
%pCn pll1
|
||||
|
||||
For printing struct clk structures. ``%pC`` and ``%pCn`` print the name
|
||||
(Common Clock Framework) or address (legacy clock framework) of the
|
||||
structure.
|
||||
For printing struct clk structures. %pC and %pCn print the name of the clock
|
||||
(Common Clock Framework) or a unique 32-bit ID (legacy clock framework).
|
||||
|
||||
Passed by reference.
|
||||
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 332
|
||||
SUBLEVEL = 336
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
@ -784,10 +784,15 @@ void __init omap_soc_device_init(void)
|
||||
|
||||
soc_dev_attr->machine = soc_name;
|
||||
soc_dev_attr->family = omap_get_family();
|
||||
if (!soc_dev_attr->family) {
|
||||
kfree(soc_dev_attr);
|
||||
return;
|
||||
}
|
||||
soc_dev_attr->revision = soc_rev;
|
||||
|
||||
soc_dev = soc_device_register(soc_dev_attr);
|
||||
if (IS_ERR(soc_dev)) {
|
||||
kfree(soc_dev_attr->family);
|
||||
kfree(soc_dev_attr);
|
||||
return;
|
||||
}
|
||||
|
@ -41,6 +41,9 @@ _GLOBAL(ftrace_caller)
|
||||
/* Save the original return address in A's stack frame */
|
||||
std r0,LRSAVE(r1)
|
||||
|
||||
/* Create a minimal stack frame for representing B */
|
||||
stdu r1, -STACK_FRAME_MIN_SIZE(r1)
|
||||
|
||||
/* Create our stack frame + pt_regs */
|
||||
stdu r1,-SWITCH_FRAME_SIZE(r1)
|
||||
|
||||
@ -51,7 +54,7 @@ _GLOBAL(ftrace_caller)
|
||||
SAVE_10GPRS(22, r1)
|
||||
|
||||
/* Save previous stack pointer (r1) */
|
||||
addi r8, r1, SWITCH_FRAME_SIZE
|
||||
addi r8, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
|
||||
std r8, GPR1(r1)
|
||||
|
||||
/* Load special regs for save below */
|
||||
@ -64,6 +67,8 @@ _GLOBAL(ftrace_caller)
|
||||
mflr r7
|
||||
/* Save it as pt_regs->nip */
|
||||
std r7, _NIP(r1)
|
||||
/* Also save it in B's stackframe header for proper unwind */
|
||||
std r7, LRSAVE+SWITCH_FRAME_SIZE(r1)
|
||||
/* Save the read LR in pt_regs->link */
|
||||
std r0, _LINK(r1)
|
||||
|
||||
@ -146,7 +151,7 @@ ftrace_call:
|
||||
ld r2, 24(r1)
|
||||
|
||||
/* Pop our stack frame */
|
||||
addi r1, r1, SWITCH_FRAME_SIZE
|
||||
addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
|
||||
|
||||
#ifdef CONFIG_LIVEPATCH
|
||||
/*
|
||||
|
@ -76,7 +76,7 @@ static inline int test_fp_ctl(u32 fpc)
|
||||
#define KERNEL_VXR_HIGH (KERNEL_VXR_V16V23|KERNEL_VXR_V24V31)
|
||||
|
||||
#define KERNEL_VXR (KERNEL_VXR_LOW|KERNEL_VXR_HIGH)
|
||||
#define KERNEL_FPR (KERNEL_FPC|KERNEL_VXR_V0V7)
|
||||
#define KERNEL_FPR (KERNEL_FPC|KERNEL_VXR_LOW)
|
||||
|
||||
struct kernel_fpu;
|
||||
|
||||
|
@ -667,7 +667,7 @@ void ptep_zap_unused(struct mm_struct *mm, unsigned long addr,
|
||||
pte_clear(mm, addr, ptep);
|
||||
}
|
||||
if (reset)
|
||||
pgste_val(pgste) &= ~_PGSTE_GPS_USAGE_MASK;
|
||||
pgste_val(pgste) &= ~(_PGSTE_GPS_USAGE_MASK | _PGSTE_GPS_NODAT);
|
||||
pgste_set_unlock(ptep, pgste);
|
||||
preempt_enable();
|
||||
}
|
||||
|
@ -1391,6 +1391,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
|
||||
tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE),
|
||||
tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE));
|
||||
|
||||
rcu_read_lock();
|
||||
/*
|
||||
* Update has_rules[] flags for the updated tg's subtree. A tg is
|
||||
* considered to have rules if either the tg itself or any of its
|
||||
@ -1418,6 +1419,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
|
||||
this_tg->latency_target = max(this_tg->latency_target,
|
||||
parent_tg->latency_target);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
/*
|
||||
* We're already holding queue_lock and know @tg is valid. Let's
|
||||
|
@ -458,9 +458,9 @@ static ssize_t console_show(struct device *dev, struct device_attribute *attr,
|
||||
struct sk_buff *skb;
|
||||
unsigned int len;
|
||||
|
||||
spin_lock(&card->cli_queue_lock);
|
||||
spin_lock_bh(&card->cli_queue_lock);
|
||||
skb = skb_dequeue(&card->cli_queue[SOLOS_CHAN(atmdev)]);
|
||||
spin_unlock(&card->cli_queue_lock);
|
||||
spin_unlock_bh(&card->cli_queue_lock);
|
||||
if(skb == NULL)
|
||||
return sprintf(buf, "No data.\n");
|
||||
|
||||
@ -968,14 +968,14 @@ static void pclose(struct atm_vcc *vcc)
|
||||
struct pkt_hdr *header;
|
||||
|
||||
/* Remove any yet-to-be-transmitted packets from the pending queue */
|
||||
spin_lock(&card->tx_queue_lock);
|
||||
spin_lock_bh(&card->tx_queue_lock);
|
||||
skb_queue_walk_safe(&card->tx_queue[port], skb, tmpskb) {
|
||||
if (SKB_CB(skb)->vcc == vcc) {
|
||||
skb_unlink(skb, &card->tx_queue[port]);
|
||||
solos_pop(vcc, skb);
|
||||
}
|
||||
}
|
||||
spin_unlock(&card->tx_queue_lock);
|
||||
spin_unlock_bh(&card->tx_queue_lock);
|
||||
|
||||
skb = alloc_skb(sizeof(*header), GFP_KERNEL);
|
||||
if (!skb) {
|
||||
|
@ -389,9 +389,20 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
|
||||
if (idx == -1)
|
||||
idx = i; /* first enabled state */
|
||||
if (s->target_residency > data->predicted_us) {
|
||||
if (!tick_nohz_tick_stopped())
|
||||
if (data->predicted_us < TICK_USEC)
|
||||
break;
|
||||
|
||||
if (!tick_nohz_tick_stopped()) {
|
||||
/*
|
||||
* If the state selected so far is shallow,
|
||||
* waking up early won't hurt, so retain the
|
||||
* tick in that case and let the governor run
|
||||
* again in the next iteration of the loop.
|
||||
*/
|
||||
expected_interval = drv->states[idx].target_residency;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the state selected so far is shallow and this
|
||||
* state's target residency matches the time till the
|
||||
|
@ -292,6 +292,51 @@ static char ohci_driver_name[] = KBUILD_MODNAME;
|
||||
#define QUIRK_TI_SLLZ059 0x20
|
||||
#define QUIRK_IR_WAKE 0x40
|
||||
|
||||
// On PCI Express Root Complex in any type of AMD Ryzen machine, VIA VT6306/6307/6308 with Asmedia
|
||||
// ASM1083/1085 brings an inconvenience that the read accesses to 'Isochronous Cycle Timer' register
|
||||
// (at offset 0xf0 in PCI I/O space) often causes unexpected system reboot. The mechanism is not
|
||||
// clear, since the read access to the other registers is enough safe; e.g. 'Node ID' register,
|
||||
// while it is probable due to detection of any type of PCIe error.
|
||||
#define QUIRK_REBOOT_BY_CYCLE_TIMER_READ 0x80000000
|
||||
|
||||
#if IS_ENABLED(CONFIG_X86)
|
||||
|
||||
static bool has_reboot_by_cycle_timer_read_quirk(const struct fw_ohci *ohci)
|
||||
{
|
||||
return !!(ohci->quirks & QUIRK_REBOOT_BY_CYCLE_TIMER_READ);
|
||||
}
|
||||
|
||||
#define PCI_DEVICE_ID_ASMEDIA_ASM108X 0x1080
|
||||
|
||||
static bool detect_vt630x_with_asm1083_on_amd_ryzen_machine(const struct pci_dev *pdev)
|
||||
{
|
||||
const struct pci_dev *pcie_to_pci_bridge;
|
||||
|
||||
// Detect any type of AMD Ryzen machine.
|
||||
if (!static_cpu_has(X86_FEATURE_ZEN))
|
||||
return false;
|
||||
|
||||
// Detect VIA VT6306/6307/6308.
|
||||
if (pdev->vendor != PCI_VENDOR_ID_VIA)
|
||||
return false;
|
||||
if (pdev->device != PCI_DEVICE_ID_VIA_VT630X)
|
||||
return false;
|
||||
|
||||
// Detect Asmedia ASM1083/1085.
|
||||
pcie_to_pci_bridge = pdev->bus->self;
|
||||
if (pcie_to_pci_bridge->vendor != PCI_VENDOR_ID_ASMEDIA)
|
||||
return false;
|
||||
if (pcie_to_pci_bridge->device != PCI_DEVICE_ID_ASMEDIA_ASM108X)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
#define has_reboot_by_cycle_timer_read_quirk(ohci) false
|
||||
#define detect_vt630x_with_asm1083_on_amd_ryzen_machine(pdev) false
|
||||
#endif
|
||||
|
||||
/* In case of multiple matches in ohci_quirks[], only the first one is used. */
|
||||
static const struct {
|
||||
unsigned short vendor, device, revision, flags;
|
||||
@ -1732,6 +1777,9 @@ static u32 get_cycle_time(struct fw_ohci *ohci)
|
||||
s32 diff01, diff12;
|
||||
int i;
|
||||
|
||||
if (has_reboot_by_cycle_timer_read_quirk(ohci))
|
||||
return 0;
|
||||
|
||||
c2 = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
|
||||
|
||||
if (ohci->quirks & QUIRK_CYCLE_TIMER) {
|
||||
@ -3635,6 +3683,9 @@ static int pci_probe(struct pci_dev *dev,
|
||||
if (param_quirks)
|
||||
ohci->quirks = param_quirks;
|
||||
|
||||
if (detect_vt630x_with_asm1083_on_amd_ryzen_machine(dev))
|
||||
ohci->quirks |= QUIRK_REBOOT_BY_CYCLE_TIMER_READ;
|
||||
|
||||
/*
|
||||
* Because dma_alloc_coherent() allocates at least one page,
|
||||
* we save space by using a common buffer for the AR request/
|
||||
|
@ -113,7 +113,7 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
|
||||
}
|
||||
|
||||
for (i = 0; i < p->nchunks; i++) {
|
||||
struct drm_amdgpu_cs_chunk __user **chunk_ptr = NULL;
|
||||
struct drm_amdgpu_cs_chunk __user *chunk_ptr = NULL;
|
||||
struct drm_amdgpu_cs_chunk user_chunk;
|
||||
uint32_t __user *cdata;
|
||||
|
||||
|
@ -254,7 +254,6 @@ EXPORT_SYMBOL(drm_connector_init);
|
||||
|
||||
/**
|
||||
* drm_connector_attach_edid_property - attach edid property.
|
||||
* @dev: DRM device
|
||||
* @connector: the connector
|
||||
*
|
||||
* Some connector types like DRM_MODE_CONNECTOR_VIRTUAL do not get a
|
||||
|
@ -846,6 +846,7 @@ config HID_SPEEDLINK
|
||||
config HID_STEAM
|
||||
tristate "Steam Controller support"
|
||||
depends on HID
|
||||
select POWER_SUPPLY
|
||||
---help---
|
||||
Say Y here if you have a Steam Controller if you want to use it
|
||||
without running the Steam Client. It supports both the wired and
|
||||
|
@ -232,7 +232,7 @@ static int asus_raw_event(struct hid_device *hdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int asus_kbd_set_report(struct hid_device *hdev, u8 *buf, size_t buf_size)
|
||||
static int asus_kbd_set_report(struct hid_device *hdev, const u8 *buf, size_t buf_size)
|
||||
{
|
||||
unsigned char *dmabuf;
|
||||
int ret;
|
||||
@ -251,7 +251,7 @@ static int asus_kbd_set_report(struct hid_device *hdev, u8 *buf, size_t buf_size
|
||||
|
||||
static int asus_kbd_init(struct hid_device *hdev)
|
||||
{
|
||||
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54,
|
||||
const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54,
|
||||
0x65, 0x63, 0x68, 0x2e, 0x49, 0x6e, 0x63, 0x2e, 0x00 };
|
||||
int ret;
|
||||
|
||||
@ -265,7 +265,7 @@ static int asus_kbd_init(struct hid_device *hdev)
|
||||
static int asus_kbd_get_functions(struct hid_device *hdev,
|
||||
unsigned char *kbd_func)
|
||||
{
|
||||
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 };
|
||||
const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 };
|
||||
u8 *readbuf;
|
||||
int ret;
|
||||
|
||||
@ -592,6 +592,24 @@ static int asus_start_multitouch(struct hid_device *hdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused asus_resume(struct hid_device *hdev) {
|
||||
struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
|
||||
int ret = 0;
|
||||
|
||||
if (drvdata->kbd_backlight) {
|
||||
const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4,
|
||||
drvdata->kbd_backlight->cdev.brightness };
|
||||
ret = asus_kbd_set_report(hdev, buf, sizeof(buf));
|
||||
if (ret < 0) {
|
||||
hid_err(hdev, "Asus failed to set keyboard backlight: %d\n", ret);
|
||||
goto asus_resume_err;
|
||||
}
|
||||
}
|
||||
|
||||
asus_resume_err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int __maybe_unused asus_reset_resume(struct hid_device *hdev)
|
||||
{
|
||||
struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
|
||||
@ -768,6 +786,7 @@ static struct hid_driver asus_driver = {
|
||||
.input_configured = asus_input_configured,
|
||||
#ifdef CONFIG_PM
|
||||
.reset_resume = asus_reset_resume,
|
||||
.resume = asus_resume,
|
||||
#endif
|
||||
.raw_event = asus_raw_event
|
||||
};
|
||||
|
@ -1602,6 +1602,11 @@ static const struct hid_device_id mt_devices[] = {
|
||||
MT_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT,
|
||||
USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) },
|
||||
|
||||
/* HONOR GLO-GXXX panel */
|
||||
{ .driver_data = MT_CLS_VTL,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
|
||||
0x347d, 0x7853) },
|
||||
|
||||
/* Ilitek dual touch panel */
|
||||
{ .driver_data = MT_CLS_NSMU,
|
||||
MT_USB_DEVICE(USB_VENDOR_ID_ILITEK,
|
||||
|
@ -45,6 +45,7 @@ ACPI_MODULE_NAME(ACPI_POWER_METER_NAME);
|
||||
#define POWER_METER_CAN_NOTIFY (1 << 3)
|
||||
#define POWER_METER_IS_BATTERY (1 << 8)
|
||||
#define UNKNOWN_HYSTERESIS 0xFFFFFFFF
|
||||
#define UNKNOWN_POWER 0xFFFFFFFF
|
||||
|
||||
#define METER_NOTIFY_CONFIG 0x80
|
||||
#define METER_NOTIFY_TRIP 0x81
|
||||
@ -356,6 +357,9 @@ static ssize_t show_power(struct device *dev,
|
||||
update_meter(resource);
|
||||
mutex_unlock(&resource->lock);
|
||||
|
||||
if (resource->power == UNKNOWN_POWER)
|
||||
return -ENODATA;
|
||||
|
||||
return sprintf(buf, "%llu\n", resource->power * 1000);
|
||||
}
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
/* Conversion times in us */
|
||||
static const u16 ms_sensors_ht_t_conversion_time[] = { 50000, 25000,
|
||||
13000, 7000 };
|
||||
static const u16 ms_sensors_ht_h_conversion_time[] = { 16000, 3000,
|
||||
5000, 8000 };
|
||||
static const u16 ms_sensors_ht_h_conversion_time[] = { 16000, 5000,
|
||||
3000, 8000 };
|
||||
static const u16 ms_sensors_tp_conversion_time[] = { 500, 1100, 2100,
|
||||
4100, 8220, 16440 };
|
||||
|
||||
|
@ -421,13 +421,13 @@ error_read_raw_unlock:
|
||||
ret = inv_mpu6050_sensor_show(st, st->reg->gyro_offset,
|
||||
chan->channel2, val);
|
||||
mutex_unlock(&st->lock);
|
||||
return IIO_VAL_INT;
|
||||
return ret;
|
||||
case IIO_ACCEL:
|
||||
mutex_lock(&st->lock);
|
||||
ret = inv_mpu6050_sensor_show(st, st->reg->accl_offset,
|
||||
chan->channel2, val);
|
||||
mutex_unlock(&st->lock);
|
||||
return IIO_VAL_INT;
|
||||
return ret;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
@ -70,7 +70,7 @@ static char version[] =
|
||||
BNXT_RE_DESC " v" ROCE_DRV_MODULE_VERSION "\n";
|
||||
|
||||
MODULE_AUTHOR("Eddie Wai <eddie.wai@broadcom.com>");
|
||||
MODULE_DESCRIPTION(BNXT_RE_DESC " Driver");
|
||||
MODULE_DESCRIPTION(BNXT_RE_DESC);
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
||||
/* globals */
|
||||
|
@ -108,6 +108,9 @@ static int micro_key_probe(struct platform_device *pdev)
|
||||
keys->codes = devm_kmemdup(&pdev->dev, micro_keycodes,
|
||||
keys->input->keycodesize * keys->input->keycodemax,
|
||||
GFP_KERNEL);
|
||||
if (!keys->codes)
|
||||
return -ENOMEM;
|
||||
|
||||
keys->input->keycode = keys->codes;
|
||||
|
||||
__set_bit(EV_KEY, keys->input->evbit);
|
||||
|
@ -972,6 +972,9 @@ err:
|
||||
*
|
||||
* The btree node will have either a read or a write lock held, depending on
|
||||
* level and op->lock.
|
||||
*
|
||||
* Note: Only error code or btree pointer will be returned, it is unncessary
|
||||
* for callers to check NULL pointer.
|
||||
*/
|
||||
struct btree *bch_btree_node_get(struct cache_set *c, struct btree_op *op,
|
||||
struct bkey *k, int level, bool write,
|
||||
@ -1070,6 +1073,10 @@ static void btree_node_free(struct btree *b)
|
||||
mutex_unlock(&b->c->bucket_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Only error code or btree pointer will be returned, it is unncessary for
|
||||
* callers to check NULL pointer.
|
||||
*/
|
||||
struct btree *__bch_btree_node_alloc(struct cache_set *c, struct btree_op *op,
|
||||
int level, bool wait,
|
||||
struct btree *parent)
|
||||
|
@ -1257,11 +1257,12 @@ static void integrity_metadata(struct work_struct *w)
|
||||
checksums = checksums_onstack;
|
||||
|
||||
__bio_for_each_segment(bv, bio, iter, dio->orig_bi_iter) {
|
||||
struct bio_vec bv_copy = bv;
|
||||
unsigned pos;
|
||||
char *mem, *checksums_ptr;
|
||||
|
||||
again:
|
||||
mem = (char *)kmap_atomic(bv.bv_page) + bv.bv_offset;
|
||||
mem = (char *)kmap_atomic(bv_copy.bv_page) + bv_copy.bv_offset;
|
||||
pos = 0;
|
||||
checksums_ptr = checksums;
|
||||
do {
|
||||
@ -1270,7 +1271,7 @@ again:
|
||||
sectors_to_process -= ic->sectors_per_block;
|
||||
pos += ic->sectors_per_block << SECTOR_SHIFT;
|
||||
sector += ic->sectors_per_block;
|
||||
} while (pos < bv.bv_len && sectors_to_process && checksums != checksums_onstack);
|
||||
} while (pos < bv_copy.bv_len && sectors_to_process && checksums != checksums_onstack);
|
||||
kunmap_atomic(mem);
|
||||
|
||||
r = dm_integrity_rw_tag(ic, checksums, &dio->metadata_block, &dio->metadata_offset,
|
||||
@ -1290,9 +1291,9 @@ again:
|
||||
if (!sectors_to_process)
|
||||
break;
|
||||
|
||||
if (unlikely(pos < bv.bv_len)) {
|
||||
bv.bv_offset += pos;
|
||||
bv.bv_len -= pos;
|
||||
if (unlikely(pos < bv_copy.bv_len)) {
|
||||
bv_copy.bv_offset += pos;
|
||||
bv_copy.bv_len -= pos;
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
|
@ -1252,9 +1252,10 @@ static const struct block_device_operations mmc_bdops = {
|
||||
static int mmc_blk_part_switch_pre(struct mmc_card *card,
|
||||
unsigned int part_type)
|
||||
{
|
||||
const unsigned int mask = EXT_CSD_PART_CONFIG_ACC_RPMB;
|
||||
int ret = 0;
|
||||
|
||||
if (part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) {
|
||||
if ((part_type & mask) == mask) {
|
||||
if (card->ext_csd.cmdq_en) {
|
||||
ret = mmc_cmdq_disable(card);
|
||||
if (ret)
|
||||
@ -1269,9 +1270,10 @@ static int mmc_blk_part_switch_pre(struct mmc_card *card,
|
||||
static int mmc_blk_part_switch_post(struct mmc_card *card,
|
||||
unsigned int part_type)
|
||||
{
|
||||
const unsigned int mask = EXT_CSD_PART_CONFIG_ACC_RPMB;
|
||||
int ret = 0;
|
||||
|
||||
if (part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) {
|
||||
if ((part_type & mask) == mask) {
|
||||
mmc_retune_unpause(card->host);
|
||||
if (card->reenable_cmdq && !card->ext_csd.cmdq_en)
|
||||
ret = mmc_cmdq_enable(card);
|
||||
@ -4446,4 +4448,3 @@ module_exit(mmc_blk_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Multimedia Card (MMC) block device driver");
|
||||
|
||||
|
@ -1071,6 +1071,7 @@ EXPORT_SYMBOL(mmc_remove_host);
|
||||
*/
|
||||
void mmc_free_host(struct mmc_host *host)
|
||||
{
|
||||
cancel_delayed_work_sync(&host->detect);
|
||||
mmc_crypto_free_host(host);
|
||||
mmc_pwrseq_free(host);
|
||||
put_device(&host->class_dev);
|
||||
|
@ -880,10 +880,13 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
|
||||
netdev_err(adapter->netdev, "offset(%d) > ring size(%d) !!\n",
|
||||
offset, adapter->ring_size);
|
||||
err = -1;
|
||||
goto failed;
|
||||
goto free_buffer;
|
||||
}
|
||||
|
||||
return 0;
|
||||
free_buffer:
|
||||
kfree(tx_ring->tx_buffer);
|
||||
tx_ring->tx_buffer = NULL;
|
||||
failed:
|
||||
if (adapter->ring_vir_addr != NULL) {
|
||||
pci_free_consistent(pdev, adapter->ring_size,
|
||||
|
@ -1625,8 +1625,10 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
/* Note: if we ever change from DMA_TX_APPEND_CRC below we
|
||||
* will need to restore software padding of "runt" packets
|
||||
*/
|
||||
len_stat |= DMA_TX_APPEND_CRC;
|
||||
|
||||
if (!i) {
|
||||
len_stat |= DMA_TX_APPEND_CRC | DMA_SOP;
|
||||
len_stat |= DMA_SOP;
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL)
|
||||
len_stat |= DMA_TX_DO_CSUM;
|
||||
}
|
||||
|
@ -6844,7 +6844,7 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
|
||||
desc_idx, *post_ptr);
|
||||
drop_it_no_recycle:
|
||||
/* Other statistics kept track of by card. */
|
||||
tp->rx_dropped++;
|
||||
tnapi->rx_dropped++;
|
||||
goto next_pkt;
|
||||
}
|
||||
|
||||
@ -7872,8 +7872,10 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
|
||||
|
||||
segs = skb_gso_segment(skb, tp->dev->features &
|
||||
~(NETIF_F_TSO | NETIF_F_TSO6));
|
||||
if (IS_ERR(segs) || !segs)
|
||||
if (IS_ERR(segs) || !segs) {
|
||||
tnapi->tx_dropped++;
|
||||
goto tg3_tso_bug_end;
|
||||
}
|
||||
|
||||
do {
|
||||
nskb = segs;
|
||||
@ -8146,7 +8148,7 @@ dma_error:
|
||||
drop:
|
||||
dev_kfree_skb_any(skb);
|
||||
drop_nofree:
|
||||
tp->tx_dropped++;
|
||||
tnapi->tx_dropped++;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
@ -9324,7 +9326,7 @@ static void __tg3_set_rx_mode(struct net_device *);
|
||||
/* tp->lock is held. */
|
||||
static int tg3_halt(struct tg3 *tp, int kind, bool silent)
|
||||
{
|
||||
int err;
|
||||
int err, i;
|
||||
|
||||
tg3_stop_fw(tp);
|
||||
|
||||
@ -9345,6 +9347,13 @@ static int tg3_halt(struct tg3 *tp, int kind, bool silent)
|
||||
|
||||
/* And make sure the next sample is new data */
|
||||
memset(tp->hw_stats, 0, sizeof(struct tg3_hw_stats));
|
||||
|
||||
for (i = 0; i < TG3_IRQ_MAX_VECS; ++i) {
|
||||
struct tg3_napi *tnapi = &tp->napi[i];
|
||||
|
||||
tnapi->rx_dropped = 0;
|
||||
tnapi->tx_dropped = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
@ -11888,6 +11897,9 @@ static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
|
||||
{
|
||||
struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev;
|
||||
struct tg3_hw_stats *hw_stats = tp->hw_stats;
|
||||
unsigned long rx_dropped;
|
||||
unsigned long tx_dropped;
|
||||
int i;
|
||||
|
||||
stats->rx_packets = old_stats->rx_packets +
|
||||
get_stat64(&hw_stats->rx_ucast_packets) +
|
||||
@ -11934,8 +11946,26 @@ static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats)
|
||||
stats->rx_missed_errors = old_stats->rx_missed_errors +
|
||||
get_stat64(&hw_stats->rx_discards);
|
||||
|
||||
stats->rx_dropped = tp->rx_dropped;
|
||||
stats->tx_dropped = tp->tx_dropped;
|
||||
/* Aggregate per-queue counters. The per-queue counters are updated
|
||||
* by a single writer, race-free. The result computed by this loop
|
||||
* might not be 100% accurate (counters can be updated in the middle of
|
||||
* the loop) but the next tg3_get_nstats() will recompute the current
|
||||
* value so it is acceptable.
|
||||
*
|
||||
* Note that these counters wrap around at 4G on 32bit machines.
|
||||
*/
|
||||
rx_dropped = (unsigned long)(old_stats->rx_dropped);
|
||||
tx_dropped = (unsigned long)(old_stats->tx_dropped);
|
||||
|
||||
for (i = 0; i < tp->irq_cnt; i++) {
|
||||
struct tg3_napi *tnapi = &tp->napi[i];
|
||||
|
||||
rx_dropped += tnapi->rx_dropped;
|
||||
tx_dropped += tnapi->tx_dropped;
|
||||
}
|
||||
|
||||
stats->rx_dropped = rx_dropped;
|
||||
stats->tx_dropped = tx_dropped;
|
||||
}
|
||||
|
||||
static int tg3_get_regs_len(struct net_device *dev)
|
||||
|
@ -3005,6 +3005,7 @@ struct tg3_napi {
|
||||
u16 *rx_rcb_prod_idx;
|
||||
struct tg3_rx_prodring_set prodring;
|
||||
struct tg3_rx_buffer_desc *rx_rcb;
|
||||
unsigned long rx_dropped;
|
||||
|
||||
u32 tx_prod ____cacheline_aligned;
|
||||
u32 tx_cons;
|
||||
@ -3013,6 +3014,7 @@ struct tg3_napi {
|
||||
u32 prodmbox;
|
||||
struct tg3_tx_buffer_desc *tx_ring;
|
||||
struct tg3_tx_ring_info *tx_buffers;
|
||||
unsigned long tx_dropped;
|
||||
|
||||
dma_addr_t status_mapping;
|
||||
dma_addr_t rx_rcb_mapping;
|
||||
@ -3206,8 +3208,6 @@ struct tg3 {
|
||||
|
||||
|
||||
/* begin "everything else" cacheline(s) section */
|
||||
unsigned long rx_dropped;
|
||||
unsigned long tx_dropped;
|
||||
struct rtnl_link_stats64 net_stats_prev;
|
||||
struct tg3_ethtool_stats estats_prev;
|
||||
|
||||
|
@ -70,6 +70,27 @@ static enum mac_mode hns_get_enet_interface(const struct hns_mac_cb *mac_cb)
|
||||
}
|
||||
}
|
||||
|
||||
static u32 hns_mac_link_anti_shake(struct mac_driver *mac_ctrl_drv)
|
||||
{
|
||||
#define HNS_MAC_LINK_WAIT_TIME 5
|
||||
#define HNS_MAC_LINK_WAIT_CNT 40
|
||||
|
||||
u32 link_status = 0;
|
||||
int i;
|
||||
|
||||
if (!mac_ctrl_drv->get_link_status)
|
||||
return link_status;
|
||||
|
||||
for (i = 0; i < HNS_MAC_LINK_WAIT_CNT; i++) {
|
||||
msleep(HNS_MAC_LINK_WAIT_TIME);
|
||||
mac_ctrl_drv->get_link_status(mac_ctrl_drv, &link_status);
|
||||
if (!link_status)
|
||||
break;
|
||||
}
|
||||
|
||||
return link_status;
|
||||
}
|
||||
|
||||
void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status)
|
||||
{
|
||||
struct mac_driver *mac_ctrl_drv;
|
||||
@ -87,6 +108,14 @@ void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status)
|
||||
&sfp_prsnt);
|
||||
if (!ret)
|
||||
*link_status = *link_status && sfp_prsnt;
|
||||
|
||||
/* for FIBER port, it may have a fake link up.
|
||||
* when the link status changes from down to up, we need to do
|
||||
* anti-shake. the anti-shake time is base on tests.
|
||||
* only FIBER port need to do this.
|
||||
*/
|
||||
if (*link_status && !mac_cb->link)
|
||||
*link_status = hns_mac_link_anti_shake(mac_ctrl_drv);
|
||||
}
|
||||
|
||||
mac_cb->link = *link_status;
|
||||
|
@ -117,12 +117,18 @@ static struct workqueue_struct *i40e_wq;
|
||||
static void netdev_hw_addr_refcnt(struct i40e_mac_filter *f,
|
||||
struct net_device *netdev, int delta)
|
||||
{
|
||||
struct netdev_hw_addr_list *ha_list;
|
||||
struct netdev_hw_addr *ha;
|
||||
|
||||
if (!f || !netdev)
|
||||
return;
|
||||
|
||||
netdev_for_each_mc_addr(ha, netdev) {
|
||||
if (is_unicast_ether_addr(f->macaddr) || is_link_local_ether_addr(f->macaddr))
|
||||
ha_list = &netdev->uc;
|
||||
else
|
||||
ha_list = &netdev->mc;
|
||||
|
||||
netdev_hw_addr_list_for_each(ha, ha_list) {
|
||||
if (ether_addr_equal(ha->addr, f->macaddr)) {
|
||||
ha->refcount += delta;
|
||||
if (ha->refcount <= 0)
|
||||
|
@ -1024,6 +1024,7 @@ static void qed_ilt_shadow_free(struct qed_hwfn *p_hwfn)
|
||||
p_dma->p_virt = NULL;
|
||||
}
|
||||
kfree(p_mngr->ilt_shadow);
|
||||
p_mngr->ilt_shadow = NULL;
|
||||
}
|
||||
|
||||
static int qed_ilt_blk_alloc(struct qed_hwfn *p_hwfn,
|
||||
|
@ -30,6 +30,8 @@
|
||||
|
||||
#define QCASPI_MAX_REGS 0x20
|
||||
|
||||
#define QCASPI_RX_MAX_FRAMES 4
|
||||
|
||||
static const u16 qcaspi_spi_regs[] = {
|
||||
SPI_REG_BFR_SIZE,
|
||||
SPI_REG_WRBUF_SPC_AVA,
|
||||
@ -266,31 +268,30 @@ qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
|
||||
{
|
||||
struct qcaspi *qca = netdev_priv(dev);
|
||||
|
||||
ring->rx_max_pending = 4;
|
||||
ring->rx_max_pending = QCASPI_RX_MAX_FRAMES;
|
||||
ring->tx_max_pending = TX_RING_MAX_LEN;
|
||||
ring->rx_pending = 4;
|
||||
ring->rx_pending = QCASPI_RX_MAX_FRAMES;
|
||||
ring->tx_pending = qca->txr.count;
|
||||
}
|
||||
|
||||
static int
|
||||
qcaspi_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring)
|
||||
{
|
||||
const struct net_device_ops *ops = dev->netdev_ops;
|
||||
struct qcaspi *qca = netdev_priv(dev);
|
||||
|
||||
if ((ring->rx_pending) ||
|
||||
if (ring->rx_pending != QCASPI_RX_MAX_FRAMES ||
|
||||
(ring->rx_mini_pending) ||
|
||||
(ring->rx_jumbo_pending))
|
||||
return -EINVAL;
|
||||
|
||||
if (netif_running(dev))
|
||||
ops->ndo_stop(dev);
|
||||
if (qca->spi_thread)
|
||||
kthread_park(qca->spi_thread);
|
||||
|
||||
qca->txr.count = max_t(u32, ring->tx_pending, TX_RING_MIN_LEN);
|
||||
qca->txr.count = min_t(u16, qca->txr.count, TX_RING_MAX_LEN);
|
||||
|
||||
if (netif_running(dev))
|
||||
ops->ndo_open(dev);
|
||||
if (qca->spi_thread)
|
||||
kthread_unpark(qca->spi_thread);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -552,6 +552,18 @@ qcaspi_spi_thread(void *data)
|
||||
netdev_info(qca->net_dev, "SPI thread created\n");
|
||||
while (!kthread_should_stop()) {
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
if (kthread_should_park()) {
|
||||
netif_tx_disable(qca->net_dev);
|
||||
netif_carrier_off(qca->net_dev);
|
||||
qcaspi_flush_tx_ring(qca);
|
||||
kthread_parkme();
|
||||
if (qca->sync == QCASPI_SYNC_READY) {
|
||||
netif_carrier_on(qca->net_dev);
|
||||
netif_wake_queue(qca->net_dev);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((qca->intr_req == qca->intr_svc) &&
|
||||
!qca->txr.skb[qca->txr.head])
|
||||
schedule();
|
||||
@ -580,11 +592,17 @@ qcaspi_spi_thread(void *data)
|
||||
if (intr_cause & SPI_INT_CPU_ON) {
|
||||
qcaspi_qca7k_sync(qca, QCASPI_EVENT_CPUON);
|
||||
|
||||
/* Frame decoding in progress */
|
||||
if (qca->frm_handle.state != qca->frm_handle.init)
|
||||
qca->net_dev->stats.rx_dropped++;
|
||||
|
||||
qcafrm_fsm_init_spi(&qca->frm_handle);
|
||||
qca->stats.device_reset++;
|
||||
|
||||
/* not synced. */
|
||||
if (qca->sync != QCASPI_SYNC_READY)
|
||||
continue;
|
||||
|
||||
qca->stats.device_reset++;
|
||||
netif_wake_queue(qca->net_dev);
|
||||
netif_carrier_on(qca->net_dev);
|
||||
}
|
||||
|
@ -296,8 +296,10 @@ static int __team_options_register(struct team *team,
|
||||
return 0;
|
||||
|
||||
inst_rollback:
|
||||
for (i--; i >= 0; i--)
|
||||
for (i--; i >= 0; i--) {
|
||||
__team_option_inst_del_option(team, dst_opts[i]);
|
||||
list_del(&dst_opts[i]->list);
|
||||
}
|
||||
|
||||
i = option_count;
|
||||
alloc_rollback:
|
||||
|
@ -1242,6 +1242,7 @@ static const struct usb_device_id products[] = {
|
||||
{QMI_FIXED_INTF(0x19d2, 0x0168, 4)},
|
||||
{QMI_FIXED_INTF(0x19d2, 0x0176, 3)},
|
||||
{QMI_FIXED_INTF(0x19d2, 0x0178, 3)},
|
||||
{QMI_FIXED_INTF(0x19d2, 0x0189, 4)}, /* ZTE MF290 */
|
||||
{QMI_FIXED_INTF(0x19d2, 0x0191, 4)}, /* ZTE EuFi890 */
|
||||
{QMI_FIXED_INTF(0x19d2, 0x0199, 1)}, /* ZTE MF820S */
|
||||
{QMI_FIXED_INTF(0x19d2, 0x0200, 1)},
|
||||
|
@ -2660,8 +2660,8 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
||||
addr[4] = idx;
|
||||
memcpy(data->addresses[0].addr, addr, ETH_ALEN);
|
||||
/* Why need here second address ? */
|
||||
data->addresses[1].addr[0] |= 0x40;
|
||||
memcpy(data->addresses[1].addr, addr, ETH_ALEN);
|
||||
data->addresses[1].addr[0] |= 0x40;
|
||||
hw->wiphy->n_addresses = 2;
|
||||
hw->wiphy->addresses = data->addresses;
|
||||
/* possible address clash is checked at hash table insertion */
|
||||
@ -3330,6 +3330,7 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
||||
if (info->attrs[HWSIM_ATTR_PERM_ADDR]) {
|
||||
if (!is_valid_ether_addr(
|
||||
nla_data(info->attrs[HWSIM_ATTR_PERM_ADDR]))) {
|
||||
kfree(hwname);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -2647,6 +2647,8 @@ enum parport_pc_pci_cards {
|
||||
netmos_9865,
|
||||
quatech_sppxp100,
|
||||
wch_ch382l,
|
||||
brainboxes_uc146,
|
||||
brainboxes_px203,
|
||||
};
|
||||
|
||||
|
||||
@ -2710,6 +2712,8 @@ static struct parport_pc_pci {
|
||||
/* netmos_9865 */ { 1, { { 0, -1 }, } },
|
||||
/* quatech_sppxp100 */ { 1, { { 0, 1 }, } },
|
||||
/* wch_ch382l */ { 1, { { 2, -1 }, } },
|
||||
/* brainboxes_uc146 */ { 1, { { 3, -1 }, } },
|
||||
/* brainboxes_px203 */ { 1, { { 0, -1 }, } },
|
||||
};
|
||||
|
||||
static const struct pci_device_id parport_pc_pci_tbl[] = {
|
||||
@ -2801,6 +2805,23 @@ static const struct pci_device_id parport_pc_pci_tbl[] = {
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, quatech_sppxp100 },
|
||||
/* WCH CH382L PCI-E single parallel port card */
|
||||
{ 0x1c00, 0x3050, 0x1c00, 0x3050, 0, 0, wch_ch382l },
|
||||
/* Brainboxes IX-500/550 */
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x402a,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_pcie_pport },
|
||||
/* Brainboxes UC-146/UC-157 */
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0be1,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, brainboxes_uc146 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0be2,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, brainboxes_uc146 },
|
||||
/* Brainboxes PX-146/PX-257 */
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x401c,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_pcie_pport },
|
||||
/* Brainboxes PX-203 */
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x4007,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, brainboxes_px203 },
|
||||
/* Brainboxes PX-475 */
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x401f,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_pcie_pport },
|
||||
{ 0, } /* terminate list */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, parport_pc_pci_tbl);
|
||||
|
@ -111,7 +111,7 @@ static const struct telemetry_core_ops telm_defpltops = {
|
||||
/**
|
||||
* telemetry_update_events() - Update telemetry Configuration
|
||||
* @pss_evtconfig: PSS related config. No change if num_evts = 0.
|
||||
* @pss_evtconfig: IOSS related config. No change if num_evts = 0.
|
||||
* @ioss_evtconfig: IOSS related config. No change if num_evts = 0.
|
||||
*
|
||||
* This API updates the IOSS & PSS Telemetry configuration. Old config
|
||||
* is overwritten. Call telemetry_reset_events when logging is over
|
||||
@ -185,7 +185,7 @@ EXPORT_SYMBOL_GPL(telemetry_reset_events);
|
||||
/**
|
||||
* telemetry_get_eventconfig() - Returns the pss and ioss events enabled
|
||||
* @pss_evtconfig: Pointer to PSS related configuration.
|
||||
* @pss_evtconfig: Pointer to IOSS related configuration.
|
||||
* @ioss_evtconfig: Pointer to IOSS related configuration.
|
||||
* @pss_len: Number of u32 elements allocated for pss_evtconfig array
|
||||
* @ioss_len: Number of u32 elements allocated for ioss_evtconfig array
|
||||
*
|
||||
|
@ -2687,6 +2687,7 @@ init_wrb_hndl_failed:
|
||||
kfree(pwrb_context->pwrb_handle_base);
|
||||
kfree(pwrb_context->pwrb_handle_basestd);
|
||||
}
|
||||
kfree(phwi_ctxt->be_wrbq);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -179,6 +179,7 @@ static int __init early_omap8250_setup(struct earlycon_device *device,
|
||||
OF_EARLYCON_DECLARE(omap8250, "ti,omap2-uart", early_omap8250_setup);
|
||||
OF_EARLYCON_DECLARE(omap8250, "ti,omap3-uart", early_omap8250_setup);
|
||||
OF_EARLYCON_DECLARE(omap8250, "ti,omap4-uart", early_omap8250_setup);
|
||||
OF_EARLYCON_DECLARE(omap8250, "ti,am654-uart", early_omap8250_setup);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -699,6 +699,18 @@ static bool sc16is7xx_port_irq(struct sc16is7xx_port *s, int portno)
|
||||
case SC16IS7XX_IIR_RTOI_SRC:
|
||||
case SC16IS7XX_IIR_XOFFI_SRC:
|
||||
rxlen = sc16is7xx_port_read(port, SC16IS7XX_RXLVL_REG);
|
||||
|
||||
/*
|
||||
* There is a silicon bug that makes the chip report a
|
||||
* time-out interrupt but no data in the FIFO. This is
|
||||
* described in errata section 18.1.4.
|
||||
*
|
||||
* When this happens, read one byte from the FIFO to
|
||||
* clear the interrupt.
|
||||
*/
|
||||
if (iir == SC16IS7XX_IIR_RTOI_SRC && !rxlen)
|
||||
rxlen = 1;
|
||||
|
||||
if (rxlen)
|
||||
sc16is7xx_handle_rx(port, rxlen, iir);
|
||||
break;
|
||||
|
@ -1006,9 +1006,9 @@ static const struct usb_device_id id_table_combined[] = {
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_USG_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_NGT_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_NGW_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_D9AC_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_D9AD_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_D9AE_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_UID_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_USA_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_NGX_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, ACTISENSE_D9AF_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, CHETCO_SEAGAUGE_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, CHETCO_SEASWITCH_PID) },
|
||||
|
@ -1561,9 +1561,9 @@
|
||||
#define ACTISENSE_USG_PID 0xD9A9 /* USG USB Serial Adapter */
|
||||
#define ACTISENSE_NGT_PID 0xD9AA /* NGT NMEA2000 Interface */
|
||||
#define ACTISENSE_NGW_PID 0xD9AB /* NGW NMEA2000 Gateway */
|
||||
#define ACTISENSE_D9AC_PID 0xD9AC /* Actisense Reserved */
|
||||
#define ACTISENSE_D9AD_PID 0xD9AD /* Actisense Reserved */
|
||||
#define ACTISENSE_D9AE_PID 0xD9AE /* Actisense Reserved */
|
||||
#define ACTISENSE_UID_PID 0xD9AC /* USB Isolating Device */
|
||||
#define ACTISENSE_USA_PID 0xD9AD /* USB to Serial Adapter */
|
||||
#define ACTISENSE_NGX_PID 0xD9AE /* NGX NMEA2000 Gateway */
|
||||
#define ACTISENSE_D9AF_PID 0xD9AF /* Actisense Reserved */
|
||||
#define CHETCO_SEAGAUGE_PID 0xA548 /* SeaGauge USB Adapter */
|
||||
#define CHETCO_SEASWITCH_PID 0xA549 /* SeaSwitch USB Adapter */
|
||||
|
@ -275,6 +275,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define QUECTEL_PRODUCT_RM500Q 0x0800
|
||||
#define QUECTEL_PRODUCT_RM520N 0x0801
|
||||
#define QUECTEL_PRODUCT_EC200U 0x0901
|
||||
#define QUECTEL_PRODUCT_EG912Y 0x6001
|
||||
#define QUECTEL_PRODUCT_EC200S_CN 0x6002
|
||||
#define QUECTEL_PRODUCT_EC200A 0x6005
|
||||
#define QUECTEL_PRODUCT_EM061K_LWW 0x6008
|
||||
@ -1235,6 +1236,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0700, 0xff), /* BG95 */
|
||||
.driver_info = RSVD(3) | ZLP },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
|
||||
.driver_info = ZLP },
|
||||
@ -1247,6 +1249,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG912Y, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
|
||||
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
|
||||
@ -2244,6 +2247,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
|
||||
{ USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */
|
||||
.driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0da, 0xff), /* Foxconn T99W265 MBIM variant */
|
||||
.driver_info = RSVD(3) | RSVD(5) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */
|
||||
.driver_info = RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0ee, 0xff), /* Foxconn T99W368 MBIM */
|
||||
|
@ -2043,21 +2043,26 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start,
|
||||
if ((start | len) & (bdev_logical_block_size(bdev) - 1))
|
||||
return -EINVAL;
|
||||
|
||||
/* Invalidate the page cache, including dirty pages. */
|
||||
/*
|
||||
* Invalidate the page cache, including dirty pages, for valid
|
||||
* de-allocate mode calls to fallocate().
|
||||
*/
|
||||
mapping = bdev->bd_inode->i_mapping;
|
||||
truncate_inode_pages_range(mapping, start, end);
|
||||
|
||||
switch (mode) {
|
||||
case FALLOC_FL_ZERO_RANGE:
|
||||
case FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE:
|
||||
truncate_inode_pages_range(mapping, start, end);
|
||||
error = blkdev_issue_zeroout(bdev, start >> 9, len >> 9,
|
||||
GFP_KERNEL, BLKDEV_ZERO_NOUNMAP);
|
||||
break;
|
||||
case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE:
|
||||
truncate_inode_pages_range(mapping, start, end);
|
||||
error = blkdev_issue_zeroout(bdev, start >> 9, len >> 9,
|
||||
GFP_KERNEL, BLKDEV_ZERO_NOFALLBACK);
|
||||
break;
|
||||
case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE | FALLOC_FL_NO_HIDE_STALE:
|
||||
truncate_inode_pages_range(mapping, start, end);
|
||||
error = blkdev_issue_discard(bdev, start >> 9, len >> 9,
|
||||
GFP_KERNEL, 0);
|
||||
break;
|
||||
|
@ -3207,6 +3207,10 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
start = max(start, rounddown(ac->ac_o_ex.fe_logical,
|
||||
(ext4_lblk_t)EXT4_BLOCKS_PER_GROUP(ac->ac_sb)));
|
||||
|
||||
/* avoid unnecessary preallocation that may trigger assertions */
|
||||
if (start + size > EXT_MAX_BLOCKS)
|
||||
size = EXT_MAX_BLOCKS - start;
|
||||
|
||||
/* don't cover already allocated blocks in selected range */
|
||||
if (ar->pleft && start <= ar->lleft) {
|
||||
size -= ar->lleft + 1 - start;
|
||||
|
@ -513,15 +513,38 @@ int nilfs_sufile_mark_dirty(struct inode *sufile, __u64 segnum)
|
||||
|
||||
down_write(&NILFS_MDT(sufile)->mi_sem);
|
||||
ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &bh);
|
||||
if (!ret) {
|
||||
mark_buffer_dirty(bh);
|
||||
nilfs_mdt_mark_dirty(sufile);
|
||||
kaddr = kmap_atomic(bh->b_page);
|
||||
su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr);
|
||||
nilfs_segment_usage_set_dirty(su);
|
||||
if (ret)
|
||||
goto out_sem;
|
||||
|
||||
kaddr = kmap_atomic(bh->b_page);
|
||||
su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr);
|
||||
if (unlikely(nilfs_segment_usage_error(su))) {
|
||||
struct the_nilfs *nilfs = sufile->i_sb->s_fs_info;
|
||||
|
||||
kunmap_atomic(kaddr);
|
||||
brelse(bh);
|
||||
if (nilfs_segment_is_active(nilfs, segnum)) {
|
||||
nilfs_error(sufile->i_sb,
|
||||
"active segment %llu is erroneous",
|
||||
(unsigned long long)segnum);
|
||||
} else {
|
||||
/*
|
||||
* Segments marked erroneous are never allocated by
|
||||
* nilfs_sufile_alloc(); only active segments, ie,
|
||||
* the segments indexed by ns_segnum or ns_nextnum,
|
||||
* can be erroneous here.
|
||||
*/
|
||||
WARN_ON_ONCE(1);
|
||||
}
|
||||
ret = -EIO;
|
||||
} else {
|
||||
nilfs_segment_usage_set_dirty(su);
|
||||
kunmap_atomic(kaddr);
|
||||
mark_buffer_dirty(bh);
|
||||
nilfs_mdt_mark_dirty(sufile);
|
||||
brelse(bh);
|
||||
}
|
||||
out_sem:
|
||||
up_write(&NILFS_MDT(sufile)->mi_sem);
|
||||
return ret;
|
||||
}
|
||||
@ -548,9 +571,14 @@ int nilfs_sufile_set_segment_usage(struct inode *sufile, __u64 segnum,
|
||||
|
||||
kaddr = kmap_atomic(bh->b_page);
|
||||
su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr);
|
||||
WARN_ON(nilfs_segment_usage_error(su));
|
||||
if (modtime)
|
||||
if (modtime) {
|
||||
/*
|
||||
* Check segusage error and set su_lastmod only when updating
|
||||
* this entry with a valid timestamp, not for cancellation.
|
||||
*/
|
||||
WARN_ON_ONCE(nilfs_segment_usage_error(su));
|
||||
su->su_lastmod = cpu_to_le64(modtime);
|
||||
}
|
||||
su->su_nblocks = cpu_to_le32(nblocks);
|
||||
kunmap_atomic(kaddr);
|
||||
|
||||
|
@ -697,7 +697,11 @@ int init_nilfs(struct the_nilfs *nilfs, struct super_block *sb, char *data)
|
||||
goto failed_sbh;
|
||||
}
|
||||
nilfs_release_super_block(nilfs);
|
||||
sb_set_blocksize(sb, blocksize);
|
||||
if (!sb_set_blocksize(sb, blocksize)) {
|
||||
nilfs_msg(sb, KERN_ERR, "bad blocksize %d", blocksize);
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = nilfs_load_super_block(nilfs, sb, blocksize, &sbp);
|
||||
if (err)
|
||||
|
@ -54,6 +54,22 @@ int fsverity_verify_signature(const struct fsverity_info *vi,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fsverity_keyring->keys.nr_leaves_on_tree == 0) {
|
||||
/*
|
||||
* The ".fs-verity" keyring is empty, due to builtin signatures
|
||||
* being supported by the kernel but not actually being used.
|
||||
* In this case, verify_pkcs7_signature() would always return an
|
||||
* error, usually ENOKEY. It could also be EBADMSG if the
|
||||
* PKCS#7 is malformed, but that isn't very important to
|
||||
* distinguish. So, just skip to ENOKEY to avoid the attack
|
||||
* surface of the PKCS#7 parser, which would otherwise be
|
||||
* reachable by any task able to execute FS_IOC_ENABLE_VERITY.
|
||||
*/
|
||||
fsverity_err(inode,
|
||||
"fs-verity keyring is empty, rejecting signed file!");
|
||||
return -ENOKEY;
|
||||
}
|
||||
|
||||
d = kzalloc(sizeof(*d) + hash_alg->digest_size, GFP_KERNEL);
|
||||
if (!d)
|
||||
return -ENOMEM;
|
||||
|
@ -47,7 +47,7 @@ static __always_inline int queued_spin_is_locked(struct qspinlock *lock)
|
||||
*/
|
||||
static __always_inline int queued_spin_value_unlocked(struct qspinlock lock)
|
||||
{
|
||||
return !atomic_read(&lock.val);
|
||||
return !lock.val.counter;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -272,7 +272,7 @@ struct bpf_prog_array {
|
||||
struct bpf_prog *progs[0];
|
||||
};
|
||||
|
||||
struct bpf_prog_array __rcu *bpf_prog_array_alloc(u32 prog_cnt, gfp_t flags);
|
||||
struct bpf_prog_array *bpf_prog_array_alloc(u32 prog_cnt, gfp_t flags);
|
||||
void bpf_prog_array_free(struct bpf_prog_array __rcu *progs);
|
||||
|
||||
void bpf_prog_array_delete_safe(struct bpf_prog_array __rcu *progs,
|
||||
|
@ -109,7 +109,7 @@ extern void groups_sort(struct group_info *);
|
||||
* same context as task->real_cred.
|
||||
*/
|
||||
struct cred {
|
||||
atomic_t usage;
|
||||
atomic_long_t usage;
|
||||
#ifdef CONFIG_DEBUG_CREDENTIALS
|
||||
atomic_t subscribers; /* number of processes subscribed */
|
||||
void *put_addr;
|
||||
@ -226,7 +226,7 @@ static inline bool cap_ambient_invariant_ok(const struct cred *cred)
|
||||
*/
|
||||
static inline struct cred *get_new_cred(struct cred *cred)
|
||||
{
|
||||
atomic_inc(&cred->usage);
|
||||
atomic_long_inc(&cred->usage);
|
||||
return cred;
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ static inline void put_cred(const struct cred *_cred)
|
||||
|
||||
if (cred) {
|
||||
validate_creds(cred);
|
||||
if (atomic_dec_and_test(&(cred)->usage))
|
||||
if (atomic_long_dec_and_test(&(cred)->usage))
|
||||
__put_cred(cred);
|
||||
}
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ struct util_est {
|
||||
unsigned int enqueued;
|
||||
unsigned int ewma;
|
||||
#define UTIL_EST_WEIGHT_SHIFT 2
|
||||
};
|
||||
} __attribute__((__aligned__(sizeof(u64))));
|
||||
|
||||
/*
|
||||
* The load_avg/util_avg accumulates an infinite geometric series
|
||||
@ -452,7 +452,7 @@ struct sched_avg {
|
||||
unsigned long load_avg;
|
||||
unsigned long util_avg;
|
||||
struct util_est util_est;
|
||||
};
|
||||
} ____cacheline_aligned;
|
||||
|
||||
struct sched_statistics {
|
||||
#ifdef CONFIG_SCHEDSTATS
|
||||
@ -522,7 +522,7 @@ struct sched_entity {
|
||||
* Put into separate cache line so it does not
|
||||
* collide with read-mostly values above.
|
||||
*/
|
||||
struct sched_avg avg ____cacheline_aligned_in_smp;
|
||||
struct sched_avg avg;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -11,9 +11,12 @@
|
||||
/**
|
||||
* struct genl_multicast_group - generic netlink multicast group
|
||||
* @name: name of the multicast group, names are per-family
|
||||
* @cap_sys_admin: whether %CAP_SYS_ADMIN is required for binding
|
||||
*/
|
||||
struct genl_multicast_group {
|
||||
char name[GENL_NAMSIZ];
|
||||
u8 flags;
|
||||
u8 cap_sys_admin:1;
|
||||
};
|
||||
|
||||
struct genl_ops;
|
||||
|
@ -95,7 +95,7 @@ static int compute_effective_progs(struct cgroup *cgrp,
|
||||
enum bpf_attach_type type,
|
||||
struct bpf_prog_array __rcu **array)
|
||||
{
|
||||
struct bpf_prog_array __rcu *progs;
|
||||
struct bpf_prog_array *progs;
|
||||
struct bpf_prog_list *pl;
|
||||
struct cgroup *p = cgrp;
|
||||
int cnt = 0;
|
||||
@ -120,13 +120,12 @@ static int compute_effective_progs(struct cgroup *cgrp,
|
||||
&p->bpf.progs[type], node) {
|
||||
if (!pl->prog)
|
||||
continue;
|
||||
rcu_dereference_protected(progs, 1)->
|
||||
progs[cnt++] = pl->prog;
|
||||
progs->progs[cnt++] = pl->prog;
|
||||
}
|
||||
p = cgroup_parent(p);
|
||||
} while (p);
|
||||
|
||||
*array = progs;
|
||||
rcu_assign_pointer(*array, progs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1544,7 +1544,7 @@ static struct {
|
||||
.null_prog = NULL,
|
||||
};
|
||||
|
||||
struct bpf_prog_array __rcu *bpf_prog_array_alloc(u32 prog_cnt, gfp_t flags)
|
||||
struct bpf_prog_array *bpf_prog_array_alloc(u32 prog_cnt, gfp_t flags)
|
||||
{
|
||||
if (prog_cnt)
|
||||
return kzalloc(sizeof(struct bpf_prog_array) +
|
||||
|
@ -101,17 +101,17 @@ static void put_cred_rcu(struct rcu_head *rcu)
|
||||
|
||||
#ifdef CONFIG_DEBUG_CREDENTIALS
|
||||
if (cred->magic != CRED_MAGIC_DEAD ||
|
||||
atomic_read(&cred->usage) != 0 ||
|
||||
atomic_long_read(&cred->usage) != 0 ||
|
||||
read_cred_subscribers(cred) != 0)
|
||||
panic("CRED: put_cred_rcu() sees %p with"
|
||||
" mag %x, put %p, usage %d, subscr %d\n",
|
||||
" mag %x, put %p, usage %ld, subscr %d\n",
|
||||
cred, cred->magic, cred->put_addr,
|
||||
atomic_read(&cred->usage),
|
||||
atomic_long_read(&cred->usage),
|
||||
read_cred_subscribers(cred));
|
||||
#else
|
||||
if (atomic_read(&cred->usage) != 0)
|
||||
panic("CRED: put_cred_rcu() sees %p with usage %d\n",
|
||||
cred, atomic_read(&cred->usage));
|
||||
if (atomic_long_read(&cred->usage) != 0)
|
||||
panic("CRED: put_cred_rcu() sees %p with usage %ld\n",
|
||||
cred, atomic_long_read(&cred->usage));
|
||||
#endif
|
||||
|
||||
security_cred_free(cred);
|
||||
@ -134,11 +134,11 @@ static void put_cred_rcu(struct rcu_head *rcu)
|
||||
*/
|
||||
void __put_cred(struct cred *cred)
|
||||
{
|
||||
kdebug("__put_cred(%p{%d,%d})", cred,
|
||||
atomic_read(&cred->usage),
|
||||
kdebug("__put_cred(%p{%ld,%d})", cred,
|
||||
atomic_long_read(&cred->usage),
|
||||
read_cred_subscribers(cred));
|
||||
|
||||
BUG_ON(atomic_read(&cred->usage) != 0);
|
||||
BUG_ON(atomic_long_read(&cred->usage) != 0);
|
||||
#ifdef CONFIG_DEBUG_CREDENTIALS
|
||||
BUG_ON(read_cred_subscribers(cred) != 0);
|
||||
cred->magic = CRED_MAGIC_DEAD;
|
||||
@ -161,8 +161,8 @@ void exit_creds(struct task_struct *tsk)
|
||||
{
|
||||
struct cred *cred;
|
||||
|
||||
kdebug("exit_creds(%u,%p,%p,{%d,%d})", tsk->pid, tsk->real_cred, tsk->cred,
|
||||
atomic_read(&tsk->cred->usage),
|
||||
kdebug("exit_creds(%u,%p,%p,{%ld,%d})", tsk->pid, tsk->real_cred, tsk->cred,
|
||||
atomic_long_read(&tsk->cred->usage),
|
||||
read_cred_subscribers(tsk->cred));
|
||||
|
||||
cred = (struct cred *) tsk->real_cred;
|
||||
@ -197,7 +197,7 @@ const struct cred *get_task_cred(struct task_struct *task)
|
||||
do {
|
||||
cred = __task_cred((task));
|
||||
BUG_ON(!cred);
|
||||
} while (!atomic_inc_not_zero(&((struct cred *)cred)->usage));
|
||||
} while (!atomic_long_inc_not_zero(&((struct cred *)cred)->usage));
|
||||
|
||||
rcu_read_unlock();
|
||||
return cred;
|
||||
@ -215,7 +215,7 @@ struct cred *cred_alloc_blank(void)
|
||||
if (!new)
|
||||
return NULL;
|
||||
|
||||
atomic_set(&new->usage, 1);
|
||||
atomic_long_set(&new->usage, 1);
|
||||
#ifdef CONFIG_DEBUG_CREDENTIALS
|
||||
new->magic = CRED_MAGIC;
|
||||
#endif
|
||||
@ -262,7 +262,7 @@ struct cred *prepare_creds(void)
|
||||
memcpy(new, old, sizeof(struct cred));
|
||||
|
||||
new->non_rcu = 0;
|
||||
atomic_set(&new->usage, 1);
|
||||
atomic_long_set(&new->usage, 1);
|
||||
set_cred_subscribers(new, 0);
|
||||
get_group_info(new->group_info);
|
||||
get_uid(new->user);
|
||||
@ -338,8 +338,8 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags)
|
||||
p->real_cred = get_cred(p->cred);
|
||||
get_cred(p->cred);
|
||||
alter_cred_subscribers(p->cred, 2);
|
||||
kdebug("share_creds(%p{%d,%d})",
|
||||
p->cred, atomic_read(&p->cred->usage),
|
||||
kdebug("share_creds(%p{%ld,%d})",
|
||||
p->cred, atomic_long_read(&p->cred->usage),
|
||||
read_cred_subscribers(p->cred));
|
||||
atomic_inc(&p->cred->user->processes);
|
||||
return 0;
|
||||
@ -429,8 +429,8 @@ int commit_creds(struct cred *new)
|
||||
struct task_struct *task = current;
|
||||
const struct cred *old = task->real_cred;
|
||||
|
||||
kdebug("commit_creds(%p{%d,%d})", new,
|
||||
atomic_read(&new->usage),
|
||||
kdebug("commit_creds(%p{%ld,%d})", new,
|
||||
atomic_long_read(&new->usage),
|
||||
read_cred_subscribers(new));
|
||||
|
||||
BUG_ON(task->cred != old);
|
||||
@ -439,7 +439,7 @@ int commit_creds(struct cred *new)
|
||||
validate_creds(old);
|
||||
validate_creds(new);
|
||||
#endif
|
||||
BUG_ON(atomic_read(&new->usage) < 1);
|
||||
BUG_ON(atomic_long_read(&new->usage) < 1);
|
||||
|
||||
get_cred(new); /* we will require a ref for the subj creds too */
|
||||
|
||||
@ -512,14 +512,14 @@ EXPORT_SYMBOL(commit_creds);
|
||||
*/
|
||||
void abort_creds(struct cred *new)
|
||||
{
|
||||
kdebug("abort_creds(%p{%d,%d})", new,
|
||||
atomic_read(&new->usage),
|
||||
kdebug("abort_creds(%p{%ld,%d})", new,
|
||||
atomic_long_read(&new->usage),
|
||||
read_cred_subscribers(new));
|
||||
|
||||
#ifdef CONFIG_DEBUG_CREDENTIALS
|
||||
BUG_ON(read_cred_subscribers(new) != 0);
|
||||
#endif
|
||||
BUG_ON(atomic_read(&new->usage) < 1);
|
||||
BUG_ON(atomic_long_read(&new->usage) < 1);
|
||||
put_cred(new);
|
||||
}
|
||||
EXPORT_SYMBOL(abort_creds);
|
||||
@ -535,8 +535,8 @@ const struct cred *override_creds(const struct cred *new)
|
||||
{
|
||||
const struct cred *old = current->cred;
|
||||
|
||||
kdebug("override_creds(%p{%d,%d})", new,
|
||||
atomic_read(&new->usage),
|
||||
kdebug("override_creds(%p{%ld,%d})", new,
|
||||
atomic_long_read(&new->usage),
|
||||
read_cred_subscribers(new));
|
||||
|
||||
validate_creds(old);
|
||||
@ -558,8 +558,8 @@ const struct cred *override_creds(const struct cred *new)
|
||||
rcu_assign_pointer(current->cred, new);
|
||||
alter_cred_subscribers(old, -1);
|
||||
|
||||
kdebug("override_creds() = %p{%d,%d}", old,
|
||||
atomic_read(&old->usage),
|
||||
kdebug("override_creds() = %p{%ld,%d}", old,
|
||||
atomic_long_read(&old->usage),
|
||||
read_cred_subscribers(old));
|
||||
return old;
|
||||
}
|
||||
@ -576,8 +576,8 @@ void revert_creds(const struct cred *old)
|
||||
{
|
||||
const struct cred *override = current->cred;
|
||||
|
||||
kdebug("revert_creds(%p{%d,%d})", old,
|
||||
atomic_read(&old->usage),
|
||||
kdebug("revert_creds(%p{%ld,%d})", old,
|
||||
atomic_long_read(&old->usage),
|
||||
read_cred_subscribers(old));
|
||||
|
||||
validate_creds(old);
|
||||
@ -637,7 +637,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
|
||||
|
||||
*new = *old;
|
||||
new->non_rcu = 0;
|
||||
atomic_set(&new->usage, 1);
|
||||
atomic_long_set(&new->usage, 1);
|
||||
set_cred_subscribers(new, 0);
|
||||
get_uid(new->user);
|
||||
get_user_ns(new->user_ns);
|
||||
@ -760,8 +760,8 @@ static void dump_invalid_creds(const struct cred *cred, const char *label,
|
||||
cred == tsk->cred ? "[eff]" : "");
|
||||
printk(KERN_ERR "CRED: ->magic=%x, put_addr=%p\n",
|
||||
cred->magic, cred->put_addr);
|
||||
printk(KERN_ERR "CRED: ->usage=%d, subscr=%d\n",
|
||||
atomic_read(&cred->usage),
|
||||
printk(KERN_ERR "CRED: ->usage=%ld, subscr=%d\n",
|
||||
atomic_long_read(&cred->usage),
|
||||
read_cred_subscribers(cred));
|
||||
printk(KERN_ERR "CRED: ->*uid = { %d,%d,%d,%d }\n",
|
||||
from_kuid_munged(&init_user_ns, cred->uid),
|
||||
@ -833,9 +833,9 @@ EXPORT_SYMBOL(__validate_process_creds);
|
||||
*/
|
||||
void validate_creds_for_do_exit(struct task_struct *tsk)
|
||||
{
|
||||
kdebug("validate_creds_for_do_exit(%p,%p{%d,%d})",
|
||||
kdebug("validate_creds_for_do_exit(%p,%p{%ld,%d})",
|
||||
tsk->real_cred, tsk->cred,
|
||||
atomic_read(&tsk->cred->usage),
|
||||
atomic_long_read(&tsk->cred->usage),
|
||||
read_cred_subscribers(tsk->cred));
|
||||
|
||||
__validate_process_creds(tsk, __FILE__, __LINE__);
|
||||
|
@ -2471,7 +2471,7 @@ static int kprobe_blacklist_seq_show(struct seq_file *m, void *v)
|
||||
struct kprobe_blacklist_entry *ent =
|
||||
list_entry(v, struct kprobe_blacklist_entry, list);
|
||||
|
||||
seq_printf(m, "0x%p-0x%p\t%ps\n", (void *)ent->start_addr,
|
||||
seq_printf(m, "0x%px-0x%px\t%ps\n", (void *)ent->start_addr,
|
||||
(void *)ent->end_addr, (void *)ent->start_addr);
|
||||
return 0;
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ EXPORT_SYMBOL(warn_slowpath_null);
|
||||
*/
|
||||
__visible void __stack_chk_fail(void)
|
||||
{
|
||||
panic("stack-protector: Kernel stack is corrupted in: %p\n",
|
||||
panic("stack-protector: Kernel stack is corrupted in: %pB\n",
|
||||
__builtin_return_address(0));
|
||||
}
|
||||
EXPORT_SYMBOL(__stack_chk_fail);
|
||||
|
@ -3851,18 +3851,10 @@ util_est_dequeue(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep)
|
||||
if (!sched_feat(UTIL_EST))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Update root cfs_rq's estimated utilization
|
||||
*
|
||||
* If *p is the last task then the root cfs_rq's estimated utilization
|
||||
* of a CPU is 0 by definition.
|
||||
*/
|
||||
ue.enqueued = 0;
|
||||
if (cfs_rq->nr_running) {
|
||||
ue.enqueued = cfs_rq->avg.util_est.enqueued;
|
||||
ue.enqueued -= min_t(unsigned int, ue.enqueued,
|
||||
(_task_util_est(p) | UTIL_AVG_UNCHANGED));
|
||||
}
|
||||
/* Update root cfs_rq's estimated utilization */
|
||||
ue.enqueued = cfs_rq->avg.util_est.enqueued;
|
||||
ue.enqueued -= min_t(unsigned int, ue.enqueued,
|
||||
(_task_util_est(p) | UTIL_AVG_UNCHANGED));
|
||||
WRITE_ONCE(cfs_rq->avg.util_est.enqueued, ue.enqueued);
|
||||
|
||||
trace_sched_util_est_cpu(cpu_of(rq_of(cfs_rq)), cfs_rq);
|
||||
|
@ -135,9 +135,13 @@ static void __local_bh_enable(unsigned int cnt)
|
||||
{
|
||||
WARN_ON_ONCE(!irqs_disabled());
|
||||
|
||||
if (preempt_count() == cnt)
|
||||
trace_preempt_on(CALLER_ADDR0, get_lock_parent_ip());
|
||||
|
||||
if (softirq_count() == (cnt & SOFTIRQ_MASK))
|
||||
trace_softirqs_on(_RET_IP_);
|
||||
preempt_count_sub(cnt);
|
||||
|
||||
__preempt_count_sub(cnt);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -209,6 +209,7 @@ config PREEMPTIRQ_EVENTS
|
||||
bool "Enable trace events for preempt and irq disable/enable"
|
||||
select TRACE_IRQFLAGS
|
||||
depends on DEBUG_PREEMPT || !PROVE_LOCKING
|
||||
depends on TRACING
|
||||
default n
|
||||
help
|
||||
Enable tracing of disable and enable events for preemption and irqs.
|
||||
|
@ -1315,6 +1315,8 @@ static void rb_free_cpu_buffer(struct ring_buffer_per_cpu *cpu_buffer)
|
||||
free_buffer_page(bpage);
|
||||
}
|
||||
|
||||
free_page((unsigned long)cpu_buffer->free_page);
|
||||
|
||||
kfree(cpu_buffer);
|
||||
}
|
||||
|
||||
|
@ -2211,8 +2211,11 @@ void trace_buffered_event_enable(void)
|
||||
for_each_tracing_cpu(cpu) {
|
||||
page = alloc_pages_node(cpu_to_node(cpu),
|
||||
GFP_KERNEL | __GFP_NORETRY, 0);
|
||||
if (!page)
|
||||
goto failed;
|
||||
/* This is just an optimization and can handle failures */
|
||||
if (!page) {
|
||||
pr_err("Failed to allocate event buffer\n");
|
||||
break;
|
||||
}
|
||||
|
||||
event = page_address(page);
|
||||
memset(event, 0, sizeof(*event));
|
||||
@ -2226,10 +2229,6 @@ void trace_buffered_event_enable(void)
|
||||
WARN_ON_ONCE(1);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
return;
|
||||
failed:
|
||||
trace_buffered_event_disable();
|
||||
}
|
||||
|
||||
static void enable_trace_buffered_event(void *data)
|
||||
@ -2264,11 +2263,9 @@ void trace_buffered_event_disable(void)
|
||||
if (--trace_buffered_event_ref)
|
||||
return;
|
||||
|
||||
preempt_disable();
|
||||
/* For each CPU, set the buffer as used. */
|
||||
smp_call_function_many(tracing_buffer_mask,
|
||||
disable_trace_buffered_event, NULL, 1);
|
||||
preempt_enable();
|
||||
on_each_cpu_mask(tracing_buffer_mask, disable_trace_buffered_event,
|
||||
NULL, true);
|
||||
|
||||
/* Wait for all current users to finish */
|
||||
synchronize_rcu();
|
||||
@ -2277,17 +2274,19 @@ void trace_buffered_event_disable(void)
|
||||
free_page((unsigned long)per_cpu(trace_buffered_event, cpu));
|
||||
per_cpu(trace_buffered_event, cpu) = NULL;
|
||||
}
|
||||
/*
|
||||
* Make sure trace_buffered_event is NULL before clearing
|
||||
* trace_buffered_event_cnt.
|
||||
*/
|
||||
smp_wmb();
|
||||
|
||||
preempt_disable();
|
||||
/* Do the work on each cpu */
|
||||
smp_call_function_many(tracing_buffer_mask,
|
||||
enable_trace_buffered_event, NULL, 1);
|
||||
preempt_enable();
|
||||
/*
|
||||
* Wait for all CPUs that potentially started checking if they can use
|
||||
* their event buffer only after the previous synchronize_rcu() call and
|
||||
* they still read a valid pointer from trace_buffered_event. It must be
|
||||
* ensured they don't see cleared trace_buffered_event_cnt else they
|
||||
* could wrongly decide to use the pointed-to buffer which is now freed.
|
||||
*/
|
||||
synchronize_rcu();
|
||||
|
||||
/* For each CPU, relinquish the buffer */
|
||||
on_each_cpu_mask(tracing_buffer_mask, enable_trace_buffered_event, NULL,
|
||||
true);
|
||||
}
|
||||
|
||||
static struct ring_buffer *temp_buffer;
|
||||
@ -5261,8 +5260,7 @@ static int __tracing_resize_ring_buffer(struct trace_array *tr,
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_TRACER_MAX_TRACE
|
||||
if (!(tr->flags & TRACE_ARRAY_FL_GLOBAL) ||
|
||||
!tr->current_trace->use_max_tr)
|
||||
if (!tr->current_trace->use_max_tr)
|
||||
goto out;
|
||||
|
||||
ret = ring_buffer_resize(tr->max_buffer.buffer, size, cpu);
|
||||
|
@ -611,7 +611,7 @@ static int probes_seq_show(struct seq_file *m, void *v)
|
||||
|
||||
/* Don't print "0x (null)" when offset is 0 */
|
||||
if (tu->offset) {
|
||||
seq_printf(m, "0x%px", (void *)tu->offset);
|
||||
seq_printf(m, "0x%0*lx", (int)(sizeof(void *) * 2), tu->offset);
|
||||
} else {
|
||||
switch (sizeof(void *)) {
|
||||
case 4:
|
||||
|
@ -190,7 +190,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
|
||||
if (file)
|
||||
pr_crit("kernel BUG at %s:%u!\n", file, line);
|
||||
else
|
||||
pr_crit("Kernel BUG at %p [verbose debug info unavailable]\n",
|
||||
pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n",
|
||||
(void *)bugaddr);
|
||||
|
||||
return BUG_TRAP_TYPE_BUG;
|
||||
|
@ -1565,7 +1565,7 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
|
||||
#ifdef CONFIG_COMMON_CLK
|
||||
return string(buf, end, __clk_get_name(clk), spec);
|
||||
#else
|
||||
return special_hex_number(buf, end, (unsigned long)clk, sizeof(unsigned long));
|
||||
return ptr_to_id(buf, end, clk, spec);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -243,6 +243,8 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt,
|
||||
uint16_t *nwname = va_arg(ap, uint16_t *);
|
||||
char ***wnames = va_arg(ap, char ***);
|
||||
|
||||
*wnames = NULL;
|
||||
|
||||
errcode = p9pdu_readf(pdu, proto_version,
|
||||
"w", nwname);
|
||||
if (!errcode) {
|
||||
@ -251,6 +253,8 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt,
|
||||
GFP_NOFS);
|
||||
if (!*wnames)
|
||||
errcode = -ENOMEM;
|
||||
else
|
||||
(*wnames)[0] = NULL;
|
||||
}
|
||||
|
||||
if (!errcode) {
|
||||
@ -262,8 +266,10 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt,
|
||||
proto_version,
|
||||
"s",
|
||||
&(*wnames)[i]);
|
||||
if (errcode)
|
||||
if (errcode) {
|
||||
(*wnames)[i] = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,11 +277,14 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt,
|
||||
if (*wnames) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < *nwname; i++)
|
||||
for (i = 0; i < *nwname; i++) {
|
||||
if (!(*wnames)[i])
|
||||
break;
|
||||
kfree((*wnames)[i]);
|
||||
}
|
||||
kfree(*wnames);
|
||||
*wnames = NULL;
|
||||
}
|
||||
kfree(*wnames);
|
||||
*wnames = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1810,15 +1810,14 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
|
||||
break;
|
||||
}
|
||||
case TIOCINQ: {
|
||||
/*
|
||||
* These two are safe on a single CPU system as only
|
||||
* user tasks fiddle here
|
||||
*/
|
||||
struct sk_buff *skb = skb_peek(&sk->sk_receive_queue);
|
||||
struct sk_buff *skb;
|
||||
long amount = 0;
|
||||
|
||||
spin_lock_irq(&sk->sk_receive_queue.lock);
|
||||
skb = skb_peek(&sk->sk_receive_queue);
|
||||
if (skb)
|
||||
amount = skb->len - sizeof(struct ddpehdr);
|
||||
spin_unlock_irq(&sk->sk_receive_queue.lock);
|
||||
rc = put_user(amount, (int __user *)argp);
|
||||
break;
|
||||
}
|
||||
|
@ -71,14 +71,17 @@ static int do_vcc_ioctl(struct socket *sock, unsigned int cmd,
|
||||
case SIOCINQ:
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
int amount;
|
||||
|
||||
if (sock->state != SS_CONNECTED) {
|
||||
error = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
spin_lock_irq(&sk->sk_receive_queue.lock);
|
||||
skb = skb_peek(&sk->sk_receive_queue);
|
||||
error = put_user(skb ? skb->len : 0,
|
||||
(int __user *)argp) ? -EFAULT : 0;
|
||||
amount = skb ? skb->len : 0;
|
||||
spin_unlock_irq(&sk->sk_receive_queue.lock);
|
||||
error = put_user(amount, (int __user *)argp) ? -EFAULT : 0;
|
||||
goto done;
|
||||
}
|
||||
case SIOCGSTAMP: /* borrowed from IP */
|
||||
|
@ -1471,7 +1471,8 @@ static void hci_cs_inquiry(struct hci_dev *hdev, __u8 status)
|
||||
return;
|
||||
}
|
||||
|
||||
set_bit(HCI_INQUIRY, &hdev->flags);
|
||||
if (hci_sent_cmd_data(hdev, HCI_OP_INQUIRY))
|
||||
set_bit(HCI_INQUIRY, &hdev->flags);
|
||||
}
|
||||
|
||||
static void hci_cs_create_conn(struct hci_dev *hdev, __u8 status)
|
||||
|
@ -122,7 +122,7 @@ out:
|
||||
}
|
||||
|
||||
static const struct genl_multicast_group dropmon_mcgrps[] = {
|
||||
{ .name = "events", },
|
||||
{ .name = "events", .cap_sys_admin = 1 },
|
||||
};
|
||||
|
||||
static void send_dm_alert(struct work_struct *work)
|
||||
@ -370,10 +370,12 @@ static const struct genl_ops dropmon_ops[] = {
|
||||
{
|
||||
.cmd = NET_DM_CMD_START,
|
||||
.doit = net_dm_cmd_trace,
|
||||
.flags = GENL_ADMIN_PERM,
|
||||
},
|
||||
{
|
||||
.cmd = NET_DM_CMD_STOP,
|
||||
.doit = net_dm_cmd_trace,
|
||||
.flags = GENL_ADMIN_PERM,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -82,6 +82,7 @@ void *ife_decode(struct sk_buff *skb, u16 *metalen)
|
||||
if (unlikely(!pskb_may_pull(skb, total_pull)))
|
||||
return NULL;
|
||||
|
||||
ifehdr = (struct ifeheadr *)(skb->data + skb->dev->hard_header_len);
|
||||
skb_set_mac_header(skb, total_pull);
|
||||
__skb_pull(skb, total_pull);
|
||||
*metalen = ifehdrln - IFE_METAHDRLEN;
|
||||
|
@ -3690,8 +3690,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
|
||||
* then we can probably ignore it.
|
||||
*/
|
||||
if (before(ack, prior_snd_una)) {
|
||||
u32 max_window;
|
||||
|
||||
/* do not accept ACK for bytes we never sent. */
|
||||
max_window = min_t(u64, tp->max_window, tp->bytes_acked);
|
||||
/* RFC 5961 5.2 [Blind Data Injection Attack].[Mitigation] */
|
||||
if (before(ack, prior_snd_una - tp->max_window)) {
|
||||
if (before(ack, prior_snd_una - max_window)) {
|
||||
if (!(flag & FLAG_NO_CHALLENGE_ACK))
|
||||
tcp_send_challenge_ack(sk, skb);
|
||||
return -1;
|
||||
|
@ -2871,7 +2871,13 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs)
|
||||
if (skb_still_in_host_queue(sk, skb))
|
||||
return -EBUSY;
|
||||
|
||||
start:
|
||||
if (before(TCP_SKB_CB(skb)->seq, tp->snd_una)) {
|
||||
if (unlikely(TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)) {
|
||||
TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_SYN;
|
||||
TCP_SKB_CB(skb)->seq++;
|
||||
goto start;
|
||||
}
|
||||
if (unlikely(before(TCP_SKB_CB(skb)->end_seq, tp->snd_una))) {
|
||||
WARN_ON_ONCE(1);
|
||||
return -EINVAL;
|
||||
|
@ -445,16 +445,6 @@ static void pppol2tp_put_sk(struct rcu_head *head)
|
||||
*/
|
||||
static void pppol2tp_session_close(struct l2tp_session *session)
|
||||
{
|
||||
struct pppol2tp_session *ps;
|
||||
|
||||
ps = l2tp_session_priv(session);
|
||||
mutex_lock(&ps->sk_lock);
|
||||
ps->__sk = rcu_dereference_protected(ps->sk,
|
||||
lockdep_is_held(&ps->sk_lock));
|
||||
RCU_INIT_POINTER(ps->sk, NULL);
|
||||
if (ps->__sk)
|
||||
call_rcu(&ps->rcu, pppol2tp_put_sk);
|
||||
mutex_unlock(&ps->sk_lock);
|
||||
}
|
||||
|
||||
/* Really kill the session socket. (Called from sock_put() if
|
||||
@ -497,15 +487,24 @@ static int pppol2tp_release(struct socket *sock)
|
||||
sock_orphan(sk);
|
||||
sock->sk = NULL;
|
||||
|
||||
/* If the socket is associated with a session,
|
||||
* l2tp_session_delete will call pppol2tp_session_close which
|
||||
* will drop the session's ref on the socket.
|
||||
*/
|
||||
session = pppol2tp_sock_to_session(sk);
|
||||
if (session) {
|
||||
struct pppol2tp_session *ps;
|
||||
|
||||
l2tp_session_delete(session);
|
||||
/* drop the ref obtained by pppol2tp_sock_to_session */
|
||||
sock_put(sk);
|
||||
|
||||
ps = l2tp_session_priv(session);
|
||||
mutex_lock(&ps->sk_lock);
|
||||
ps->__sk = rcu_dereference_protected(ps->sk,
|
||||
lockdep_is_held(&ps->sk_lock));
|
||||
RCU_INIT_POINTER(ps->sk, NULL);
|
||||
mutex_unlock(&ps->sk_lock);
|
||||
call_rcu(&ps->rcu, pppol2tp_put_sk);
|
||||
|
||||
/* Rely on the sock_put() call at the end of the function for
|
||||
* dropping the reference held by pppol2tp_sock_to_session().
|
||||
* The last reference will be dropped by pppol2tp_put_sk().
|
||||
*/
|
||||
}
|
||||
|
||||
release_sock(sk);
|
||||
@ -748,7 +747,8 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
|
||||
*/
|
||||
mutex_lock(&ps->sk_lock);
|
||||
if (rcu_dereference_protected(ps->sk,
|
||||
lockdep_is_held(&ps->sk_lock))) {
|
||||
lockdep_is_held(&ps->sk_lock)) ||
|
||||
ps->__sk) {
|
||||
mutex_unlock(&ps->sk_lock);
|
||||
error = -EEXIST;
|
||||
goto end;
|
||||
@ -816,7 +816,6 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
|
||||
|
||||
out_no_ppp:
|
||||
/* This is how we get the session context from the socket. */
|
||||
sock_hold(sk);
|
||||
sk->sk_user_data = session;
|
||||
rcu_assign_pointer(ps->sk, sk);
|
||||
mutex_unlock(&ps->sk_lock);
|
||||
|
@ -1025,8 +1025,8 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata,
|
||||
case WLAN_SP_MESH_PEERING_OPEN:
|
||||
if (!matches_local)
|
||||
event = OPN_RJCT;
|
||||
if (!mesh_plink_free_count(sdata) ||
|
||||
(sta->mesh->plid && sta->mesh->plid != plid))
|
||||
else if (!mesh_plink_free_count(sdata) ||
|
||||
(sta->mesh->plid && sta->mesh->plid != plid))
|
||||
event = OPN_IGNR;
|
||||
else
|
||||
event = OPN_ACPT;
|
||||
@ -1034,9 +1034,9 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata,
|
||||
case WLAN_SP_MESH_PEERING_CONFIRM:
|
||||
if (!matches_local)
|
||||
event = CNF_RJCT;
|
||||
if (!mesh_plink_free_count(sdata) ||
|
||||
sta->mesh->llid != llid ||
|
||||
(sta->mesh->plid && sta->mesh->plid != plid))
|
||||
else if (!mesh_plink_free_count(sdata) ||
|
||||
sta->mesh->llid != llid ||
|
||||
(sta->mesh->plid && sta->mesh->plid != plid))
|
||||
event = CNF_IGNR;
|
||||
else
|
||||
event = CNF_ACPT;
|
||||
|
@ -1001,7 +1001,6 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
netlink_lock_table();
|
||||
if (nlk->netlink_bind && groups) {
|
||||
int group;
|
||||
|
||||
@ -1013,13 +1012,14 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
|
||||
if (!err)
|
||||
continue;
|
||||
netlink_undo_bind(group, groups, sk);
|
||||
goto unlock;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
/* No need for barriers here as we return to user-space without
|
||||
* using any of the bound attributes.
|
||||
*/
|
||||
netlink_lock_table();
|
||||
if (!bound) {
|
||||
err = nladdr->nl_pid ?
|
||||
netlink_insert(sk, nladdr->nl_pid) :
|
||||
|
@ -959,11 +959,46 @@ static struct genl_family genl_ctrl __ro_after_init = {
|
||||
.netnsok = true,
|
||||
};
|
||||
|
||||
static int genl_bind(struct net *net, int group)
|
||||
{
|
||||
const struct genl_family *family;
|
||||
unsigned int id;
|
||||
int ret = 0;
|
||||
|
||||
genl_lock_all();
|
||||
|
||||
idr_for_each_entry(&genl_fam_idr, family, id) {
|
||||
const struct genl_multicast_group *grp;
|
||||
int i;
|
||||
|
||||
if (family->n_mcgrps == 0)
|
||||
continue;
|
||||
|
||||
i = group - family->mcgrp_offset;
|
||||
if (i < 0 || i >= family->n_mcgrps)
|
||||
continue;
|
||||
|
||||
grp = &family->mcgrps[i];
|
||||
if ((grp->flags & GENL_UNS_ADMIN_PERM) &&
|
||||
!ns_capable(net->user_ns, CAP_NET_ADMIN))
|
||||
ret = -EPERM;
|
||||
if (grp->cap_sys_admin &&
|
||||
!ns_capable(net->user_ns, CAP_SYS_ADMIN))
|
||||
ret = -EPERM;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
genl_unlock_all();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int __net_init genl_pernet_init(struct net *net)
|
||||
{
|
||||
struct netlink_kernel_cfg cfg = {
|
||||
.input = genl_rcv,
|
||||
.flags = NL_CFG_F_NONROOT_RECV,
|
||||
.bind = genl_bind,
|
||||
};
|
||||
|
||||
/* we'll bump the group number right afterwards */
|
||||
|
@ -157,6 +157,13 @@ static void nfc_llcp_socket_release(struct nfc_llcp_local *local, bool device,
|
||||
|
||||
struct nfc_llcp_local *nfc_llcp_local_get(struct nfc_llcp_local *local)
|
||||
{
|
||||
/* Since using nfc_llcp_local may result in usage of nfc_dev, whenever
|
||||
* we hold a reference to local, we also need to hold a reference to
|
||||
* the device to avoid UAF.
|
||||
*/
|
||||
if (!nfc_get_device(local->dev->idx))
|
||||
return NULL;
|
||||
|
||||
kref_get(&local->ref);
|
||||
|
||||
return local;
|
||||
@ -190,10 +197,18 @@ static void local_release(struct kref *ref)
|
||||
|
||||
int nfc_llcp_local_put(struct nfc_llcp_local *local)
|
||||
{
|
||||
struct nfc_dev *dev;
|
||||
int ret;
|
||||
|
||||
if (local == NULL)
|
||||
return 0;
|
||||
|
||||
return kref_put(&local->ref, local_release);
|
||||
dev = local->dev;
|
||||
|
||||
ret = kref_put(&local->ref, local_release);
|
||||
nfc_put_device(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct nfc_llcp_sock *nfc_llcp_sock_get(struct nfc_llcp_local *local,
|
||||
@ -959,8 +974,17 @@ static void nfc_llcp_recv_connect(struct nfc_llcp_local *local,
|
||||
}
|
||||
|
||||
new_sock = nfc_llcp_sock(new_sk);
|
||||
new_sock->dev = local->dev;
|
||||
|
||||
new_sock->local = nfc_llcp_local_get(local);
|
||||
if (!new_sock->local) {
|
||||
reason = LLCP_DM_REJ;
|
||||
sock_put(&new_sock->sk);
|
||||
release_sock(&sock->sk);
|
||||
sock_put(&sock->sk);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
new_sock->dev = local->dev;
|
||||
new_sock->rw = sock->rw;
|
||||
new_sock->miux = sock->miux;
|
||||
new_sock->nfc_protocol = sock->nfc_protocol;
|
||||
@ -1586,7 +1610,16 @@ int nfc_llcp_register_device(struct nfc_dev *ndev)
|
||||
if (local == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
local->dev = ndev;
|
||||
/* As we are going to initialize local's refcount, we need to get the
|
||||
* nfc_dev to avoid UAF, otherwise there is no point in continuing.
|
||||
* See nfc_llcp_local_get().
|
||||
*/
|
||||
local->dev = nfc_get_device(ndev->idx);
|
||||
if (!local->dev) {
|
||||
kfree(local);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&local->list);
|
||||
kref_init(&local->ref);
|
||||
mutex_init(&local->sdp_lock);
|
||||
|
@ -4252,7 +4252,7 @@ static void packet_mm_open(struct vm_area_struct *vma)
|
||||
struct sock *sk = sock->sk;
|
||||
|
||||
if (sk)
|
||||
atomic_inc(&pkt_sk(sk)->mapped);
|
||||
atomic_long_inc(&pkt_sk(sk)->mapped);
|
||||
}
|
||||
|
||||
static void packet_mm_close(struct vm_area_struct *vma)
|
||||
@ -4262,7 +4262,7 @@ static void packet_mm_close(struct vm_area_struct *vma)
|
||||
struct sock *sk = sock->sk;
|
||||
|
||||
if (sk)
|
||||
atomic_dec(&pkt_sk(sk)->mapped);
|
||||
atomic_long_dec(&pkt_sk(sk)->mapped);
|
||||
}
|
||||
|
||||
static const struct vm_operations_struct packet_mmap_ops = {
|
||||
@ -4357,7 +4357,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
|
||||
|
||||
err = -EBUSY;
|
||||
if (!closing) {
|
||||
if (atomic_read(&po->mapped))
|
||||
if (atomic_long_read(&po->mapped))
|
||||
goto out;
|
||||
if (packet_read_pending(rb))
|
||||
goto out;
|
||||
@ -4460,7 +4460,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
|
||||
|
||||
err = -EBUSY;
|
||||
mutex_lock(&po->pg_vec_lock);
|
||||
if (closing || atomic_read(&po->mapped) == 0) {
|
||||
if (closing || atomic_long_read(&po->mapped) == 0) {
|
||||
err = 0;
|
||||
spin_lock_bh(&rb_queue->lock);
|
||||
swap(rb->pg_vec, pg_vec);
|
||||
@ -4478,9 +4478,9 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
|
||||
po->prot_hook.func = (po->rx_ring.pg_vec) ?
|
||||
tpacket_rcv : packet_rcv;
|
||||
skb_queue_purge(rb_queue);
|
||||
if (atomic_read(&po->mapped))
|
||||
pr_err("packet_mmap: vma is busy: %d\n",
|
||||
atomic_read(&po->mapped));
|
||||
if (atomic_long_read(&po->mapped))
|
||||
pr_err("packet_mmap: vma is busy: %ld\n",
|
||||
atomic_long_read(&po->mapped));
|
||||
}
|
||||
mutex_unlock(&po->pg_vec_lock);
|
||||
|
||||
@ -4558,7 +4558,7 @@ static int packet_mmap(struct file *file, struct socket *sock,
|
||||
}
|
||||
}
|
||||
|
||||
atomic_inc(&po->mapped);
|
||||
atomic_long_inc(&po->mapped);
|
||||
vma->vm_ops = &packet_mmap_ops;
|
||||
err = 0;
|
||||
|
||||
|
@ -125,7 +125,7 @@ struct packet_sock {
|
||||
__be16 num;
|
||||
struct packet_rollover *rollover;
|
||||
struct packet_mclist *mclist;
|
||||
atomic_t mapped;
|
||||
atomic_long_t mapped;
|
||||
enum tpacket_versions tp_version;
|
||||
unsigned int tp_hdrlen;
|
||||
unsigned int tp_reserve;
|
||||
|
@ -31,7 +31,8 @@ enum psample_nl_multicast_groups {
|
||||
|
||||
static const struct genl_multicast_group psample_nl_mcgrps[] = {
|
||||
[PSAMPLE_NL_MCGRP_CONFIG] = { .name = PSAMPLE_NL_MCGRP_CONFIG_NAME },
|
||||
[PSAMPLE_NL_MCGRP_SAMPLE] = { .name = PSAMPLE_NL_MCGRP_SAMPLE_NAME },
|
||||
[PSAMPLE_NL_MCGRP_SAMPLE] = { .name = PSAMPLE_NL_MCGRP_SAMPLE_NAME,
|
||||
.flags = GENL_UNS_ADMIN_PERM },
|
||||
};
|
||||
|
||||
static struct genl_family psample_nl_family __ro_after_init;
|
||||
|
@ -129,6 +129,14 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = gpiod_direction_output(rfkill->reset_gpio, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = gpiod_direction_output(rfkill->shutdown_gpio, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
rfkill->rfkill_dev = rfkill_alloc(rfkill->name, &pdev->dev,
|
||||
rfkill->type, &rfkill_gpio_ops,
|
||||
rfkill);
|
||||
|
@ -1309,9 +1309,11 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
|
||||
case TIOCINQ: {
|
||||
struct sk_buff *skb;
|
||||
long amount = 0L;
|
||||
/* These two are safe on a single CPU system as only user tasks fiddle here */
|
||||
|
||||
spin_lock_irq(&sk->sk_receive_queue.lock);
|
||||
if ((skb = skb_peek(&sk->sk_receive_queue)) != NULL)
|
||||
amount = skb->len;
|
||||
spin_unlock_irq(&sk->sk_receive_queue.lock);
|
||||
return put_user(amount, (unsigned int __user *) argp);
|
||||
}
|
||||
|
||||
|
@ -101,8 +101,10 @@ retry:
|
||||
|
||||
static void em_text_destroy(struct tcf_ematch *m)
|
||||
{
|
||||
if (EM_TEXT_PRIV(m) && EM_TEXT_PRIV(m)->config)
|
||||
if (EM_TEXT_PRIV(m) && EM_TEXT_PRIV(m)->config) {
|
||||
textsearch_destroy(EM_TEXT_PRIV(m)->config);
|
||||
kfree(EM_TEXT_PRIV(m));
|
||||
}
|
||||
}
|
||||
|
||||
static int em_text_dump(struct sk_buff *skb, struct tcf_ematch *m)
|
||||
|
@ -352,7 +352,7 @@ static s64 virtio_transport_has_space(struct vsock_sock *vsk)
|
||||
struct virtio_vsock_sock *vvs = vsk->trans;
|
||||
s64 bytes;
|
||||
|
||||
bytes = vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt);
|
||||
bytes = (s64)vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt);
|
||||
if (bytes < 0)
|
||||
bytes = 0;
|
||||
|
||||
|
87
net/wireless/certs/wens.hex
Normal file
87
net/wireless/certs/wens.hex
Normal file
@ -0,0 +1,87 @@
|
||||
/* Chen-Yu Tsai's regdb certificate */
|
||||
0x30, 0x82, 0x02, 0xa7, 0x30, 0x82, 0x01, 0x8f,
|
||||
0x02, 0x14, 0x61, 0xc0, 0x38, 0x65, 0x1a, 0xab,
|
||||
0xdc, 0xf9, 0x4b, 0xd0, 0xac, 0x7f, 0xf0, 0x6c,
|
||||
0x72, 0x48, 0xdb, 0x18, 0xc6, 0x00, 0x30, 0x0d,
|
||||
0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
|
||||
0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x0f, 0x31,
|
||||
0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03,
|
||||
0x0c, 0x04, 0x77, 0x65, 0x6e, 0x73, 0x30, 0x20,
|
||||
0x17, 0x0d, 0x32, 0x33, 0x31, 0x32, 0x30, 0x31,
|
||||
0x30, 0x37, 0x34, 0x31, 0x31, 0x34, 0x5a, 0x18,
|
||||
0x0f, 0x32, 0x31, 0x32, 0x33, 0x31, 0x31, 0x30,
|
||||
0x37, 0x30, 0x37, 0x34, 0x31, 0x31, 0x34, 0x5a,
|
||||
0x30, 0x0f, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03,
|
||||
0x55, 0x04, 0x03, 0x0c, 0x04, 0x77, 0x65, 0x6e,
|
||||
0x73, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06,
|
||||
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01,
|
||||
0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f,
|
||||
0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01,
|
||||
0x01, 0x00, 0xa9, 0x7a, 0x2c, 0x78, 0x4d, 0xa7,
|
||||
0x19, 0x2d, 0x32, 0x52, 0xa0, 0x2e, 0x6c, 0xef,
|
||||
0x88, 0x7f, 0x15, 0xc5, 0xb6, 0x69, 0x54, 0x16,
|
||||
0x43, 0x14, 0x79, 0x53, 0xb7, 0xae, 0x88, 0xfe,
|
||||
0xc0, 0xb7, 0x5d, 0x47, 0x8e, 0x1a, 0xe1, 0xef,
|
||||
0xb3, 0x90, 0x86, 0xda, 0xd3, 0x64, 0x81, 0x1f,
|
||||
0xce, 0x5d, 0x9e, 0x4b, 0x6e, 0x58, 0x02, 0x3e,
|
||||
0xb2, 0x6f, 0x5e, 0x42, 0x47, 0x41, 0xf4, 0x2c,
|
||||
0xb8, 0xa8, 0xd4, 0xaa, 0xc0, 0x0e, 0xe6, 0x48,
|
||||
0xf0, 0xa8, 0xce, 0xcb, 0x08, 0xae, 0x37, 0xaf,
|
||||
0xf6, 0x40, 0x39, 0xcb, 0x55, 0x6f, 0x5b, 0x4f,
|
||||
0x85, 0x34, 0xe6, 0x69, 0x10, 0x50, 0x72, 0x5e,
|
||||
0x4e, 0x9d, 0x4c, 0xba, 0x38, 0x36, 0x0d, 0xce,
|
||||
0x73, 0x38, 0xd7, 0x27, 0x02, 0x2a, 0x79, 0x03,
|
||||
0xe1, 0xac, 0xcf, 0xb0, 0x27, 0x85, 0x86, 0x93,
|
||||
0x17, 0xab, 0xec, 0x42, 0x77, 0x37, 0x65, 0x8a,
|
||||
0x44, 0xcb, 0xd6, 0x42, 0x93, 0x92, 0x13, 0xe3,
|
||||
0x39, 0x45, 0xc5, 0x6e, 0x00, 0x4a, 0x7f, 0xcb,
|
||||
0x42, 0x17, 0x2b, 0x25, 0x8c, 0xb8, 0x17, 0x3b,
|
||||
0x15, 0x36, 0x59, 0xde, 0x42, 0xce, 0x21, 0xe6,
|
||||
0xb6, 0xc7, 0x6e, 0x5e, 0x26, 0x1f, 0xf7, 0x8a,
|
||||
0x57, 0x9e, 0xa5, 0x96, 0x72, 0xb7, 0x02, 0x32,
|
||||
0xeb, 0x07, 0x2b, 0x73, 0xe2, 0x4f, 0x66, 0x58,
|
||||
0x9a, 0xeb, 0x0f, 0x07, 0xb6, 0xab, 0x50, 0x8b,
|
||||
0xc3, 0x8f, 0x17, 0xfa, 0x0a, 0x99, 0xc2, 0x16,
|
||||
0x25, 0xbf, 0x2d, 0x6b, 0x1a, 0xaa, 0xe6, 0x3e,
|
||||
0x5f, 0xeb, 0x6d, 0x9b, 0x5d, 0x4d, 0x42, 0x83,
|
||||
0x2d, 0x39, 0xb8, 0xc9, 0xac, 0xdb, 0x3a, 0x91,
|
||||
0x50, 0xdf, 0xbb, 0xb1, 0x76, 0x6d, 0x15, 0x73,
|
||||
0xfd, 0xc6, 0xe6, 0x6b, 0x71, 0x9e, 0x67, 0x36,
|
||||
0x22, 0x83, 0x79, 0xb1, 0xd6, 0xb8, 0x84, 0x52,
|
||||
0xaf, 0x96, 0x5b, 0xc3, 0x63, 0x02, 0x4e, 0x78,
|
||||
0x70, 0x57, 0x02, 0x03, 0x01, 0x00, 0x01, 0x30,
|
||||
0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
|
||||
0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82,
|
||||
0x01, 0x01, 0x00, 0x24, 0x28, 0xee, 0x22, 0x74,
|
||||
0x7f, 0x7c, 0xfa, 0x6c, 0x1f, 0xb3, 0x18, 0xd1,
|
||||
0xc2, 0x3d, 0x7d, 0x29, 0x42, 0x88, 0xad, 0x82,
|
||||
0xa5, 0xb1, 0x8a, 0x05, 0xd0, 0xec, 0x5c, 0x91,
|
||||
0x20, 0xf6, 0x82, 0xfd, 0xd5, 0x67, 0x60, 0x5f,
|
||||
0x31, 0xf5, 0xbd, 0x88, 0x91, 0x70, 0xbd, 0xb8,
|
||||
0xb9, 0x8c, 0x88, 0xfe, 0x53, 0xc9, 0x54, 0x9b,
|
||||
0x43, 0xc4, 0x7a, 0x43, 0x74, 0x6b, 0xdd, 0xb0,
|
||||
0xb1, 0x3b, 0x33, 0x45, 0x46, 0x78, 0xa3, 0x1c,
|
||||
0xef, 0x54, 0x68, 0xf7, 0x85, 0x9c, 0xe4, 0x51,
|
||||
0x6f, 0x06, 0xaf, 0x81, 0xdb, 0x2a, 0x7b, 0x7b,
|
||||
0x6f, 0xa8, 0x9c, 0x67, 0xd8, 0xcb, 0xc9, 0x91,
|
||||
0x40, 0x00, 0xae, 0xd9, 0xa1, 0x9f, 0xdd, 0xa6,
|
||||
0x43, 0x0e, 0x28, 0x7b, 0xaa, 0x1b, 0xe9, 0x84,
|
||||
0xdb, 0x76, 0x64, 0x42, 0x70, 0xc9, 0xc0, 0xeb,
|
||||
0xae, 0x84, 0x11, 0x16, 0x68, 0x4e, 0x84, 0x9e,
|
||||
0x7e, 0x92, 0x36, 0xee, 0x1c, 0x3b, 0x08, 0x63,
|
||||
0xeb, 0x79, 0x84, 0x15, 0x08, 0x9d, 0xaf, 0xc8,
|
||||
0x9a, 0xc7, 0x34, 0xd3, 0x94, 0x4b, 0xd1, 0x28,
|
||||
0x97, 0xbe, 0xd1, 0x45, 0x75, 0xdc, 0x35, 0x62,
|
||||
0xac, 0x1d, 0x1f, 0xb7, 0xb7, 0x15, 0x87, 0xc8,
|
||||
0x98, 0xc0, 0x24, 0x31, 0x56, 0x8d, 0xed, 0xdb,
|
||||
0x06, 0xc6, 0x46, 0xbf, 0x4b, 0x6d, 0xa6, 0xd5,
|
||||
0xab, 0xcc, 0x60, 0xfc, 0xe5, 0x37, 0xb6, 0x53,
|
||||
0x7d, 0x58, 0x95, 0xa9, 0x56, 0xc7, 0xf7, 0xee,
|
||||
0xc3, 0xa0, 0x76, 0xf7, 0x65, 0x4d, 0x53, 0xfa,
|
||||
0xff, 0x5f, 0x76, 0x33, 0x5a, 0x08, 0xfa, 0x86,
|
||||
0x92, 0x5a, 0x13, 0xfa, 0x1a, 0xfc, 0xf2, 0x1b,
|
||||
0x8c, 0x7f, 0x42, 0x6d, 0xb7, 0x7e, 0xb7, 0xb4,
|
||||
0xf0, 0xc7, 0x83, 0xbb, 0xa2, 0x81, 0x03, 0x2d,
|
||||
0xd4, 0x2a, 0x63, 0x3f, 0xf7, 0x31, 0x2e, 0x40,
|
||||
0x33, 0x5c, 0x46, 0xbc, 0x9b, 0xc1, 0x05, 0xa5,
|
||||
0x45, 0x4e, 0xc3,
|
2686
scripts/checkpatch.pl
Executable file → Normal file
2686
scripts/checkpatch.pl
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
@ -322,7 +322,7 @@ int main(int argc, char **argv)
|
||||
CMS_NOSMIMECAP | use_keyid |
|
||||
use_signed_attrs),
|
||||
"CMS_add1_signer");
|
||||
ERR(CMS_final(cms, bm, NULL, CMS_NOCERTS | CMS_BINARY) < 0,
|
||||
ERR(CMS_final(cms, bm, NULL, CMS_NOCERTS | CMS_BINARY) != 1,
|
||||
"CMS_final");
|
||||
|
||||
#else
|
||||
@ -341,10 +341,10 @@ int main(int argc, char **argv)
|
||||
b = BIO_new_file(sig_file_name, "wb");
|
||||
ERR(!b, "%s", sig_file_name);
|
||||
#ifndef USE_PKCS7
|
||||
ERR(i2d_CMS_bio_stream(b, cms, NULL, 0) < 0,
|
||||
ERR(i2d_CMS_bio_stream(b, cms, NULL, 0) != 1,
|
||||
"%s", sig_file_name);
|
||||
#else
|
||||
ERR(i2d_PKCS7_bio(b, pkcs7) < 0,
|
||||
ERR(i2d_PKCS7_bio(b, pkcs7) != 1,
|
||||
"%s", sig_file_name);
|
||||
#endif
|
||||
BIO_free(b);
|
||||
@ -374,9 +374,9 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!raw_sig) {
|
||||
#ifndef USE_PKCS7
|
||||
ERR(i2d_CMS_bio_stream(bd, cms, NULL, 0) < 0, "%s", dest_name);
|
||||
ERR(i2d_CMS_bio_stream(bd, cms, NULL, 0) != 1, "%s", dest_name);
|
||||
#else
|
||||
ERR(i2d_PKCS7_bio(bd, pkcs7) < 0, "%s", dest_name);
|
||||
ERR(i2d_PKCS7_bio(bd, pkcs7) != 1, "%s", dest_name);
|
||||
#endif
|
||||
} else {
|
||||
BIO *b;
|
||||
@ -396,7 +396,7 @@ int main(int argc, char **argv)
|
||||
ERR(BIO_write(bd, &sig_info, sizeof(sig_info)) < 0, "%s", dest_name);
|
||||
ERR(BIO_write(bd, magic_number, sizeof(magic_number) - 1) < 0, "%s", dest_name);
|
||||
|
||||
ERR(BIO_free(bd) < 0, "%s", dest_name);
|
||||
ERR(BIO_free(bd) != 1, "%s", dest_name);
|
||||
|
||||
/* Finally, if we're signing in place, replace the original. */
|
||||
if (replace_orig)
|
||||
|
@ -266,6 +266,7 @@ static char *snd_pcm_state_names[] = {
|
||||
STATE(DRAINING),
|
||||
STATE(PAUSED),
|
||||
STATE(SUSPENDED),
|
||||
STATE(DISCONNECTED),
|
||||
};
|
||||
|
||||
static char *snd_pcm_access_names[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user