Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7641e15
arm64: Log the machine name string during boot up
Jun 13, 2014
15e66a6
BACKPORT: security: fix typo in security_task_prctl
thejh Sep 18, 2015
4becca7
KEYS: Fix race between read and revoke
dhowells Dec 18, 2015
4b872e9
leds: qpnp-flash: check power supply variable in flash led driver
Feb 23, 2016
4db4c6f
perf: duplicate deletion of perf event
Mar 1, 2016
2302bb0
ASoc: soundwire: add null check before using map
Mar 4, 2016
bd409b1
msm: ADSPRPC: Fix buffer overflow for session
Mar 9, 2016
c281b5a
Bluetooth: Replace %p with %pK
Mar 23, 2016
d4bdbf7
diag: Use correct index while accessing DCI channel
Apr 19, 2016
7cb1f0d
net: fix infoleak in rtnetlink
kengiter May 3, 2016
02b6d28
msm: ADSPRPC: Validate the SMMU session count
May 19, 2016
b46a4d4
Replace %p with %pK to prevent leaking kernel address
mkayyash May 24, 2016
e2ca84f
KEYS: potential uninitialized variable
Jun 16, 2016
a5d6e54
BACKPORT: tcp: make challenge acks less predictable
edumazet Jul 10, 2016
fa5ceb1
soc: qcom: smp2p: Fix kernel address leak
Aug 16, 2016
16a2db1
misc: qcom: qdsp6v2: initialize wma_config_32
Aug 16, 2016
9512dc7
binder: prevent kptr leak by using %pK format specifier
nickdesaulniers Aug 17, 2016
5621f34
misc: qcom: qdsp6v2: initialize config_32
Aug 29, 2016
c50276f
UPSTREAM: Input: powermate - fix oops with malicious USB descriptors
Aug 30, 2016
48bc7b8
UPSTREAM: USB: cypress_m8: add endpoint sanity check
Aug 30, 2016
0fd99e1
UPSTREAM: USB: mct_u232: add sanity checking in probe
Aug 30, 2016
eeb85e4
UPSTREAM: USB: usb_driver_claim_interface: add sanity checking
Aug 30, 2016
1d44322
UPSTREAM: USB: iowarrior: fix oops with malicious USB descriptors
Aug 30, 2016
2ad4ad0
UPSTREAM: USB: cdc-acm: more sanity checking
Aug 30, 2016
d28fdfa
KEYS: Fix short sprintf buffer in /proc/keys show function
dhowells Sep 6, 2016
2e2cd15
mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
torvalds Oct 13, 2016
5ee953a
KEYS: Fix race between key destruction and finding a keyring by name
dhowells Sep 25, 2015
1a8f29e
KEYS: Fix crash when attempt to garbage collect an uninstantiated key…
dhowells Oct 15, 2015
5659fd3
KEYS: Fix handling of stored error in a negatively instantiated user key
dhowells Nov 24, 2015
fef8368
Input: aiptek - fix crash on detecting device without endpoints
nefigtut Dec 1, 2015
6a0a113
qseecom: Fix stack out of bounds issue
Feb 10, 2016
7c230da
crypto: msm: crypto driver performance improvement
Feb 26, 2016
4e9fdb9
KEYS: Fix ASN.1 indefinite length object parsing
dhowells Feb 23, 2016
6af8578
netfilter: x_tables: check for size overflow
Mar 10, 2016
cc7a4bf
net: Fix use after free in the recvmmsg exit path
acmel Mar 14, 2016
2682f29
crypto: fix pointer dereference
Mar 17, 2016
d737bc2
msm: mdss: Fix memleak in panel_debug_reg_write
Jun 17, 2016
f1aba60
UPSTREAM: ppp: defer netns reference release for ppp channel
congwang Jul 6, 2016
aa20ca9
ANDROID: binder: Clear binder and cookie when setting handle in flat …
arve-android Aug 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions arch/arm64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,10 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
}

