Skip to content

Commit 1c32ca9

Browse files
committed
Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (38 commits) Revert "staging: tidspbridge: replace iommu custom for opensource implementation" Revert "staging: tidspbridge - move shared memory iommu maps to tiomap3430.c" Revert "staging: tidspbridge - rename bridge_brd_mem_map/unmap to a proper name" Revert "staging: tidspbridge - remove custom mmu code from tiomap3430.c" Revert "staging: tidspbridge - fix mmufault support" Revert "staging: tidspbridge - remove hw directory" Revert "staging: tidspbridge - move all iommu related code to a new file" Revert "staging: tidspbridge: remove dw_dmmu_base from cfg_hostres struct" Revert "staging: tidspbridge - remove reserved memory clean up" Revert "staging: tidspbridge - deprecate reserve/unreserve_memory funtions" Revert "staging: tidspbridge - remove dmm custom module" Revert "staging: tidspbridge - update Kconfig to select IOMMU module" staging: tidspbridge: hardcode SCM macros while fix is upstreamed Staging: keucr driver: fix uninitialized variable & proper memset length omap: dsp: remove shm from normal memory Staging: wlan-ng: Fix wrong #ifdef #endif sequence Staging: Update parameters for cfg80211 key management operation Staging: ath6kl: Fix pointer casts on 64-bit architectures Staging: batman-adv: suppress false warning when changing the mac address Staging: batman-adv: fix interface alternating and bonding reggression ...
2 parents 00dad7f + 94fb7c9 commit 1c32ca9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3755
-795
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5676,7 +5676,7 @@ S: Maintained
56765676

56775677
STAGING SUBSYSTEM
56785678
M: Greg Kroah-Hartman <[email protected]>
5679-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-next-2.6.git
5679+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git
56805680
56815681
S: Maintained
56825682
F: drivers/staging/

arch/arm/plat-omap/devices.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,14 @@ void __init omap_dsp_reserve_sdram_memblock(void)
284284
if (!size)
285285
return;
286286

287-
paddr = __memblock_alloc_base(size, SZ_1M, MEMBLOCK_REAL_LIMIT);
287+
paddr = memblock_alloc(size, SZ_1M);
288288
if (!paddr) {
289289
pr_err("%s: failed to reserve %x bytes\n",
290290
__func__, size);
291291
return;
292292
}
293+
memblock_free(paddr, size);
294+
memblock_remove(paddr, size);
293295

294296
omap_dsp_phys_mempool_base = paddr;
295297
}

drivers/staging/ath6kl/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ config AR600x_BT_RESET_PIN
102102

103103
config ATH6KL_CFG80211
104104
bool "CFG80211 support"
105-
depends on ATH6K_LEGACY
105+
depends on ATH6K_LEGACY && CFG80211
106106
help
107107
Enables support for CFG80211 APIs. The default option is to use WEXT. Even with this option enabled, WEXT is not explicitly disabled and the onus of not exercising WEXT lies on the application(s) running in the user space.
108108

drivers/staging/ath6kl/os/linux/ar6000_drv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, A_UINT32 address, A
11261126
if ((board_ext_address) && (fw_entry->size == (board_data_size + board_ext_data_size))) {
11271127
A_UINT32 param;
11281128

1129-
status = BMIWriteMemory(ar->arHifDevice, board_ext_address, (A_UCHAR *)(((A_UINT32)fw_entry->data) + board_data_size), board_ext_data_size);
1129+
status = BMIWriteMemory(ar->arHifDevice, board_ext_address, (A_UCHAR *)(fw_entry->data + board_data_size), board_ext_data_size);
11301130

11311131
if (status != A_OK) {
11321132
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI operation failed: %d\n", __LINE__));
@@ -3030,7 +3030,8 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev)
30303030
A_UINT8 csumDest=0;
30313031
A_UINT8 csum=skb->ip_summed;
30323032
if(csumOffload && (csum==CHECKSUM_PARTIAL)){
3033-
csumStart=skb->csum_start-(skb->network_header-skb->head)+sizeof(ATH_LLC_SNAP_HDR);
3033+
csumStart = (skb->head + skb->csum_start - skb_network_header(skb) +
3034+
sizeof(ATH_LLC_SNAP_HDR));
30343035
csumDest=skb->csum_offset+csumStart;
30353036
}
30363037
#endif

drivers/staging/ath6kl/os/linux/cfg80211.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, A_STATUS status)
808808

809809
static int
810810
ar6k_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
811-
A_UINT8 key_index, const A_UINT8 *mac_addr,
811+
A_UINT8 key_index, bool pairwise, const A_UINT8 *mac_addr,
812812
struct key_params *params)
813813
{
814814
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev);
@@ -901,7 +901,7 @@ ar6k_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
901901

902902
static int
903903
ar6k_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
904-
A_UINT8 key_index, const A_UINT8 *mac_addr)
904+
A_UINT8 key_index, bool pairwise, const A_UINT8 *mac_addr)
905905
{
906906
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev);
907907

