diff options
author | James Morris <jmorris@namei.org> | 2009-02-06 03:01:45 +0300 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-02-06 03:01:45 +0300 |
commit | cb5629b10d64a8006622ce3a52bc887d91057d69 (patch) | |
tree | 7c06d8f30783115e3384721046258ce615b129c5 /drivers/net/irda/sa1100_ir.c | |
parent | 8920d5ad6ba74ae8ab020e90cc4d976980e68701 (diff) | |
parent | f01d1d546abb2f4028b5299092f529eefb01253a (diff) | |
download | linux-cb5629b10d64a8006622ce3a52bc887d91057d69.tar.xz |
Merge branch 'master' into next
Conflicts:
fs/namei.c
Manually merged per:
diff --cc fs/namei.c
index 734f2b5,bbc15c2..0000000
--- a/fs/namei.c
+++ b/fs/namei.c
@@@ -860,9 -848,8 +849,10 @@@ static int __link_path_walk(const char
nd->flags |= LOOKUP_CONTINUE;
err = exec_permission_lite(inode);
if (err == -EAGAIN)
- err = vfs_permission(nd, MAY_EXEC);
+ err = inode_permission(nd->path.dentry->d_inode,
+ MAY_EXEC);
+ if (!err)
+ err = ima_path_check(&nd->path, MAY_EXEC);
if (err)
break;
@@@ -1525,14 -1506,9 +1509,14 @@@ int may_open(struct path *path, int acc
flag &= ~O_TRUNC;
}
- error = vfs_permission(nd, acc_mode);
+ error = inode_permission(inode, acc_mode);
if (error)
return error;
+
- error = ima_path_check(&nd->path,
++ error = ima_path_check(path,
+ acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC));
+ if (error)
+ return error;
/*
* An append-only file must be opened in append mode for writing.
*/
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/net/irda/sa1100_ir.c')
-rw-r--r-- | drivers/net/irda/sa1100_ir.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index d302bcf4c148..7a2b003954ca 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c @@ -60,7 +60,6 @@ struct sa1100_irda { dma_regs_t *txdma; dma_regs_t *rxdma; - struct net_device_stats stats; struct device *dev; struct irda_platform_data *pdata; struct irlap_cb *irlap; @@ -375,13 +374,13 @@ static void sa1100_irda_hpsir_irq(struct net_device *dev) data = Ser2UTDR; if (stat & (UTSR1_FRE | UTSR1_ROR)) { - si->stats.rx_errors++; + dev->stats.rx_errors++; if (stat & UTSR1_FRE) - si->stats.rx_frame_errors++; + dev->stats.rx_frame_errors++; if (stat & UTSR1_ROR) - si->stats.rx_fifo_errors++; + dev->stats.rx_fifo_errors++; } else - async_unwrap_char(dev, &si->stats, &si->rx_buff, data); + async_unwrap_char(dev, &dev->stats, &si->rx_buff, data); status = Ser2UTSR0; } @@ -396,9 +395,9 @@ static void sa1100_irda_hpsir_irq(struct net_device *dev) * There are at least 4 bytes in the FIFO. Read 3 bytes * and leave the rest to the block below. */ - async_unwrap_char(dev, &si->stats, &si->rx_buff, Ser2UTDR); - async_unwrap_char(dev, &si->stats, &si->rx_buff, Ser2UTDR); - async_unwrap_char(dev, &si->stats, &si->rx_buff, Ser2UTDR); + async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR); + async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR); + async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR); } if (status & (UTSR0_RFS | UTSR0_RID)) { @@ -406,7 +405,7 @@ static void sa1100_irda_hpsir_irq(struct net_device *dev) * Fifo contains more than 1 character. */ do { - async_unwrap_char(dev, &si->stats, &si->rx_buff, + async_unwrap_char(dev, &dev->stats, &si->rx_buff, Ser2UTDR); } while (Ser2UTSR1 & UTSR1_RNE); @@ -422,8 +421,8 @@ static void sa1100_irda_hpsir_irq(struct net_device *dev) } while (Ser2UTSR1 & UTSR1_TNF && si->tx_buff.len); if (si->tx_buff.len == 0) { - si->stats.tx_packets++; - si->stats.tx_bytes += si->tx_buff.data - + dev->stats.tx_packets++; + dev->stats.tx_bytes += si->tx_buff.data - si->tx_buff.head; /* @@ -482,11 +481,11 @@ static void sa1100_irda_fir_error(struct sa1100_irda *si, struct net_device *dev data = Ser2HSDR; if (stat & (HSSR1_CRE | HSSR1_ROR)) { - si->stats.rx_errors++; + dev->stats.rx_errors++; if (stat & HSSR1_CRE) - si->stats.rx_crc_errors++; + dev->stats.rx_crc_errors++; if (stat & HSSR1_ROR) - si->stats.rx_frame_errors++; + dev->stats.rx_frame_errors++; } else skb->data[len++] = data; @@ -505,8 +504,8 @@ static void sa1100_irda_fir_error(struct sa1100_irda *si, struct net_device *dev skb->dev = dev; skb_reset_mac_header(skb); skb->protocol = htons(ETH_P_IRDA); - si->stats.rx_packets++; - si->stats.rx_bytes += len; + dev->stats.rx_packets++; + dev->stats.rx_bytes += len; /* * Before we pass the buffer up, allocate a new one. @@ -545,10 +544,10 @@ static void sa1100_irda_fir_irq(struct net_device *dev) * from the fifo. */ if (Ser2HSSR0 & (HSSR0_FRE | HSSR0_RAB)) { - si->stats.rx_errors++; + dev->stats.rx_errors++; if (Ser2HSSR0 & HSSR0_FRE) - si->stats.rx_frame_errors++; + dev->stats.rx_frame_errors++; /* * Clear out the DMA... @@ -633,8 +632,8 @@ static void sa1100_irda_txdma_irq(void *id) */ if (skb) { dma_unmap_single(si->dev, si->txbuf_dma, skb->len, DMA_TO_DEVICE); - si->stats.tx_packets ++; - si->stats.tx_bytes += skb->len; + dev->stats.tx_packets ++; + dev->stats.tx_bytes += skb->len; dev_kfree_skb_irq(skb); } @@ -762,12 +761,6 @@ sa1100_irda_ioctl(struct net_device *dev, struct ifreq *ifreq, int cmd) return ret; } -static struct net_device_stats *sa1100_irda_stats(struct net_device *dev) -{ - struct sa1100_irda *si = netdev_priv(dev); - return &si->stats; -} - static int sa1100_irda_start(struct net_device *dev) { struct sa1100_irda *si = netdev_priv(dev); @@ -924,7 +917,6 @@ static int sa1100_irda_probe(struct platform_device *pdev) dev->open = sa1100_irda_start; dev->stop = sa1100_irda_stop; dev->do_ioctl = sa1100_irda_ioctl; - dev->get_stats = sa1100_irda_stats; dev->irq = IRQ_Ser2ICP; irda_init_max_qos_capabilies(&si->qos); |