machine_name = of_flat_dt_get_machine_name();
dump_stack_set_arch_desc("%s (DT)", machine_name);
if (machine_name)
if (machine_name) {
dump_stack_set_arch_desc("%s (DT)", machine_name);
pr_info("Machine: %s\n", machine_name);
}
}

/*
Expand Down
25 changes: 20 additions & 5 deletions drivers/base/regmap/regmap-swr.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -68,10 +68,10 @@ static int regmap_swr_raw_multi_reg_write(void *context, const void *data,
struct device *dev = context;
struct swr_device *swr = to_swr_device(dev);
struct regmap *map = dev_get_regmap(dev, NULL);
size_t addr_bytes = map->format.reg_bytes;
size_t val_bytes = map->format.val_bytes;
size_t pad_bytes = map->format.pad_bytes;
size_t num_regs = (count / (addr_bytes + val_bytes + pad_bytes));
size_t addr_bytes;
size_t val_bytes;
size_t pad_bytes;
size_t num_regs;
int i = 0;
int ret = 0;
u16 *reg;
Expand All @@ -83,6 +83,21 @@ static int regmap_swr_raw_multi_reg_write(void *context, const void *data,
return -EINVAL;
}

if (map == NULL) {
dev_err(dev, "%s: regmap is NULL\n", __func__);
return -EINVAL;
}

addr_bytes = map->format.reg_bytes;
val_bytes = map->format.val_bytes;
pad_bytes = map->format.pad_bytes;

if (addr_bytes + val_bytes + pad_bytes == 0) {
dev_err(dev, "%s: sum of addr, value and pad is 0\n", __func__);
return -EINVAL;
}
num_regs = count / (addr_bytes + val_bytes + pad_bytes);

reg = kcalloc(num_regs, sizeof(u16), GFP_KERNEL);
if (!reg)
return -ENOMEM;
Expand Down
8 changes: 4 additions & 4 deletions drivers/bluetooth/hci_h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static int h4_open(struct hci_uart *hu)
{
struct h4_struct *h4;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

h4 = kzalloc(sizeof(*h4), GFP_KERNEL);
if (!h4)
Expand All @@ -77,7 +77,7 @@ static int h4_flush(struct hci_uart *hu)
{
struct h4_struct *h4 = hu->priv;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

skb_queue_purge(&h4->txq);

Expand All @@ -91,7 +91,7 @@ static int h4_close(struct hci_uart *hu)

hu->priv = NULL;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

skb_queue_purge(&h4->txq);

Expand All @@ -108,7 +108,7 @@ static int h4_enqueue(struct hci_uart *hu, struct sk_buff *skb)
{
struct h4_struct *h4 = hu->priv;

BT_DBG("hu %p skb %p", hu, skb);
BT_DBG("hu %pK skb %pK", hu, skb);

/* Prepend skb with frame type */
memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
Expand Down
30 changes: 15 additions & 15 deletions drivers/bluetooth/hci_ibs.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static int send_hci_ibs_cmd(u8 cmd, struct hci_uart *hu)
struct ibs_struct *ibs = hu->priv;
struct hci_ibs_cmd *hci_ibs_packet;

BT_DBG("hu %p cmd 0x%x", hu, cmd);
BT_DBG("hu %pK cmd 0x%x", hu, cmd);

/* allocate packet */
skb = bt_skb_alloc(1, GFP_ATOMIC);
Expand Down Expand Up @@ -254,7 +254,7 @@ static void ibs_wq_awake_device(struct work_struct *work)
struct hci_uart *hu = (struct hci_uart *)ibs->ibs_hu;
unsigned long flags;

BT_DBG(" %p ", hu);
BT_DBG(" %pK ", hu);

/* Vote for serial clock */
ibs_msm_serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_ON, hu);
Expand All @@ -281,7 +281,7 @@ static void ibs_wq_awake_rx(struct work_struct *work)
struct hci_uart *hu = (struct hci_uart *)ibs->ibs_hu;
unsigned long flags;

BT_DBG(" %p ", hu);
BT_DBG(" %pK ", hu);

ibs_msm_serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_ON, hu);