@@ -936,7 +936,8 @@ ar6k_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
936936

937937
static int
938938
ar6k_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
939-
A_UINT8 key_index, const A_UINT8 *mac_addr, void *cookie,
939+
A_UINT8 key_index, bool pairwise, const A_UINT8 *mac_addr,
940+
void *cookie,
940941
void (*callback)(void *cookie, struct key_params*))
941942
{
942943
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev);

drivers/staging/batman-adv/hard-interface.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static void update_mac_addresses(struct batman_if *batman_if)
165165
batman_if->net_dev->dev_addr, ETH_ALEN);
166166
}
167167

168-
static void check_known_mac_addr(uint8_t *addr)
168+
static void check_known_mac_addr(struct net_device *net_dev)
169169
{
170170
struct batman_if *batman_if;
171171

@@ -175,11 +175,16 @@ static void check_known_mac_addr(uint8_t *addr)
175175
(batman_if->if_status != IF_TO_BE_ACTIVATED))
176176
continue;
177177

178-
if (!compare_orig(batman_if->net_dev->dev_addr, addr))
178+
if (batman_if->net_dev == net_dev)
179+
continue;
180+
181+
if (!compare_orig(batman_if->net_dev->dev_addr,
182+
net_dev->dev_addr))
179183
continue;
180184

181185
pr_warning("The newly added mac address (%pM) already exists "
182-
"on: %s\n", addr, batman_if->net_dev->name);
186+
"on: %s\n", net_dev->dev_addr,
187+
batman_if->net_dev->name);
183188
pr_warning("It is strongly recommended to keep mac addresses "
184189
"unique to avoid problems!\n");
185190
}
@@ -430,7 +435,7 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev)
430435
atomic_set(&batman_if->refcnt, 0);
431436
hardif_hold(batman_if);
432437

433-
check_known_mac_addr(batman_if->net_dev->dev_addr);
438+
check_known_mac_addr(batman_if->net_dev);
434439

435440
spin_lock(&if_list_lock);
436441
list_add_tail_rcu(&batman_if->list, &if_list);
@@ -515,7 +520,7 @@ static int hard_if_event(struct notifier_block *this,
515520
goto out;
516521
}
517522

518-
check_known_mac_addr(batman_if->net_dev->dev_addr);
523+
check_known_mac_addr(batman_if->net_dev);
519524
update_mac_addresses(batman_if);
520525

521526
bat_priv = netdev_priv(batman_if->soft_iface);

drivers/staging/batman-adv/routing.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,10 +1000,10 @@ int recv_icmp_packet(struct sk_buff *skb, struct batman_if *recv_if)
10001000