Expand Down Expand Up @@ -309,7 +309,7 @@ static void ibs_wq_serial_rx_clock_vote_off(struct work_struct *work)
ws_rx_vote_off);
struct hci_uart *hu = (struct hci_uart *)ibs->ibs_hu;

BT_DBG(" %p ", hu);
BT_DBG(" %pK ", hu);

ibs_msm_serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_OFF, hu);

Expand All @@ -321,7 +321,7 @@ static void ibs_wq_serial_tx_clock_vote_off(struct work_struct *work)
ws_tx_vote_off);
struct hci_uart *hu = (struct hci_uart *)ibs->ibs_hu;

BT_DBG(" %p ", hu);
BT_DBG(" %pK ", hu);

hci_uart_tx_wakeup(hu); /* run HCI tx handling unlocked */

Expand All @@ -337,7 +337,7 @@ static void hci_ibs_tx_idle_timeout(unsigned long arg)
struct ibs_struct *ibs = hu->priv;
unsigned long flags;

BT_DBG("hu %p idle timeout in %lu state", hu, ibs->tx_ibs_state);
BT_DBG("hu %pK idle timeout in %lu state", hu, ibs->tx_ibs_state);

spin_lock_irqsave_nested(&ibs->hci_ibs_lock,
flags, SINGLE_DEPTH_NESTING);
Expand Down Expand Up @@ -371,7 +371,7 @@ static void hci_ibs_wake_retrans_timeout(unsigned long arg)
unsigned long flags;
unsigned long retransmit = 0;

BT_DBG("hu %p wake retransmit timeout in %lu state",
BT_DBG("hu %pK wake retransmit timeout in %lu state",
hu, ibs->tx_ibs_state);

spin_lock_irqsave_nested(&ibs->hci_ibs_lock,
Expand Down Expand Up @@ -404,7 +404,7 @@ static int ibs_open(struct hci_uart *hu)
{
struct ibs_struct *ibs;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

ibs = kzalloc(sizeof(*ibs), GFP_ATOMIC);
if (!ibs)
Expand Down Expand Up @@ -500,7 +500,7 @@ static int ibs_flush(struct hci_uart *hu)
{
struct ibs_struct *ibs = hu->priv;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

skb_queue_purge(&ibs->tx_wait_q);
skb_queue_purge(&ibs->txq);
Expand All @@ -513,7 +513,7 @@ static int ibs_close(struct hci_uart *hu)
{
struct ibs_struct *ibs = hu->priv;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

skb_queue_purge(&ibs->tx_wait_q);
skb_queue_purge(&ibs->txq);
Expand Down Expand Up @@ -542,7 +542,7 @@ static void ibs_device_want_to_wakeup(struct hci_uart *hu)
unsigned long flags;
struct ibs_struct *ibs = hu->priv;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

/* lock hci_ibs state */
spin_lock_irqsave(&ibs->hci_ibs_lock, flags);
Expand Down Expand Up @@ -591,7 +591,7 @@ static void ibs_device_want_to_sleep(struct hci_uart *hu)
unsigned long flags;
struct ibs_struct *ibs = hu->priv;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

/* lock hci_ibs state */
spin_lock_irqsave(&ibs->hci_ibs_lock, flags);
Expand Down Expand Up @@ -627,7 +627,7 @@ static void ibs_device_woke_up(struct hci_uart *hu)
struct ibs_struct *ibs = hu->priv;
struct sk_buff *skb = NULL;

BT_DBG("hu %p", hu);
BT_DBG("hu %pK", hu);

/* lock hci_ibs state */
spin_lock_irqsave(&ibs->hci_ibs_lock, flags);
Expand Down Expand Up @@ -672,7 +672,7 @@ static int ibs_enqueue(struct hci_uart *hu, struct sk_buff *skb)
unsigned long flags = 0;
struct ibs_struct *ibs = hu->priv;

BT_DBG("hu %p skb %p", hu, skb);
BT_DBG("hu %pK skb %pK", hu, skb);

/* Prepend skb with frame type */
memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
Expand Down Expand Up @@ -752,7 +752,7 @@ static int ibs_recv(struct hci_uart *hu, void *data, int count)
struct hci_sco_hdr *sh;
register int len, type, dlen;

BT_DBG("hu %p count %d rx_state %ld rx_count %ld",
BT_DBG("hu %pK count %d rx_state %ld rx_count %ld",
hu, count, ibs->rx_state, ibs->rx_count);

ptr = data;
Expand Down
12 changes: 6 additions & 6 deletions drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void hci_uart_write_work(struct work_struct *work)
struct hci_dev *hdev = hu->hdev;
struct sk_buff *skb;

BT_DBG("hu %p hdev %p tty %p", hu, hdev, tty);
BT_DBG("hu %pK hdev %pK tty %pK", hu, hdev, tty);

/* REVISIT: should we cope with bad skbs or ->write() returning
* and error value ?
Expand Down Expand Up @@ -219,7 +219,7 @@ int hci_uart_init_ready(struct hci_uart *hu)
/* Initialize device */
static int hci_uart_open(struct hci_dev *hdev)
{
BT_DBG("%s %p", hdev->name, hdev);
BT_DBG("%s %pK", hdev->name, hdev);

/* Nothing to do for UART driver */

Expand All @@ -234,7 +234,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
struct hci_uart *hu = hci_get_drvdata(hdev);
struct tty_struct *tty = hu->tty;

BT_DBG("hdev %p tty %p", hdev, tty);
BT_DBG("hdev %pK tty %pK", hdev, tty);

if (hu->tx_skb) {
kfree_skb(hu->tx_skb); hu->tx_skb = NULL;
Expand All @@ -253,7 +253,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
/* Close device */
static int hci_uart_close(struct hci_dev *hdev)
{
BT_DBG("hdev %p", hdev);
BT_DBG("hdev %pK", hdev);

if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
return 0;
Expand Down Expand Up @@ -294,7 +294,7 @@ static int hci_uart_tty_open(struct tty_struct *tty)
{
struct hci_uart *hu;

BT_DBG("tty %p", tty);
BT_DBG("tty %pK", tty);

/* Error if the tty has no write op instead of leaving an exploitable
hole */
Expand Down Expand Up @@ -339,7 +339,7 @@ static void hci_uart_tty_close(struct tty_struct *tty)
struct hci_uart *hu = (void *)tty->disc_data;
struct hci_dev *hdev;

BT_DBG("tty %p", tty);
BT_DBG("tty %pK", tty);

/* Detach from the tty */
tty->disc_data = NULL;
Expand Down
6 changes: 6 additions & 0 deletions drivers/char/adsprpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2051,9 +2051,15 @@ static int fastrpc_cb_legacy_probe(struct device *dev)
&disable_htw);
VERIFY(err, !arm_iommu_attach_device(first_sess->dev,
first_sess->smmu.mapping));
if (err)
goto bail;
VERIFY(err, (sids_size/sizeof(unsigned int)) <= NUM_SESSIONS);
if (err)
goto bail;
for (i = 0; i < sids_size/sizeof(unsigned int); i++) {
VERIFY(err, chan->sesscount < NUM_SESSIONS);
if (err)
goto bail;
sess = &chan->session[chan->sesscount];
sess->smmu.cb = sids[i];
sess->dev = first_sess->dev;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/diag/diag_dci.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static void dci_chk_handshake(unsigned long data)
{
int index = (int)data;

if (index < 0 || index > NUM_DCI_PROC)
if (index < 0 || index >= NUM_DCI_PROC)
return;

queue_work(driver->diag_dci_wq,
Expand Down
6 changes: 5 additions & 1 deletion drivers/crypto/msm/ota_crypto.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -239,6 +239,10 @@ static void req_done(unsigned long data)
if (!list_empty(&podev->ready_commands)) {
new_req = container_of(podev->ready_commands.next,
struct ota_async_req, rlist);
if (NULL == new_req) {
pr_err("ota_crypto: req_done, new_req = NULL");
return;
}
list_del(&new_req->rlist);
pqce->active_command = new_req;
spin_unlock_irqrestore(&podev->lock, flags);
Expand Down
Loading