10011001
/* find a suitable router for this originator, and use
10021002
* bonding if possible. */
1003-
struct neigh_node *find_router(struct orig_node *orig_node,
1003+
struct neigh_node *find_router(struct bat_priv *bat_priv,
1004+
struct orig_node *orig_node,
10041005
struct batman_if *recv_if)
10051006
{
1006-
struct bat_priv *bat_priv;
10071007
struct orig_node *primary_orig_node;
10081008
struct orig_node *router_orig;
10091009
struct neigh_node *router, *first_candidate, *best_router;
@@ -1019,13 +1019,9 @@ struct neigh_node *find_router(struct orig_node *orig_node,
10191019
/* without bonding, the first node should
10201020
* always choose the default router. */
10211021

1022-
if (!recv_if)
1023-
return orig_node->router;
1024-
1025-
bat_priv = netdev_priv(recv_if->soft_iface);
10261022
bonding_enabled = atomic_read(&bat_priv->bonding_enabled);
10271023

1028-
if (!bonding_enabled)
1024+
if ((!recv_if) && (!bonding_enabled))
10291025
return orig_node->router;
10301026

10311027
router_orig = orig_node->router->orig_node;
@@ -1154,7 +1150,7 @@ static int route_unicast_packet(struct sk_buff *skb,
11541150
orig_node = ((struct orig_node *)
11551151
hash_find(bat_priv->orig_hash, unicast_packet->dest));
11561152

1157-
router = find_router(orig_node, recv_if);
1153+
router = find_router(bat_priv, orig_node, recv_if);
11581154

11591155
if (!router) {
11601156
spin_unlock_irqrestore(&bat_priv->orig_hash_lock, flags);

drivers/staging/batman-adv/routing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ int recv_ucast_frag_packet(struct sk_buff *skb, struct batman_if *recv_if);
3838
int recv_bcast_packet(struct sk_buff *skb, struct batman_if *recv_if);
3939
int recv_vis_packet(struct sk_buff *skb, struct batman_if *recv_if);
4040
int recv_bat_packet(struct sk_buff *skb, struct batman_if *recv_if);
41-
struct neigh_node *find_router(struct orig_node *orig_node,
42-
struct batman_if *recv_if);
41+
struct neigh_node *find_router(struct bat_priv *bat_priv,
42+
struct orig_node *orig_node, struct batman_if *recv_if);
4343
void update_bonding_candidates(struct bat_priv *bat_priv,
4444
struct orig_node *orig_node);
4545

drivers/staging/batman-adv/unicast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
224224
if (!orig_node)
225225
orig_node = transtable_search(bat_priv, ethhdr->h_dest);
226226

227-
router = find_router(orig_node, NULL);
227+
router = find_router(bat_priv, orig_node, NULL);
228228

229229
if (!router)
230230
goto unlock;

drivers/staging/bcm/Bcmchar.c

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,13 +1001,15 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
10011001
}
10021002
#endif
10031003
case IOCTL_BE_BUCKET_SIZE:
1004-
Adapter->BEBucketSize = *(PULONG)arg;
1005-
Status = STATUS_SUCCESS;
1004+
Status = 0;
1005+
if (get_user(Adapter->BEBucketSize, (unsigned long __user *)arg))
1006+
Status = -EFAULT;
10061007
break;
10071008

10081009
case IOCTL_RTPS_BUCKET_SIZE:
1009-
Adapter->rtPSBucketSize = *(PULONG)arg;
1010-
Status = STATUS_SUCCESS;
1010+
Status = 0;
1011+
if (get_user(Adapter->rtPSBucketSize, (unsigned long __user *)arg))
1012+
Status = -EFAULT;
10111013
break;
10121014
case IOCTL_CHIP_RESET:
10131015
{
@@ -1028,11 +1030,15 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
10281030
case IOCTL_QOS_THRESHOLD:
10291031
{
10301032
USHORT uiLoopIndex;
1031-
for(uiLoopIndex = 0 ; uiLoopIndex < NO_OF_QUEUES ; uiLoopIndex++)
1032-
{
1033-
Adapter->PackInfo[uiLoopIndex].uiThreshold = *(PULONG)arg;
1033+
1034+
Status = 0;
1035+
for (uiLoopIndex = 0; uiLoopIndex < NO_OF_QUEUES; uiLoopIndex++) {
1036+
if (get_user(Adapter->PackInfo[uiLoopIndex].uiThreshold,
1037+
(unsigned long __user *)arg)) {
1038+
Status = -EFAULT;
1039+
break;
1040+
}
10341041
}
1035-
Status = STATUS_SUCCESS;
10361042
break;
10371043
}
10381044

@@ -1093,21 +1099,28 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
10931099
}
10941100
case IOCTL_BCM_GET_CURRENT_STATUS:
10951101
{
1096-
LINK_STATE *plink_state = NULL;
1102+
LINK_STATE plink_state;
1103+
10971104
/* Copy Ioctl Buffer structure */
10981105
if(copy_from_user(&IoBuffer, argp, sizeof(IOCTL_BUFFER)))
10991106
{
11001107
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "copy_from_user failed..\n");
11011108
Status = -EFAULT;
11021109
break;
11031110
}
1104-
plink_state = (LINK_STATE*)arg;
1105-
plink_state->bIdleMode = (UCHAR)Adapter->IdleMode;
1106-
plink_state->bShutdownMode = Adapter->bShutStatus;
1107-
plink_state->ucLinkStatus = (UCHAR)Adapter->LinkStatus;
1108-
if(copy_to_user(IoBuffer.OutputBuffer,
1109-
(PUCHAR)plink_state, (UINT)IoBuffer.OutputLength))
1110-
{
1111+
if (IoBuffer.OutputLength != sizeof(plink_state)) {
1112+
Status = -EINVAL;
1113+
break;
1114+
}
1115+
1116+
if (copy_from_user(&plink_state, (void __user *)arg, sizeof(plink_state))) {
1117+
Status = -EFAULT;
1118+
break;
1119+
}
1120+
plink_state.bIdleMode = (UCHAR)Adapter->IdleMode;
1121+
plink_state.bShutdownMode = Adapter->bShutStatus;
1122+
plink_state.ucLinkStatus = (UCHAR)Adapter->LinkStatus;
1123+
if (copy_to_user(IoBuffer.OutputBuffer, &plink_state, IoBuffer.OutputLength)) {
11111124
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "Copy_to_user Failed..\n");
11121125
Status = -EFAULT;
11131126
break;
@@ -1331,7 +1344,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
13311344
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Copy From User space failed. status :%d", Status);
13321345
return -EFAULT;
13331346
}
1334-
uiSectorSize = *((PUINT)(IoBuffer.InputBuffer)); /* FIXME: unchecked __user access */
1347+
if (get_user(uiSectorSize, (unsigned int __user *)IoBuffer.InputBuffer))
1348+
return -EFAULT;
1349+
13351350
if((uiSectorSize < MIN_SECTOR_SIZE) || (uiSectorSize > MAX_SECTOR_SIZE))
13361351
{
13371352

0 commit comments

Comments
 (0)